Script for using the PANIC

So, we have the Panic added to GP Scrips in 2.0.18 but I can’t get my head around how to use this with a widget…
Maybe too simple; appreciate the help!

Panic : Stop all notes in the current rackspace
* Declaration: function Panic ()
* Category: MIDI

Not sure I understand the difficulty.

var
foo : widget

On WidgetValueChanged(newValue : double) from foo
Panic() // Any time widget value changes, trigger an AllNotesOff panic
End

Great! yeah too easy, the kind of thing “under your nose” and you can’t find it…

Thanks again @David!!

ok — if you have any insight as to why this seemed hard to figure out, it would be useful to get your thoughts so we can perhaps address it in a knowledge-base system.

I don’t know, maybe its just the cloudy weather or a one time bad day…
did not go for the evident; and its the lack of knowledge background in this scripting adventures.

For me, I think only with plenty of examples and use cases.
It’s the willingness to go for uncharted territories.