Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First readme example out of date #18

Open
jaywalkerpaz opened this issue Feb 24, 2020 · 1 comment
Open

First readme example out of date #18

jaywalkerpaz opened this issue Feb 24, 2020 · 1 comment

Comments

@jaywalkerpaz
Copy link

I couldn't get the first example to work, but I modified it and it achieves the objective:

import rtmidi

midiin = rtmidi.MidiIn()
midiin.ignore_types(sysex=False, timing=True, active_sense=True)

ports = range(midiin.get_port_count())
if ports:
    for i in ports:
        print(midiin.get_port_name(i))
    print("Opening port 1!") 
    midiin.open_port(1)
    while True:
        m = midiin.get_message()
        if m:
            print(m)
            
else:
    print('NO MIDI INPUT PORTS!')
@bergamote
Copy link

a bit late but I think that what's happening is that both pyrtmidi and python-rtmidi use the same module name rtmidi. Per the syntax you use in your modified example, what you have installed is python-rtmidi, not pyrtmidi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants