You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm on MacOS Tahoe and I'm trying to get mido to play sound through a virtual cable into a software synth, Pianoteq 9. It's not working.
I have a Haskell program using portmidi that works fine on my system, so I'm familiar with real-time midi processing.
My synth makes sound when I click its virtual keyboard
I set my synth to read all midi ports.
Synth also works with a midi controller.
I'm routing events through the MidiPipe virtual midi cable.
I rebooted my system.
Can someone help me figure out what's wrong with this program?
importtimeimportmidodefplay_test_note(port_name="MidiPipe Input 1"):
"""Opens a macOS MIDI output port and plays a short note."""print("Available Output Ports:", mido.get_output_names())
try:
withmido.open_output(port_name) asoutport:
print(f"Successfully opened '{port_name}'. Playing middle C...")
# Send Note On (Velocity 64)outport.send(mido.Message("note_on", note=60, velocity=64))
time.sleep(1.0)
# Send Note Offoutport.send(mido.Message("note_off", note=60, velocity=0))
print("Note finished.")
exceptIOError:
print(f"Could not open port '{port_name}'. Check your Audio MIDI Setup configuration.")
if__name__=="__main__":
play_test_note()
Thanks! I discovered that it works with the IAC Driver virutal cable but not with MidiPipe.
rt-midi is installed according to some code I got AI to write (your code gave an error in zsh).
The rest of my music production software is built around using MidiPipe, so I would rather get it working if you know of any reason it wouldn't work with rt-midi or some other incompatibility between mido and MidiPipe.
However, if we really can't get it to work, then I'll switch to the IAC Driver.
Well, if you entrust AI to fix your problem without trying to understand it first, there's nothing I can do for you. If and when an error occurs, the good practice is to share it with us so we can work things out together.
(You were probably just copy/pasting my instructions instead of following the provided documentation links and apply the correct recipe for YOUR specific environment.)
Anyway, if it works with the IAC driver, it means you have a properly working backend.
I suggest you contact the midipipe developer to check if there's known compatibility issues with rtmidi.
Another route would be to try an alternative backend, I suggest you start with pygame.
I only used AI to check that a back end was already installed, but yes, I didn't realize you didn't intend for your code to be pasted verbatim. I'll look at the mido docs if I need to do further debugging of my python.
An internet search shows some hint that MIdiPIpe is an old app and not fully compatible with rtmidi on newer MacOS versions.
I think about whether I'd rather try a different back end or just switch to the IAC Driver.
Sorry if I've been a bit blunt, and thanks for providing an explanation. I'm a bit tired of dealing with AI BS.
Your assessment of midipipe may indeed explain the behavior. We're entirely relying on external backends for now so there's not much we can do on our hand.
Hope you can have fun with MIDO!
Thanks, and although I'm experimenting with using AI to code to save time in my new project, I checked every possibility I could think of, using my human programmer's brain, before posting here with my original question. I even partially solved my issue, by checking the IAC Driver.
I can understand if you are receiving a lot of low-effort questions from people who are vibe coding without understanding code.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm on MacOS Tahoe and I'm trying to get mido to play sound through a virtual cable into a software synth, Pianoteq 9. It's not working.
Can someone help me figure out what's wrong with this program?
All reactions