[sdiy] Handling MIDI Running Status from Power-up
nextexpanse at gmail.com
Thu Nov 14 19:37:22 CET 2019
The mantra of protocol implementation is be strict in what you provide,
lenient in what you require. One has to assume that running status might
just go forever, since some controllers do that. It *is* possible to make a
very good guess at what is note on/off data (it’ll have two-byte messages
with corresponding first bytes and nonzero, then zero, in the second byte).
But you can’t be 100% sure, and anyway you can’t know the channel. So
probably the most “lenient” response is to ignore it until you get a status
The conceptual problem, which pervades all of MIDI, is that there is no
concept of sender state, only sender events. The protocol is written with
the assumption that the receiver will be—and is capable of—keeping track of
every event in order to implement the controller state model on the
receiver, which should reflect the cumulative effect of every event that
has occurred since the controller started sending events. But this is not
always possible, since connections aren’t perfect. So you get a cable with
an intermittent fault, release a key at the wrong moment, and then it plays
forever unless you’re lucky enough to have a controller that can send “all
notes off.” The end user then probably assumes your device is buggy. The
running status issue is a subset of this problem, so you can only pick what
to do to mitigate it (timeout to send a full status), you can’t really
solve it without abandoning the MIDI model altogether.
The right way to solve this would be to have a bidirectional protocol, some
sort of way for the receiver to detect when it’s been disconnected, and to
have a way for the module to query the controller’s state. Nothing else
will fix the problem, so unless there are some serious changes, we have to
live with it.
(Momentary nonlurk... ;-)
On Thu, Nov 14, 2019 at 9:13 AM MTG <grant at musictechnologiesgroup.com>
> But how many actually implement it? The OP seems to have a device that's
> not following that concept (or maybe it's just a thought exercise). The
> MMA should have included that as a line item in that ASCII-art MIDI
> Implementation Chart.
> All of us that made a MIDI-Out device need to do our homework too it seems.
> On 11/14/2019 7:57 AM, Tom Wiltshire wrote:
> > Oh, there we go! So Running Status is just not expected to run for too
> long. It’s more of a sprinter than a marathon runner?!
> > That’s simple enough to do. Either run a timer and make sure to send a
> status byte every time the timer times out, or count outgoing bytes and
> send a status byte with every Xth message.
> > I’m impressed that’s in the spec. They really did think of everything.
> > Tom
> > _______________________________________________
> > Synth-diy mailing list
> > Synth-diy at synth-diy.org
> > http://synth-diy.org/mailman/listinfo/synth-diy
> Synth-diy mailing list
> Synth-diy at synth-diy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Synth-diy