I’m using the radio buttons script and would like to send specific CC’s ONLY for the button that is ON (value 1.0). Currently in the script, the widget values are grouped together. In my case S1, S2, S3 and S4. I’m only pasting the 2nd half of the radio buttons code for this example. Is there a way to send CC11 when S1 is active, CC12 when S2 is active, CC13 when S3 is active and CC14 for S4? I can’t do another On WidgetValueChanged for those buttons since they have all been declared already. Does the code have to be ungrouped and do individual On WidgetValueChanged for each button? Or is there a way to incorporated into this neat grouped call?
var sceneblock : MidiInBlock S1, S2, S3, S4 : Widget //Radio Buttons: Called when any of several widgets changed On WidgetValueChanged(w : Widget, index: integer, newValue : double) from S1, S2, S3, S4 var i : integer if newValue == 1.0 and index <> u_last then // Deselect other buttons for i = 0; i < Size(u_buttons); i = i + 1 do if i <> index then SetWidgetValue(u_buttons[i],0.0) end end u_last = index end //Radio Buttons: Prevent a button to be switched off manually If newValue == 0.0 and index == u_last Then SetWidgetValue(u_buttons[index],1.0) End If newValue == 1.0 Then end End