Midi Panic Button

Hi! A better way to ask this would be:
What message should I send to my DAW to stop notes that are stuck?

Answer:
After creating a button widget, do the following:
1. Set the button to "push" (inspector > button > mode)
2. Add the following code (inspector > scripting > onValue).

if (value === 1) {
	for (var ch = 0; ch <= 16; ch++) {
    	for (var note = 0; note <= 127; note++) {
		send('midi:SKiano-D','/note',ch,note,0)
		}
 	}
}

Don't forget to replace "SKiano-D" with the MIDI port that will be carrying the message to your DAW (asuming Cubase 12). Also, make sure that the same port has a check mark in the [in 'All MIDI Inputs'] column (go to Studio > Studio Setup... > MIDI Port Setup).

That's it... It's not the best method to release stuck notes, but it will work in other DAWs as well (as long as the track is set to receive notes from the MIDI port you used in the script).

Another way would've been to use Generic Remote or MIDI Remote to associate the output of a button widget (in O-S-C) to MIDI > Reset command (in Cubase). To learn (or remember) how to do this, read again the guide I wrote (this guide - "Long post").

1 Like