I have some settings in my plug-in which should be saved and loaded, but those settings should not appear as parameters in the DAW, since I don’t want to provide automation for this settings.
The save and load works just fine - no problem, I’m doing it this way:
void PluginProcessor::setStateInformation (const void* data, int sizeInBytes)
std::unique_ptr<juce::XmlElement> xmlState(getXmlFromBinary(data, sizeInBytes));
if (xmlState.get() != nullptr)
settingXY = (int)xmlState->getIntAttribute("settingXY", 0);
–> settingXY has the correct value!
I just don’t know how to get the information to the GUI.
In the processor the setStateInformation function triggers and loads the saved settings.
The editor holds a reference to the processor, so I can access the information. But how can I notify the editor that there’s an update?
I’m not sure how that should work with Value::Listener … I mean I’ve used the listener before in the context of a slider, so when the user changes the slider in the GUI I can react to it.
But what I want is the different direction now…
I’ve checked the tutorials https://docs.juce.com/master/tutorial_audio_parameter.html and https://docs.juce.com/master/tutorial_audio_processor_value_tree_state.html but that’s a different situation, because I don’t want the DAW to know this parameters. I think I really only need to find a way to notify the Editor that somehting has changed - then the Editor can call a get function of the processor who provides the information, and I can update the GUI.
Edit: So what I basically want is that the Editor listens to the processor for changes (“event”) and once this triggers, the editor can call the correct processor function to get the information - because I know the processor should be independet from 1-* editors, but the editor(s) have a reference to the processor. Ahm, but how do I implement a broadcast/listener system here?
Hints? thanks in advance