Is there any way to change the default values for a plugin’s parameters?
We allow users to set the default values for certain knobs in our plugin that change the characteristics of the selected “notes” in our graph. This works fine for generating those notes. They get the default value when created. But if you use the knob’s ability to reset those values to their defaults, then they reset to the initial defaults passed in when creating the parameters. But what we’d like is for the knobs to snap to the value the user has set (and can change) in the Preferences for our plugin. But I cannot find any way to set the default value of a parameter other than at instantiation time, which will not allow for changing those values after plugin creation, which happens before reading our preferences file.
So… Is there any way to change the default value after a parameter has been created?
It looks like I can achieve this via the knob (Slider) via setDoubleClickReturnValue(). Is that the expected way to do this, rather than through the parameter itself?
i wanted to implemented the feature of internally letting people change the default values of all parameters and some other types of state, too, and also did that, yes. i removed all of that again though, because all DAWs come with the feature of defining your own default patch and I found it to be confusing from a user perspective to have the burdon on my shoulders to keep in mind that there are basically 3 different default values. the original ones, the user made ones in the plugin, and the user made ones in the DAW.
if you still want to implement this, I found the easiest way is just to make your own processor parameter and implement the function that sets the value to default to read it not from the parameter’s internal default value float, but from whereever you saved the state of your custom default values, which in my case was an xml file in appData