How atomic is MIDPacket?
How atomic is MIDPacket?
- Subject: How atomic is MIDPacket?
- From: Christopher Corbell <email@hidden>
- Date: Tue, 27 Apr 2004 01:06:21 -0700
I'm developing a mechanism that allows specific MIDI events
to be mapped to specific targets or actions in an application.
I'm wondering, in practice, how much one should count on a
MIDIPacket to represent an atomic MIDI event or run of similar
MIDI events. I'd hope that driver developers wouldn't arbitrarily
stuff completely different types of MIDI events into a single MIDI
packet, but looking at MIDIServices.h it doesn't seem that this is
guaranteed.
As an example my app might allow certain controller messages
to be handled by one object and note messages to be handled
by another. I have a "dispatcher" object that gets the MIDIPacketList
from the usual callback, and iterating through my hope is that I
can just look at the status byte at the beginning of each packet
to determine where that packet should go.
In practice with a small variety of driver/controller configurations
(EDIROL, M-Audio, YAMAHA) this assumption seems to be reliable.
However if it's really the case that one should implement full
MIDI parsing for the bytes in each packet without this assumption
(i.e. treat it as just a raw "batch" of MIDI data and not necessarily
as relating to a single type of MIDI message) then I'd rather do it
right now than be forced to fix a failure later...
Thanks for any insights.
- Christopher
_______________________________________________
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.