Dynamic reassignment of effect slots
-
@Christoph-Hart
Ok, no they don't. I just checked it. -
Why should we use “addToModuleState”?
Because it stores everything (including audio files & sliderpacks if applicable) and you don't need to reroute components to the new modules.
To save the modulation of the sliders, they have to be “saveInPreset” anyway, right?
No. The modulation connections are not part of the slider's data model. For loading / saving matrix connections you just use this method and store the string somewhere.
EDIT: Actually you don't need to do this manually, as soon as you create a ScriptModulationMatrix, it registers itself and writes / loads its state from user presets.
-
@Christoph-Hart aww man I just did it all manually
-
@Christoph-Hart
Great, thanks for the info. :-) -
Does any kind soul have a snippet that demonstrates how to use Engine.addModuleStateToUserPreset???
-
// In onInit Engine.addModuleStateToUserPreset("InsertNameOfModule");
-
@d-healey So Do I have it right then.... call that function for every module that I want to save to a preset.... save to a preset in the browser..... then when I load it, those things will be recalled both in the module tree and the connected UI parameters, regardless of if saveInPreset is enabled????
-
@Orvillain It will be recalled to the module tree, not sure about the UI parameters but Christoph seems to indicate that with this dynamic effect slot system that it will be.
-
@Christoph-Hart
When I try to follow your advice with a HardcodedMasterFX, I get the following error message:
Can't store modules with child modules
Is it not possible to use
Engine.addModuleStateToUserPreset
with a HardcodedMasterFX? -
those things will be recalled both in the module tree and the connected UI parameters, regardless of if saveInPreset is enabled????
It will be recalled to the module tree, not sure about the UI parameters but Christoph seems to indicate that with this dynamic effect slot system that it will be.
No UI parameters are not part of the module that is restored with its state so they won't update automatically. But you can call this method after loading a user preset to ensure that all connected sliders are synced to their internal values:
Is it not possible to use Engine.addModuleStateToUserPreset with a HardcodedMasterFX?
Do you have any modulation slots enabled? If yes then this is preventing you from restoring the hardcoded FX because currently you can only restore modules that have no child modules with this function. But I might have to change this to allow it for hardcoded modules as this would be very limiting.
-
@Christoph-Hart
Ah, okay, that's where the problem lies...
Yes, I have enabled modulation slots. -
@Oli-Ullmann Alright this is fixed now - you can call this on modules with child elements now but the child elements will not be modified at all - the rule that rebuilding child elements is dangerous still stands, but this is a valid use case to restore a module without its modulation slots (which are restored by the script modulation matrix anyways).
-
@Christoph-Hart
That's great, thanks! I'll try it out and give feedback if I encounter any problems. Thanks very much! :-) -
@Christoph-Hart said in Dynamic reassignment of effect slots:
What if the controls are not connected by Parameter ID etc but via scripting instead (as lots of mine are as they do more than one job...)