-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariationLoader.gpscript
More file actions
26 lines (19 loc) · 905 Bytes
/
variationLoader.gpscript
File metadata and controls
26 lines (19 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var PresetLabel : Widget
var SynthPlugin : PluginBlock
var Var0, Var1, Var2, Var3, Var4, Var5, Var6 : Widget
On WidgetValueChanged(w : Widget, index : integer, newValue : double) from Var0, Var1, Var2, Var3, Var4, Var5, Var6
var label : string
// the selected radio has val: 1, the delselected also fires with val: 0
If GetWidgetValue(w) > 0 then
SetVariation(index)
end
if index < Size(presets) then // load the preset from the array, activate the plugin and set the label
SetPluginBypassed(SynthPlugin, false)
LoadGPPreset(SynthPlugin, presets[index])
label = ReplaceString(presets[index], "_", " ", false)
SetWidgetLabel(PresetLabel, label)
else
SetWidgetLabel(PresetLabel, "Index OOB") // let the user know they've gotten ahead of themselves
SetPluginBypassed(SynthPlugin, true)
end
End