[sdiy] MIDI state machine for arpeggiator
ASSI
Stromeko at nexgo.de
Sat Feb 28 12:07:33 CET 2009
On Samstag, 28. Februar 2009, Matthew Smith wrote:
> At the end of this message there is a little fragment of C (if I
> remember to paste it!) - I would appreciate any comments on the
> finite state machine that I'm using to filter the incoming MIDI
> stream. Thought I should get this in now when people are still
> thinking arpeggiators from this morning.
I don't know where you expect to get the MIDI data from and if you can
make certain assumptions, but if it's from a master keyboard or
sequencer you really need to implement running status (you get just
one status byte and then many note/velocity pairs) and recognize that
a NoteOn with Velocity=0 really is a NoteOff.
All the realtime messages are sidechannel data, which means they can
come anywhere inbetween any other messages and don't break running
status. Otherwise running status is ended when another command comes
in. 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).
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