Re: MIDI packet processing
Re: MIDI packet processing
- Subject: Re: MIDI packet processing
- From: "X. J. Scott" <email@hidden>
- Date: Mon, 13 Sep 2004 16:43:49 -0400
> When processing MIDIPackets, I see a note that "running status is not
> allowed" but I could use some more clarification.
Running status will not appear in your received packets and should not be
included in the ones you make.
> Will realtime events still appear potentially inside other messages?
Yes, er, no, er I'm not sure. You still get realtime events in your packets
but I'm pretty sure they won't break up regular events. Sysex can already
come in multiple packets per sysex message so I expect realtime can split a
sysex...
In MIDI, real time events HAVE to be able to break up other events in order
to maintain timing accuracy. In CoreMIDI, everything is time stamped so
that's not an issue.
OK, here's the definitive answer from struct MIDIPacket:
"Single-byte MIDI realtime messages may not occur between the status and
data bytes of other messages, except in system-exclusive."
So, put them as their own messages.
> When building my own MIDIPackets using MIDIPacketListAdd, what
> constitutes a "single event?"
Something happening at the same time.
> For example, if I slide my finger from one held key across to another
> key, the accompanying MIDI data might be a note off, a note on, and an
> updated channel pressure. Should those each be their own call to
> MIDIPacketListAdd or can they be combined?
I think they can be combined since there is one time associated with them,
HOWEVER you may not want to do this since they can theoretically get
reordered by the MIDI driver if they happen at the same time and you may
want to prevent the note-on from being sent before the note-on in order to
avoid special legato processing on the synth. Better to have the note on
sent a tick or two later.
- Jeff
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden