Connection of ValueTreeState in editor and processor

Hi everyone,
I’ve been following along the tutorials on ValueTrees, saving and loading the plug-in state.
Although I’ve been following along solidly, I have one small ambiguity that I can’t seem to solve. In the tutorial, both the processor and editor have their own AudioProcessorValueTreeState. The editor has one called “parameters”, and the processor has one called" valueTreeState".

I cannot seem to find the point where the two link/communicate. That is, how does the editor relay the information to the processor regarding this? As far as I can see, in the example code, the editor never directly references the processors AudioProcessorValueTreeState, or vice versa.

Are the two instances essentially the same, pointing to the same object in a way?

I would greatly appreciate any clarification.

Which tutorial are you referring to?

“Saving and Loading your Plug-In State”
https://docs.juce.com/master/tutorial_audio_processor_value_tree_state.html

OK, in that tutorial the editor has a reference to the same AudioProcessorValueTreeState instance as the processor. (AudioProcessorValueTreeState parameters versus AudioProcessorValueTreeState& valueTreeState.)

1 Like

Ahh I see. So they are equivalent!
Thank you very much :slight_smile: