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.