Re: Stuck MIDI notes
Re: Stuck MIDI notes
- Subject: Re: Stuck MIDI notes
- From: Kurt Revis <email@hidden>
- Date: Thu, 31 Oct 2002 05:18:42 -0800
On Thursday, October 31, 2002, at 04:34 AM, Philippe Wicker wrote:
Have a look in XFramework/Model/XMIDIClient.cpp, there is a method
called NextMIDIEvent. This method contains code that allow to walk
through a MIDIPacket event by event. It may not be exactly what you
need (it could be useful to get at return the length of the event),
but it is surely a good starting point.
Yes--that code implements the basics correctly. Note that this code
doesn't handle realtime messages properly, though. The unofficial
"MIDI spec" floating around the net says
MIDI allows a RealTime message to be sent at any time, even
interspersed within some other MIDI message. For example, a RealTime
message could be sent inbetween the two data bytes of a Note On
message.
but this code doesn't handle that case.
(Unless CoreMIDI rewrites MIDI data to move realtime messages out of
other messages... but that's pretty unlikely. I sure don't think it did
when I wrote my parser more than a year ago.)
The moral of the story is: MIDI is a fundamentally irritating protocol.
--
Kurt Revis
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.