All notes off overkill?

• Jun 18, 2021 - 17:03

When MuseScore commences play, or after play is ended, it sends, on every MIDI channel used in the score, a MIDI All Notes Off message. The need for this before play is questionable - it would seem to only take care of the case in which, when play commences, the synthesizer is already sounding a "stuck" note (what an organist would call a "cipher") - not a likely (or tolerable) situation. But perhaps it is good to be scrupulous - "you can't be too careful."

But, as there is apparently insufficient faith in the power of the MIDI All Notes Off command, MuseScore, before play commences, and after play, also sends MIDI Note OFF messages for all 128 possible MIDI "notes" (pitches), over all MIDI channels in use for the score - a potential prefatory utterance of 2048 Note OFF messages.

At the very least, this result in a sometimes mystifying delay of couple of seconds before we really hear any of the notes of the score.

But that is only part of the "problem". "We" often have to employ, for several reasons (including the forensic testing so beloved to this office) a "MIDI loopback driver" (e.g., MIDI Yoke, LoopBe) that allows two MIDI-capable applications to interconnect (an otherwise impermissible same-gender coupling). If this setup is done improvidently, the result can be a "feedback loop" around which a MIDI message or a group of same can mindlessly course at the highest rate accommodated by the players.

To guard against this, many such drivers incorporate a "feedback loop circuit breaker" feature. This is often implemented in a simple way: if the flow of MIDI messages is at an average rate above some threshold for a certain period of time, the driver "mutes" the path to interrupt the phenomenon. The user is given some indication of this (often too subtle) and has to reset the mute (hopefully after correcting the improvident configuration) before the driver will work again.

Some "loopback" drivers allow us to disable this "feedback loop circuit breaker" functionality if it is not needed (and is troublesome), but others don't.

The flood of MIDI Note OFF messages that comes at the start of play (or at the end of play), especially when multiple MIDI channels are involved) can well trip the "circuit breaker" of a loopback driver.

I suggest that the sending of MIDI Note OFF messages for all 128 MIDI "notes" at the beginning and end of play be re-examined.

Doug


Comments

Hi Doug,

Nicely said!

Doug Kerr wrote >> When MuseScore commences play, or after play is ended, it sends, on every MIDI channel used in the score, a MIDI All Notes Off message.

Doug Kerr wrote >> But, as there is apparently insufficient faith in the power of the MIDI All Notes Off command, MuseScore, before play commences, and after play, also sends MIDI Note OFF messages for all 128 possible MIDI "notes" (pitches), over all MIDI channels in use for the score - a potential prefatory utterance of 2048 Note OFF messages.

> Here on the Mac, when monitoring with MIDIMonitor 1.4, I too always see these flurries of all notes sent on all channels.

Doug Kerr wrote> >The need for this before play is questionable - it would seem to only take care of the case in which, when play commences, the synthesizer is already sounding a "stuck" note (what an organist would call a "cipher") - not a likely (or tolerable) situation. But perhaps it is good to be scrupulous - "you can't be too careful."

Doug Kerr wrote> >"We" often have to employ, for several reasons (including the forensic testing so beloved to this office) a "MIDI loopback driver" (e.g., MIDI Yoke, LoopBe)

> Agreed. I wonder if this cautionary pre-play and post-play behavior is an archaic Musescore safeguard that's now a needless anachronism. The pre-play flurry seems particularly unneeded.

> I haven't encountered a "feedback loop short-circuit" interruption, but I do find it annoying that there's always such a large chuck of sent MIDI messages preceding and following the actual state of play. Because it makes it harder to see "what just happened" on the real stage ... and means I'll do some scrolling to find out.

> If Musescore feels strongly about retaining this safeguard perhaps we could have a preference for those of us —with enough faith in the All Notes OFF command—who are willing to take our fate in our own hands?

> scorster

In reply to by scorster

In the interest of thoroughness, I point out that, per the MIDI Specification, there are some limitations in the working of the All Notes Off command. The All Sound Off command overcomes some of those limitations. but not all.

The MIDI Note OFF message has some of those same limitations.

I am not at all familiar with the behavior of lots of synthesizers in response to either of those commands.

I just hope that MuseScore does not have to deal with this problem (maybe with respect to the commencement of play it is a non-problem) both "the easy way" and "the hard way".

Doug

Do you still have an unanswered question? Please log in first to post your question.