ValueTree explained/examples?


#1

Here in https://youtu.be/YW1HS-hQY78?t=36m11s from the JUCE ADC, the speaker mentions solving event listener hell problems with using ValueTrees. Who’s got some good examples of using ValueTree’s to avoid using callbacks?


#2

I’m not sure about simple examples, but I recently learned to utilise them by reading through the Projucer source. They are used throughout the source, but if you look at how the appearance settings code works it might get you started. They really are neat, but not the kind of thing you need for simple stuff, which I guess explains why they aren’t many simple examples.

https://github.com/julianstorer/JUCE/blob/master/extras/Projucer/Source/Application/jucer_AppearanceSettings.cpp
https://github.com/julianstorer/JUCE/blob/master/extras/Projucer/Source/Application/jucer_AppearanceSettings.h


#3

The AudioProcessorValueTreeState class is a good a example too. You can essentially attach sliders, buttons and combo boxes to ValueTree objects and they then automagically keep each other up-to-date.