At note on, one "/note" MIDI message; At note off, another "/note" MIDI message

Is it possible the following configuration for a button widget in OSC?

When ON (when pressed):
address: /note
preArgs: [1, 1]

When OFF (when released):
preArgs: [1, 2]

Thank you!

Setting preArgs to something like this should work :
[1, JS{{ return @{this} == @{this.on} ? 1 : 2 }}]

Thank you so much! It works!

What my problem was:
Cubase 10 Pro has two places in which you can define shortcuts (“keyboard shortcuts” & “generic remote shortcuts”). The thing is, making a shortcut for selecting a specific track in the project is available only through Generic Remote. Hopefully, now (with your solution) I will be able to set a MIDI note message for selecting a certain track, and another MIDI note message to run a menu entry (all triggered from a single OSC button).

Look what I did (before reading your reply), using a combination of strokeMIDI and Cubase’s 10 Generic Remote:

I just tested your code with Cubase (to do the exact same thing in the video I posted above).
Here are the values for the push button:

Here are the values in the Generic Remote:

Glad you sorted it out ! For the record, here is another way to send multiple messages with a single widget : Two or more osc address on a toggle button (it may look more complicated but I think it’s easier to understand and maintain).

1 Like