Closed AntonM030481 closed 3 years ago
Did you compile python-rtmidi
yourself?
Please check that rtmidi.get_compiled_api() returns at least rtmidi.API_MACOSX_CORE
.
Built-In Microphone and Output are ignored.
These are not MIDI interfaces.
Did you compile
python-rtmidi
yourself?Please check that rtmidi.get_compiled_api() returns at least
rtmidi.API_MACOSX_CORE
.
No, I didn't compile it by myself. rtmidi.get_compiled_api() [1]
So, which MIDI interface do you expect to be listed? Which MIDI interfaces do you have connected (or defined in the Audio and MIDI connections configuration)?
I am newbie in MIDI world. Looks like described behaviour (no ports if no physical MIDI devices) is OK for MacOS. I found an answer here: https://stackoverflow.com/questions/58191627/no-sound-from-midi-program-in-python-on-mac VMPK solved an issue for me. Output port appeared and produces sound.
Yes, macOS has no built-in MIDI instruments. You either need to connect a hardware MIDI interface, define a virtual MIDI interface in the Audio and MIDI settings or run a program, e.g. software synthesizer, which has MIDI input ports. Alternatively, you can create virtual MIDI output ports in python-rtmidi, which you can then connect to other MIDI input ports by other means.
/tests/test_rtmidi.py
Probe ports using the macOS (OS X) CoreMIDI API? (Y/n) y No MIDI input ports found. No MIDI output ports found.
MacOS Catalina 10.15.7 at Macbook Pro. Built-In Microphone and Output are ignored.
If IAC Driver is used according to this: https://support.apple.com/guide/audio-midi-setup/transfer-midi-information-between-apps-ams1013/3.5/mac/10.15 output ports are found, but no sound using it (according to Apple listening app is needed)
/examples/basic/midiout.py
DEBUG:rtmidi.midiutil:Creating MidiOut object. Do you want to create a virtual MIDI output port? (y/N) n Available MIDI ports: [0] IAC Driver Bus 1
Select MIDI output port (Control-C to exit): 0 INFO:rtmidi.midiutil:Opening MIDI output port #0 (IAC Driver Bus 1). Sending NoteOn event. Sending NoteOff event. Exit.