Is it acceptable to store a plugin’s state in a ValueTree and attach both the Editor and Processor to the ValueTree’s properties using ValueTree::getPropertyAsValue? I am asking this because of the following comment in Juce::Value
Important note! The Value class is not thread-safe! If you’re accessing one from multiple threads, then you’ll need to use your own synchronisation around any code that accesses it.
In my case the Editor will read & write to the ValueTree, but the Processor thread will read only.
I do not wish to expose any automation parameters to the host, so AudioProcessorParameter feels like the wrong solution.
Are there any common design patterns for attaching Editor & Processor to a ValueTree state?
Perhaps each thread should have a CachedValue for each property on the ValueTree? Or each thread could have its own deep copy of the ValueTree and I could use ValueTreeSychroniser…?
Any & all suggestions greatly appreciated.