Save Effects and Modulation in Factory Presets
-
Hello guys,
I'm looking to create a sample-based VST which should include 20 factory presets. Therefore I would like to create lots of user presets with all kinds of effects, modulations and more. Currently my problem is, that changing settings within an effect doesn't get saved with the user preset when saving, as no UI component is linked to the corresponding effect/modulation. As the factory presets will go through lots of processing and different effect chains, I want to avoid creating a second interface with linked UI controls just to be able to save the effect chain in the user preset.
Is there any best practice in HISE for saving effects/modulations within an user preset?
I saw the Engine.addModuleStateToUserPreset(var moduleId) function in the Documentation, but actually hoped there would be an easier way such as the SaveInPreset Property of the UI components but for every FX/Modulation/MidiProcessor.Would highly appreciate some help here! :)
-
@Daanyoo You could use a hidden sliderpack on the UI for each effect.
-
@d-healey Is an UI component like a sliderpack mandatory in order to save the state of an effect? My preference would be that I do not have to link the effect/modulations to UI as users will never be able to configure these on their own.
-
@d-healey I also saw this old post from you, where you build some sort of factory preset system: https://forum.hise.audio/topic/324/factory-preset-creator
Do you feel that such an approach would still be suitable for the current state of HISE?
-
@Daanyoo said in Save Effects and Modulation in Factory Presets:
Do you feel that such an approach would still be suitable for the current state of HISE?
No I wouldn't use it, that script is old and I haven't tested it in years.
But as Christoph says in that thread, the scope of a user preset is to save/restore the state of controls on the user interface.
In your case you are wanting to make "presets" that the user has no control over, so perhaps the user preset system isn't that way to go.
Instead you can use another approach. I'll outline what I do, but be warned, it's complicated.
You have a script file that contains an array that contains object that specify the various properties you want for each of your modules. You will have one of these objects per "factory preset". On your UI you have a hidden knob.
Using the knob's value as an array index you can grab the object from the array and set the properties of your modules.
Here is an example of such an array in one of my projects. In my case I'm setting scripts, samplers, and modulators, but the same principle can be used for effects.