Handling MIDI Note ON with Zero Velocity

I have been trying to put more of my control surface into my working GP gig. The current task is to get some of the control surface buttons to select song parts. However I have come a cross a problem that stops me controlling the LED of the button on the control surface. The control sends Note ON 127 then Note ON 0 (I have confirmed this with Protokol). But when viewed in Rig Manager the incoming MIDI has morphed into Note ON 127 followed by a Note OFF 0. For playing notes this is not an issue, however for a control surface this is an issue.

The consequence is a widget LED lights when the control is pushed, but does not go off when the control is released. I cannot see any option to disable the morphing of a Note ON 0 to a Note OFF 0. Is there a way to disable the Note ON 0 conversion in rig manager?

Does your control surface provide a way to alter the midi messages sent from the buttons? Changing them to CC messages is generally the most flexible option.

If you can’t change the messages sent by the controller, you can avoid the widgets and map the Note On messages to individual song parts or prev/next part in the Options-> Setlist/Songs. This should work fine.

I have a couple of control surfaces and one may do the other certainly doesn’t. However for sanity sake I have a policy of changing nothing outboard to make things work, ie. Factory defaults. This way there is always a simple way to get settings back to something you know without hunting through many layers of menus on small two line screens to find what is not working. Also if you need to swap out a keyboard at a gig, do a factory reset and map via rig manager, this gives you the safest and fastest route to getting running again. I am a big fan of rig manager, it was the biggest reason for moving from MS to GP. So changing to CC is not really a good option for me.

It is not the mapping that is the issue it is the MIDI sync that is the problem as I cannot control the LEDs on the control surface unless a widget sends Note ON 0.

You’re not changing the song parts via the control surface? Only using it for visual reference for which part is selected?

Or is it that you need them acting like radio buttons, so will need the widget sync in order to achieve this?

I will do eventually, but that is relatively trivial. Yes the control surface will also be used as a visual reference of which song part is currently selected.

I will have to start looking at a scripted solution, fortunately I route all my MIDI via the global rackspace and loop back via IAC on my MACs and loopMIDI on my Windows PCs, so I do have a single point where I can capture the flow and convert the MIDI stream, but I am not convinced this loop will not fall prey to the same Note ON 0 conversion. I may have to look at some other means of getting the Note ON 0 message back to the control surface.

There’s not much that GP Script can’t do with midi messages/conversion.
Although the functions like MakeNoteMessage I think won’t allow you to define a Note On with 0 velocity (it will instead generate a Note Off), you can also generate Sysex messages, so you should be able to achieve this. Combined with the callbacks for when songs/song parts are changed, you should be able to achieve what you want.

Here is the scriptlet that should fix the Note OFF. In the global rackspace I connect a MIDI In to the scriptlet input and the scriptlet output a different MIDI Out and send a Note ON followed Note OFF.

//Called when a NoteOff message is received
var c : Integer
On NoteOffEvent(m : NoteMessage)
    c = GetChannel(m) - 1
    SendNow( MakeMidiMessage3(0x90+c, GetNoteNumber(m), 0) )


Although the GP global midi monitor and the inline midi monitor shows the output as this

The other end of the loopMIDI shows this I think

So it looks hopeful, I think a final solution may be to convert the incoming messages to CC# with a script then loop the CC messages back into GP then the CC outputs from the SYNC’d widgets converted to Note ON messages with a script on the output.

@dhj Any chance of a do not modify NOTE ON option in Rig Manager or GP options menu???

This can be done seamlessly with a Gig GPScript.

This can unfortunately not be done using a Gig GPScript (even if it could be cool). In fact I think you won’t be able to use the Widget SYNC option at all for this and you will have to use a Rackspace GPScript instead. I have something similar in my Global Rackspace. My Control Surface LED can only be controller using NOTE OFF message with 127 for LED ON and 0 for LED OFF and this whatever the MIDI message produced by the Control Surface (NOTE ON or CC#).

1 Like

What is your control surface and if you wouldn’t mind could you share your global rackspace script?

My control surface is an Icon Platform M+ with a DU (Display Unit) option. Not yet ready to share my huge Global Rackspace GPScript (still too ugly, not proud about it).

1 Like

NP, my Control surface is the CME VX5 with motorised faders, that bit of feedback works well. I have managed to get the MMC control LEDs to work with feedback . Just starting with the other controls/LEDs etc. but it would be cool to get this all running, now I have a good working rig from a musical perspective.

I do think the Gig script is the best option. You don’t need loop back ports, as you can inject the converted midi back into the incoming stream at a very early stage, so GP treats it as if it’s come from your control surface.

You can also tie the script to a particular Rig Manager rig name as well, so the conversion only gets done for that Rig.

Although you can’t interact with widgets in the Gig Script, you can detect that a song part change has occurred, and send back the messages needed to update the LEDs on the control surface.

I have a working solution. The key to understanding was the requirement for the widget to have both a MIDI In and a MIDI Out on the same interface. The loopMIDI is a cable replacement which okay when just looping global rackspace to inputs for local rackspaces or vica-versa, but it is not a device replacement. I have added the solution to the Tips and Tricks section here.

1 Like

For information, according to midi standard, a note ON with 0 velocity should be considered as equivalent to a note OFF for legacy reason. C.f., MIDI documentations at midi.org

So to me, it is following the standard unless i missed something.

1 Like

So to me, it is following the standard unless i missed something.

@Weyl you are correct, but when a control surface expects back exactly what it sent and it sends Note On 0 when a button is released, to remotely drive the LED off you have to send it Note On 0 and not Note Off 0. There are some control surfaces that send Note OFF 127 when a button is pressed and Note OFF 0 when released. For me this is a much cleaner abuse of the Note ON/OFF messages for control surfaces.

Ok, I think I understand. At least you have found a solution and I think going through rtpMIDI sounds like a good solution for your problem. I personally use rtpMIDI quite a lot and love it.

1 Like