Can anyone point me to a good scripting tutorial? I did see one on the GP youtube channel but I can’t seem to find it now.
Thanks
Can anyone point me to a good scripting tutorial? I did see one on the GP youtube channel but I can’t seem to find it now.
Thanks
What do you want to achieve?
There are so many aspects in scripting, there is no “optimal” tutorial.
I have a delay plug in that displays delay time in note durations which is linked to the BPM of GP. However the plugin only returns values of 1 to 0 ito the widget. I want to create a script that reads the 0 to 1 value and assigns the correct note duration for that value.
I’m not new to scripting, I just need to see the fundametals of how GPScript works and I can figure out the rest.
Cheers
So I figured it out. I found the video eventually and was able to figure out the script I needed.
This script reads the value from the widget that is mapped to the delay time on the Valhalla plug-in and sets the widgets label to match that of the plugin.
//$<AutoDeclare>
// DO NOT EDIT THIS SECTION MANUALLY
Var
VHDelay : PluginBlock
VDelayL : Widget
VDelayR : Widget
Function SetWidgetTitle(WidgetId : Widget,ValueId : double)
Select
ValueId < 0.1 do SetWidgetLabel(WidgetId, "1/64")
ValueId < 0.2 do SetWidgetLabel(WidgetId, "1/32")
ValueId < 0.3 do SetWidgetLabel(WidgetId, "1/16")
ValueId < 0.4 do SetWidgetLabel(WidgetId, "1/8")
ValueId < 0.5 do SetWidgetLabel(WidgetId, "1/4")
ValueId < 0.6 do SetWidgetLabel(WidgetId, "1/2")
ValueId < 0.7 do SetWidgetLabel(WidgetId, "1/1")
ValueId < 0.8 do SetWidgetLabel(WidgetId, "2/1")
ValueId < 0.9 do SetWidgetLabel(WidgetId, "4/1")
ValueId <= 1 do SetWidgetLabel(WidgetId, "8/1")
End
End
on widgetValueChanged(newValue : double) from VDelayL
SetWidgetTitle(VDelayL,newValue)
End
on widgetValueChanged(newValue : double) from VDelayR
SetWidgetTitle(VDelayR,newValue)
End
I’m so impressed that I was able to do this within this software, MainStage doesn’t even come close.