Spying on MIDI Output #250
-
|
I'm just starting out with MIDI programming on a Mac (lots of Windows experience but that's not a lot of immediate use to me here). MIDIKit looks like just what I need but I have a question about how to do something in particular and am hoping someone can point me in the right direction. I am running an app that outputs MIDI to external hardware. I have no access to that app's source code. I want to write another app that can see the data going to that external device. I don't need to change that data in any way I just want to be able to monitor it for display purposes . Is there a way to do this within MIDIKit or do I have to dive deeper and find a way to do it at a lower level? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
That's definitely a great question. Core MIDI on Mac does not offer an application layer mechanism to spy on MIDI events sent to arbitrary destinations on the system. It is possible, but it involves writing a separate Core MIDI driver package. I don't think it uses private API but I'm not totally sure. There is one utility I've known of over the years that is able to do this: MIDI Monitor. You can find its source code on GitHub here: krevis/MIDIApps. The source code is under BSD licensing which is fairly permissive, so perhaps it is compatible with what you're building. The |
Beta Was this translation helpful? Give feedback.
Entirely, yes. If the app in question lets you select the MIDI destination endpoint/port then that's fairly trivial.
Ostensibly you write an app that creates a virtual MIDI input. You can analyze the event stream there, then forward the events as-is to a MIDI output connection that connects to the intended MIDI input in the system.