Greetings everyone …
I have a few question related to scripting multple widgets but I have no scripting experience.
Ive looked at some code & I see some rules.
1- Insert widget into the rack then load the script or load script then insert widget in the rack.
2 - The script & every widget label in the highlighted properties must match.
This script by @pianopaul is for a momentary red button …I can change the button type to a different colour but the references to the new button must match the new widget. highlighted
MIN : MidiInBlock
BUTTON : Widget
n : NoteMessage
n := MakeNoteMessage(C3, 100)
on WidgetValueChanged (newValue : double) from BUTTON
if newValue == 1.0 then
ScheduleMidiEvent(MIN, n, 200)
on NoteEvent (n : NoteMessage) from MIN
How would I expand this script to 100 buttons in the same rack? I know i’ll have to create 100 buttons with different names . Would the additional code for the additional buttons appear before the end statement?
Or can I replicate the code , change the characteristics & paste additional script on the after the end statement.