[sdiy] MIDI state machine for arpeggiator
ASSI
Stromeko at nexgo.de
Sun Mar 1 10:43:12 CET 2009
On Sonntag, 1. März 2009, Matthew Smith wrote:
> I think I understand. Just to confirm, rather than what I thought
> was the stream:
>
> noteon-n1-v1 noteon-n2-v2 noteon-n3-v3
>
> ...where n(n) is note number and v(n) is velocity.
>
> For the same channel we may actually see:
>
> noteon-n1-v1-n2-v2-n3-v3 ... etcetera
>
> ...and with v(n)=0 as part of the note on stream representing a
> note off.
Yes, especially for notes that are expected to sound together you will
get this kind of data from all but the most simple MIDI sources.
Sometimes you can switch it on and off and some MIDI routers can
remove or insert running status if you configure them so.
> > Your state machine is not robust in the sense that when a byte
> > goes missing it doesn't synchronize at the next command byte (it
> > would swallow it when waiting for velocity for instance).
>
> So each state > 0 needs to look out for another command byte?
Yes. MIDI is not secured against transmission faults, so you should
be a bit defensive in how you deal with certain assumptions.
> If my understanding is correct, it's still fairly simple stuff.
Yes, it's hardly a complication.
There is one thing that you may not want to deal with because you
might know it never happens: sysex is a bit tricky because it does
not necessarily end with "F7". Instead you can just leave the sysex
message open and the next status byte will implicitly close it. One
keyboard that is using this approach is the original Yamaha DX7, I've
read. If I understand correctly what you said about the changes to
your implementation in a later message this might be already taken
care of.
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk]>+
SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
More information about the Synth-diy
mailing list