Great script, just what i needed to control plugins with limited midi implementation. Here is a variation on the script that uses buttons 1 to 6 for user presets in one plugin and 7 to 12 for presets in another plugin. Now i can change guitars/pickups in Bias fx 2 and amps in Tonex with the push of a button.
var
pad01, pad02, pad03, pad04, pad05, pad06, pad07, pad08, pad09, pad10, pad11, pad12 : widget
lblPresetName : widget
plugin01, plugin02 : PluginBlock
padField : widget array = [pad01, pad02, pad03, pad04, pad05, pad06, pad07, pad08, pad09, pad10, pad11, pad12]
Initialization
var
index, activePad : integer
activePad=0
for index = 0; index < Size(padField); index = index +1 Do
if GetWidgetValue(padField[index]) >0.6 then
activePad=index
end
end
SetWidgetValue(padField[activePad],1.0)
End
// Called when any of several widgets changed
// The widget and index parameters are optional
On WidgetValueChanged(w : Widget, index: integer, pVal : double) from pad01, pad02, pad03, pad04, pad05, pad06, pad07, pad08, pad09, pad10, pad11, pad12
var
actPresetName : string = ""
if pVal > 0.6 then
actPresetName= GetWidgetLabel (w)
SetWidgetLabel (lblPresetName, actPresetName)
if not (ToUppercase(actPresetName) == "EMPTY" or actPresetName == "") Then
//Route pad01 to pad06 to plugin01, pad07 to pad12 to plugin02
if w == pad01 or w == pad02 or w == pad03 or w == pad04 or w == pad05 or w == pad06 then
LoadGPPreset( plugin01, actPresetName)
Else
LoadGPPreset( plugin02, actPresetName)
end
end
end
End