Var
MIN : MidiInBlock
BT0 : Widget
BT1 : Widget
BT2 : Widget
BT3 : Widget
BT4 : Widget
BT5 : Widget
BT6 : Widget
BT7 : Widget
cc0 : ControlChangeMessage
cc1 : ControlChangeMessage
cc2 : ControlChangeMessage
cc3 : ControlChangeMessage
cc4 : ControlChangeMessage
cc5 : ControlChangeMessage
cc6 : ControlChangeMessage
cc7 : ControlChangeMessage
initialization
cc0 = MakeControlChangeMessage(69, 0)
cc1 = MakeControlChangeMessage(69, 1)
cc2 = MakeControlChangeMessage(69, 2)
cc3 = MakeControlChangeMessage(69, 3)
cc4 = MakeControlChangeMessage(69, 4)
cc5 = MakeControlChangeMessage(69, 5)
cc6 = MakeControlChangeMessage(69, 6)
cc7 = MakeControlChangeMessage(69, 7)
end
// Called when any of several widgets changed
// The widget and index parameters are optional
On WidgetValueChanged(w : Widget, index: integer, newValue : double) from BT0, BT1, BT2, BT3, BT4, BT5, BT6, BT7
if newValue == 1.0 then
if index == 0 then
SendNow(MIN,cc0)
elsif index == 1 then
SendNow(MIN,cc1)
elsif index == 2 then
SendNow(MIN,cc2)
elsif index == 3 then
SendNow(MIN,cc3)
elsif index == 4 then
SendNow(MIN,cc4)
elsif index == 5 then
SendNow(MIN,cc5)
elsif index == 6 then
SendNow(MIN,cc6)
elsif index == 7 then
SendNow(MIN,cc7)
end
end
End
I don’t want to be a PITA but it seems to me that the entire script you wrote can be more simply written like this:
Var
MIN : MidiInBlock
BT0 : Widget
BT1 : Widget
BT2 : Widget
BT3 : Widget
BT4 : Widget
BT5 : Widget
BT6 : Widget
BT7 : Widget
// Called when any of several widgets changed
// The widget and index parameters are optional
On WidgetValueChanged(w : Widget, index: integer, newValue : double) from BT0, BT1, BT2, BT3, BT4, BT5, BT6, BT7
if newValue == 1.0 then
SendNow(MIN, MakeControlChangeMessage(69,index))
End
End
Follow up question… If there is a button for each device in the Helix Native chain, is it possible for the buttons to update the state of each device state when changing snapshots via the buttons in GP4?
It’s possible (right click the device in Native and use Automation Bypass), but I’ve found it gets messy trying to do both. For example, the manual button changes would end up being stored in the snapshot.
My preference is to do one or the other. Either (1) use the Native snapshots, or (2) map individual effects to widgets and then use GP variations instead. My 2 cents.