I just started learning JUCE recently to help a friend implement a simple VST plugin for MIDI related re-mapping and visualization.
First off, in case it doesn’t get mentioned enough, great job on the framework itself. I found it a breeze to get setup and running basic plugin functionality with in my DAW. I was actually surprised how straight forward it was.
Through the tutorials, docs and community, I am slowly coming to grips with the power provided by the framework and appreciating it more and more. To all those who have contributed directly, or supplemented it by being active participants in the community, give yourselves another pat on the back. You deserve it!
Now to my actual question :-
Is there some type of standard thread-safe data structure that one could use for 2 way communication between multiple Editors and a single Processor? A recommended approach to doing this in general? Or is it more nuanced to the specific usage?
From tutorials and past forum topics, I have seen a few different things. From the use of atomic variables, locks/critical sections, lock free FIFOs to the AudioProcessorValueStateTree (APVST).
I guess I was looking for a general purpose “thread safe” Value State Tree implementation, and was wondering if the APVST was just this, or if it was something more specific to the parameters that are exposed and saved out with the DAW state.
So if the editors/processor maintained a reference to a Value State Tree and were able to read/write to it on their own threads, or register listeners for value state changes. Without
completely falling over each other in the process. Maybe just be wishful thinking on my part? Thought I would ask anyways in case I was overcomplicating things by considering thread safety on a case by case basis, or whether this is kind of expected.
Apologies in advance if this has been discussed a lot already and I missed out on drawing a clear conclusion from those conversations.