I currently have a MusicPlayer which contains a MusicSequence with a set of MusicTracks that hold MIDI information. What I want is to know when a MIDI Note starts reproducing and when it ends, something like a listener of the playback of the MIDI.
I was looking and think of maybe using MusicSequenceSetUserCallback but I don't really know how would that work. Anybody has an idea on how to accomplish this?
There's a tutorial on how to capture midi events from a MusicSequence here (such as note on/off): http://www.deluge.co/?q=midi-driven-animation-core-audio-objective-c
In brief, the method is to call MIDIDestinationCreate to create your own MIDI endpoint to handle the MIDI messages, and then point your MusicSequence at it with MusicSequenceSetMIDIEndpoint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With