I have a LUA function defined and put it’s name in the JSON to be called when a momentary button is pressed. When I press the button (or turn the encoder associated with it) the function is called correctly.
However, when I release the button (or the knob) the function is called again. Depending on what you are doing in the function call, the effect is either benign or causes problems (sending/receiving sysex for example). In any case, it’s unexpected behavior.
I guess I can code a conditional in the function based on the momentary value, but it might be cleaner to be able to define whether the function is invoked on press, release, (or both I guess if really needed)
EDIT - even weirder - since this is a virtual button, the “value” parameter being passed in is neither 1 nor 0, it’s always nil so I can’t conditionally code a response to the press/release.
EDIT 2 - the documentation states that if an On value or Off value is not defined for a control then the MIDI transmission will be ignored. If that’s the case, then maybe by not defining one state or the other I can get a single MIDI transmission rather than two. I’ll update after testing.