Re: Sysex MIDI Packets
Re: Sysex MIDI Packets
- Subject: Re: Sysex MIDI Packets
- From: Kurt Revis <email@hidden>
- Date: Tue, 10 Feb 2004 11:16:29 -0800
On Tuesday, February 10, 2004, at 12:09 AM, Rib Rdb wrote:
Another developer on my project is interpretting the documentation
differently than I am on what can be in a MIDIPacket, and I wanted to
try to figure out what's right. Our confusion is with Sysex messages
that are mixed with realtime messages. We're trying to figure out if
it would be possible to recieve a packet with data like this:
{ 0xf0, 0, 1, 2, 0xfe, 3, 5, 6, 7, 8, 0xf7 }
or maybe two packets like
{ 0xf0, 0, 1, 2}, { 0xfe, 3, 5, 6, 7, 8, 0xf7 }
or if it will always come with the realtime message in it's own
packet:
{ 0xf0, 0, 1, 2 }, { 0xfe }, { 3, 5, 6, 7, 8, 0xf7 }
My understanding is that realtime messages can be mixed in the middle
of ANY longer message (not just sysex). Moreover, it is not guaranteed
that the combination of MIDI interface hardware, MIDI driver, and
CoreMIDI will conspire to put realtime messages in their own packet, or
even at the start of a packet.
For instance, imagine a realtime message that gets sent in the middle
of a note-on message. The note-on message must be completely contained
in its own MIDIPacket. And the driver/CoreMIDI will not (as far as I
know) reorder the bytes in the MIDI stream (someone correct me if I'm
wrong). Therefore, the realtime message must go in the middle of the
same packet.
So you should assume that ANY of the situations you describe could
actually happen. It shouldn't be too difficult to make your MIDI
parser deal with it.
--
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.