Hi all, l’m relatively new to JUCE and after successfully creating some audio plugins l’ve come across this -l suppose- very basic problem… l’ve searched around in the forum but still don’t know how to solve it
Right, so the problem is simple… (l’m using Logic btw but l’m guessing it’d be the same in other DAWs): when l load the plugin in the channel strip it works fine, l change the sliders’ values, and when l close it and reopen it the values are preserved… however, when l save the session and open it again the next day, the plugin values are set to their default. (this also happens when l drag the plugin to a different position).
Just for reference, l’m creating the variable ‘value’ in PluginProcessor.h inside the public section like this
public:
// a lot of default code
double value;
and then initialising its value inside PluginProcessor.cpp
Effect1AudioProcessor::Effect1AudioProcessor()
// default code
#endif
{
value = 0;
}
l have to give it an initial value otherwise it would throw an error, but l suppose here is where the value gets reset each time… now l’ve looked for similar posts in here and l’ve read a lot about ValueTreeState and l guess l should dig deeper into that to solve this problem, but l just wanted to know if l’m not missing something obvious here before l dive into it, which can be quite long…
Okay that’s all really, sorry for the long post about something that l reckon must be simple as you start learning more… thanks for any advice