Two state widgets - two MIDI messages?

Hey folks I’m a bit confused about MIDI assignments for widgets. It looks like you can only assign one MIDI message to a widget, even though that widget has two states. Additionally, although this might not be related to the question, it seems you can’t determine what the value of a CC message is or the value (velocity) of say a Note_On message. So if a widget has two states - On And Off - how could you assign a different MIDI message to the two different states? Here’s what I’m hoping for:
Widget On = NoteOn
Widget Off = NoteOff

(What I’m looking to build here is a virtual MIDI keyboard that responds to Note On and Off from a MIDI keyboard)

  • you can assign assign one single MIDI message to a widget
  • each MIDI message can have several values (not only two)
  • button widget switched indeed between two values
  • knobs or slider widgets are multi-valued widgets
  • as you can only assign one single MIDI message to a widget it will either respond to NOTE ON of to NOTE OFF, but not to both

Did you check this?

You could group two widgets together, reverse the value of one (you could even hide it). That way when you turn the visible one off, the invisible one sends another message.

2 Likes

Or use GP-Script…

@David-san Thanks for your reply - and for the file - I can see that I could copy and paste various parts of this and assign each key accordingly.

“* button widget switched indeed between two values” - I think this is what I am hoping for, so ‘button on’ corresponds to say Note On 60 Velocity 127 and ‘button off’ corresponds to Note On 60 Velocity 0. So both the same MIDI message, but different values. How is this achieved? (perhaps I am misinterpreting!)

When you MIDI learn a button widget to a NOTE ON message it will respond to… a NOTE ON message. If you press a key of your MIDI controller it can trigger your button widget, but if you release it it will produce a NOTE OFF message and this won’t trigger your button widget as it only reacts to NOTE ON message. What is not clear here? :face_with_monocle:

Thanks for your message - yes that much is clear. I think where I am getting confused is I was expecting something like:
Note On C3 Velocity 127 switches the button widget ‘On’
Note On C3 velocity 0 switches the button widget ‘Off’
And was looking for a place to set the specific velocities for each of these states.
This does not appear to be an option - so I see I can achieve this a different way IF the button widget is set with the ‘Momentary to latching’ option switched on:
Note On C3 Any velocity switches the button widget ‘On’
Note On C3 Any velocity switches the button widget ‘Off’

Probably obvious to everyone on here except me :rofl:

Thanks for your patience by the way - and the Illuminated Keyboard is awesome :slight_smile:

This is exactly how it works in theory, but in praxis, If GP “sees” a NOTE ON message with velocity 0 it will interpret it as a NOTE OFF message. But anyway your keyboard controller will probably not send a NOTE ON message with velocity 0 when you release a key, but a NOTE OFF message which won’t make react your button widget if it was MIDI learned to NOTE ON message. We come always to the same conclusion.

Thank you very much, you are welcome :wink: