Saving parameter state when moving a script

Parameters usually aren’t defined inside an Initialisation function like onLoadIntoSlot.

The function call is likely causing the reset, so moving it outside the function will solve this. To apply the state to the new layer/zones you will need a function that uses setParameter. The normal parameter callback is only triggered when a value is physically changed on the UI or parameter list.

The “Transpose” parameter value can also be assigned to another variable for storage.

To have a look at one of Steinberg’s scripts you can load the Mono Step Modulator midi module, select it and open the script editor at the bottom. They left it open so we can have a look inside.