[sdiy] Handling MIDI Running Status from Power-up
Richie Burnett
rburnett at richieburnett.co.uk
Thu Nov 14 19:05:13 CET 2019
I think it was Colin Fraser who described to me a good way to implement running status at the transmiting end. If I understood correctly it goes something like this:
Running status is an optional way to reduce the amount of data that needs to be sent over a serial UART to reduce congestion when there's lots of similar messages to be sent in quick succession.
So, if you have a MIDI message to send AND the UART transmit buffer is already full AND it's the same message type as the previous message, then take advantage of running status, just send the data byte(s) and benefit from a little decongestion.
However, if you have a MIDI message to send and the UART transmit buffer is currently empty, then there isn't any congestion, so send the full message and give the receiving devices a little refresher of what the message type is.
I thought that method was neat. Hope I explained it properly.
-Richie,
Sent from my Xperia SP on O2
---- Tom Wiltshire wrote ----
>
>> On 14 Nov 2019, at 15:45, Neil Johnson <neil.johnson71 at gmail.com> wrote:
>>
>> On Thu, 14 Nov 2019 at 15:34, chris <chris at chrismusic.de> wrote:
>>>
>>> That's what I thought too, but the *sender* would have to recognize the
>>> interruption, in order to send a fresh status byte.
>>>
>>> It's correct that the *receiver* is able to notice missing Active Sense,
>>> but in this case it can't make any use of it - it still doesn't know the
>>> missing status byte.
>>>
>>>
>>> If the MIDI gods had thought of acknowledged Active Sense, this would
>>> work.
>>> But then, with some dozen other bells'n'whistles, we'd have something
>>> like USB. I'm glad they didn't...
>>
>> They already considered this in the spec:
>>
>> "If Running Status is being used and a receiver is connected to a
>> transmitter after the transmitter has
>> powered on it will not play until the next Status byte is transmitted.
>> For this reason it is recommended
>> that the status be refreshed every few seconds."
>>
>> (page A-2 in the online PDF version).
>
>
>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
More information about the Synth-diy
mailing list