Hoping somebody can shed some light on this as I take a crash course in GP.
How would one modify this Helix Native script to make snapshot selection work with the AU plugin version (not VST3)?
I swapped the VST3 plugins to AU, reallocated the script handle and then recompiled all scripts but the script didn’t work as expected. The wah auto-engage component worked fine with AU after my modification. Only the snapshot selection wouldn’t allow radio button-like selection. See message log below:
Message Log:
Recompiling scripts
Compiling GLOBAL RACKSPACE
Done
Compiling Helix Snapshots
Done
Helix Snapshots (Script Entity: Rackspace) - Array index out of bounds: index (zero-based) = -1: Current array length = 8
No source information available - check GPScript options
I don’t understand why this doesn’t work. Both Helix Native AU and VST3 plugin versions have the parameter “Snapshot Index.” So is there a key difference in the approach to handling GPscripts for different plugins types (AU, VST2, VST3)?
The original script was relying on the “parameter text” provided by Native for the snapshot number e.g. 1 to 8. The AU plugin doesn’t’ return the number (only the parameter value 0.0 to 1.0) so the script is failing.
If you open the “Current Rackspace Script Editor” (via Window menu), replace the final section for “On ParameterValueChanged” with the below code and then click “Compile”.
// Called when a plugin block parameter value has changed
On ParameterValueChanged(parameterNumber : integer, parameterValue : double) from NATIVE
var index : integer = 0
if parameterNumber == SnapshotParam then
index = Round(parameterValue * (Size(BUTTONS)-1))
if GetWidgetValue(BUTTONS[index]) <> 1.0 then
SetWidgetValue(BUTTONS[index], 1.0)
UpdateButtons(index)
end
end
End
@rank13 , Thank you for your clear explanation and the updated script. The snapshots now function correctly with the AU.
But now, when I relaunch the updated .gig file I get this in the message log. I’m not sure if it’s a problem or not:
GLOBAL RACKSPACE (Script Entity: GlobalRackspace) - Warning in “Main”: Line 7, Col 16: Double variable is not initialized:
Helix Snapshots (Script Entity: Rackspace) - Warning in “Main”: Line 15, Col 16: Double variable is not initialized:
They are just warnings.
The second warning is the same script you just edited. If you open the script editor again, on line 15 is this: PreviousTime : Double
To “initialise” it, you could change it to: PreviousTime : Double = 0.0
No problem. I did wonder why I wasn’t seeing those warnings, and interestingly, there is a very specific pref setting available in the Scripting options.
Returning to this topic some time later as I was playing with this script again in conjunction with Helix Native and program changes.
Using the rackspace/variation approach this script works exceptionally well and gives the user a lot more power to control the plugin as if it were the hardware version.
However, if you use the script for a global rackspace to control a single instance of Helix Native, you’ll meet with the problem that the snapshots don’t sync back to snapshot 1 following the execution of a program change. Helix Native always reverts to snapshot one.
Is that something that could be addressed with a script modification? Like some command to the effect of “if a Helix Native preset change is initiated/detected, reset snapshot to 1.” I’m not sure how to go about it and it’s only really practical for one specific use case but I’m just wondering if it is theoretically possible via scripting in GP.