Hello everyone,
I’ve encountered a very annoying error while linking my Sliders to ValueTreeStates.
First of all, I made a private tree for the Values in my PluginProcessor with a public getter for it
AudioProcessorValueTreeState& Z_reeseAudioProcessor::getTreeState() {
return *state;
}
Everything worked fine, till I tried to initialize my SliderAttachments
volumeAttachment1 = new AudioProcessorValueTreeState::SliderAttachment(p.getTreeState(), "volume1", *volumeSlider);
attackAttachment1 = new AudioProcessorValueTreeState::SliderAttachment(p.getTreeState(), "attack1", *attackSlider);
releaseAttachment1 = new AudioProcessorValueTreeState::SliderAttachment(p.getTreeState(), "release1", *releaseSlider);
The weird part is, that it worked fine when I build it for the first time and tried it out in my DAW (I’ve already set up the saving etc.) and it saved everything perfectly.
It actually started to bug out when I started initializing more SliderAttachments
For Example these:
volumeAttachment1 = new AudioProcessorValueTreeState::SliderAttachment(p.getTreeState(), "volume1", *volumeSlider);
attackAttachment1 = new AudioProcessorValueTreeState::SliderAttachment(p.getTreeState(), "attack1", *attackSlider);
releaseAttachment1 = new AudioProcessorValueTreeState::SliderAttachment(p.getTreeState(), "release1", *releaseSlider);
So, to be more precise, it started to not load the VST again after I closed it (Error)
After removing the inits with the declarations, It kept crashing the VST after reopening it
(So, in conclusion: when I open the VST for the first time, it works perfectly fine, but when I close the window and reopen it, it doesn’t load it)
Does any1 know how to fix this error? I’m completely clueless…
