probably a simple fix, i have a simple soft clipper plugin that works perfectly. Except for the fact that when i close the plugin in my DAW and re-open the same instance the values have reset back to default.
It’s probably a really simple fix but i appreciate any comments! cheers.
What do you do in your setStateInformation / getStateInformation callbacks? This is the place where the DAW asks the plugin to serialise its state on session saving and to restore a state on session restoration.
When you say you close and reopen the plugin do you just mean you close the GUI? In which case I don’t think the set/get StateInformation stuff will make any difference since the same plugin instance is still running.
Are you setting the parameter values from the GUI side (PluginEditor, etc.) when it’s opened?
It may also be that you just haven’t told your GUI widgets to update their values when the GUI is first loaded. So the actual parameter values are correct but the displayed values are wrong.
In most hosts, the GUI editor will be completely destroyed and recreated again when you close and reopen the GUI. So, you will need to ensure your GUI keeps track of the parameter values in the AudioProcessor. Instead of manually handling the parameter states (with sliderValueChanged etc), you might want to look into using the AudioProcessorValueTreeState and the parameter attachments for the editor components.
I had this exact same problem, and it turned out that in my editor, I had created all my components with initial values. Make sure that in your editor’s constructor, if you’re initializing the values of any sliders or anything like that, do it by polling processor->parameter->get() instead of assigning it to an arbitrary value