Script query and possible bug

Hi there. I have a push widget with norelease=true. A script widget sends out:

JS{{
send(false,'/control', 1,33,10)
send(false,'/control', 1,10,20)
}}

I must be missing something, as the two control messages are sent out twice, on push, and also on release. It appears norelease is ignored.

also, would you please tell me the correct syntax for a midi note. This is giving me grief:

JS{{
send(false,'/control',1,32,1)
send(false,'/note',1,24)
}}

And lastly a possible bug. If you change the id of the push widget after the script widget has been created, then go to the script and change the value to match the push widget (e.g. @{id_of_push_widget}), the script breaks.

Cheers

the two control messages are sent out twice

send(false,'/note',1,24)

You need a third argument (note velocity) to make it work.

And lastly a possible bug [...]

A bug indeed, not only affecting the script widget. it will be fixed in v1.

silly me, of course. Thank you.

Lastly, I'm not sure of the best way to add my scripts to my session. I am generating the buttons from the custom module. If the buttons should have multiple messages, I generate the scripts that accompany the buttons. It's all working well, but I'm not sure of the best way to add the scripts to my session. I want them to be hidden, so am adding this to them:

css: ':host {display:none;}',

and later on I'm doing this:

receive('/EDIT', 'panel_1', { widgets: Object.values(scripts) })

But I feel this is ugly. What would be your advice in this respect? Create some kind of hidden panel to populate with the scripts? I guess in v1 with the tree this will be more elegant? Also as I understand, each button will have a JS field that I can simply add the script info? But for now, yeah, what would you suggest?

Thanks for your time.

For now hiding the scripts is a legit solution :). In v1 scripts are always hidden, and all widgets will have a built-in script bound to their value so yeah this should help a bit !