Roland style All Note Off

Tags: #<Tag:0x00007f977fb050b8>

Roland used to have a protocol on all their keyboards which was sometimes a boon - and sometimes maddening if you didn’t know about it. Steinberg’s default filtering may still kill All Note Off recording on input as a reminder of this little application’s potential impact, which was…
When the last note was released, an All Note Off was issued. The idea being that if anything was droning, this was the obvious time to kill it. Of course, if one was overdubbing into the same midi instrument, things got crazy pretty quickly, with ANO being issued at inappropriate times.
I’d like to create a conditional filter to reproduce this behavior and I’m not sure we have such a conditional status available in Cantabile.
An application in the Cantabile world would be to have the event of choice commence when the last note was released from the keyboard.
Is this a job for a reaJS script?

Cheers m’dears.

I am afraid that this is just the case when you need a script…unless there is some Cantabile filter which is able to count how many notes are “on” at a given time (I have gone through the available MIDI filters but I have not found a filter or a combination of filters that could perform this function).


Ah - figured as much. I guess it would need to keep a register of note ons and issue ANO when the register clears. Would that do it, do you think?
Thanks Gabriel

I think it would work. I can try to do it myself, if I have time during the weekend. :wink:


1 Like

I wouldn’t want you thinking I posted this just to get your attention, Gabriel.:innocent:
I think this could well be a real boon to the community! Stuck notes are the reason there’s barely a DAW, host or master controller without a panic button.
Roland were pretty smart in offering an extra layer of ‘insurance’, and although it’s not appropriate for overdubbing … that’s the one thing we’re unlikely to do in Cantabile!

No pressure. :joy::joy:

1 Like

The basic functionality should be simple enough - keep a list of active notes in an array, remove as note-offs come in, send AllNotesOff when last note is removed. Some challenges like “double noteOn” can be dealt with (either ignore the second noteOn or allow adding the same note twice to the list, so you’ll need to receive two note-ons to really kill the note).

Also you’d need to deal with CC64 (sustain) - but that can be predictable:

  • when last note has been released, but sustain is currently active, don’t send AllNotesOff
  • when sustain pedal is released and no notes are held, send AllNotesOff

That should cover all but some nasty edge cases I can’t currently think of…

Unfortunately too busy ATM to take a stab at this myself, but after the pseudo-poly-aftertouch, this should be a piece of cake for @cdv_gabriel :wink:




I guess the note array could be an array of counters. Each counter would be incremented by a NOTE ON and decremented by a NOTE OFF for that particular note.
Then one has just to add up all the counters to know if some notes are ON.

I agree that the sustain pedal should be taken into account. BTW, how did Roland managed the pedal? I have a Roland D50 but I’d have to take it out of the closet and of its flight case…just to test how it behaves. I would do it only if really needed. :wink:


if you’re sloppy, you could simply count NoteOns and subtract NoteOffs in one variable - should work…

Thinking about this some more, we may be missing something important: typically, stuck notes happen when a NoteOff somehow gets lost - but in that case, all our note-counting won’t help either.

I guess Roland use their inside knowledge of the actual physical keys pressed to detect the right time to send the ANO, but since inside Cantabile we need to rely on Midi input only, we can’t do that.

So with our note-counting, stuck notes due to lost note-offs will still be stuck, I’m afraid…


You have a very good point. Maybe we should think about it a little more. :thinking:

In the meantime, I have found a few minutes to write down a first alpha version of the script (attached here).

I thought one could want to send some other message instead of just “All Notes Off” (for a change!) so I have given the option to send a generic CC (with a selectable value) or a Pitch Bend value.

One has also the option to take sustain into account or not. A check with MIDI monitor in Cantabile shows that it works (at least it seems to…).

Gabriel (1.3 KB)


Hi @cdv_gabriel Gabriel, very nice that one can issue the event of choice!
For some reason the script is only issuing double note offs and the other modes aren’t providing CC or PB data.
Not sure what I’m doing wrong.

Hi @Ade,

either I have uploaded a wrong version or something else is happening.
By looking at your image, I can’t spot anything wrong.

First of all, I will download the uploaded version and check it out.
Sorry for the inconvenience, it worked flawlessy on my system.


All it would take would be a reiteration of the note and the situation self corrects. As the same notes are often played during a song (really? :smiley: ) it may be that in
real world use potential drones are cut off before they become noticeable.

Hi @Ade,

here is how it works on my system. I cannot say what is going wrong on yours without further information.

I will have another look during the weekend.


Edit: I have used the script downloaded from this thread.

Hmm freaky.
It was a clean song - just reaJS and midi fed to a synth with the monitor between.
Going to retry.

So this demonstrates the reaJS is operating. First up, an arpeggiator which looks ok.
Swap that out for the ANO script and it’s the same story as my first capture. And yours works. Mystified. Anyone else able to give it a go?

I was wondering…is your controller sending an actual NOTE OFF or a NOTE ON with null velocity? I ask because I forgot to take care of that. I only handle NOTE OFF events.


That must be it. Cantabile’s midi monitor interprets that as a Note Off, as does the PIZ midi monitor. Cubase reveals that it’s actually Note On @ 0.
Glad we got that. :+1:
Perhaps this is an opportunity to make a request for an enhancement to Cantabile’s MIDI monitor.

Hi @Ade,

I have just checked and things are a little bit different than I thought. Since I used as a starting point my pseudo-polyAT script, which recognizes NOTE ON with null velocity as NOTE OFF, my ANO script actually handles the case. What it does, however, is sending out a NOTE OFF even if the received message was a NOTE ON with null velocity.
So I do not think this could be the problem.


OK - so I managed to get a result, of sorts. I used PIZ MIDI Converter 3 to force real note offs. I now see the ANO message. The way I’ve set it up is hopeless - all note ons are producing a ANO message - I must have forced all note ons to note offs at some point, or I’m not blocking the appropriate data, but it all points to the ‘real note off’ issue being involved somehow.

1 Like