ValueTree(Slider/ComboBox/RadioButtonGroup)Attachment on github


Hi all,
on the weekend I created three attachment classes to connect nodes in a ValueTree to GUI components.

They work basically the same as AudioProcessorValueTreeState::SliderAttachment, except that they don’t connect AudioProcessorParameters (visible to host), but normal ValueTrees. ValueTrees are great to serialize a state to a file or memory blocks (like AudioProcessor::getStateInformation).

At the moment it supports sliders, ComboBoxes and RadioButtonGroups (any buttons supporting toggleState).

Let me know, if you find any errors, improvments or any feedback is welcome.

It was inspired by this conversation:

Correct way to connect ValueTree to Components created at runtime?

cool stuff. I hacked together a similar thing for a Label, if you’d like to add it to your repo

ValueTreeLabelAttachment.txt (4.5 KB)


Hi @olilarkin, that’s great. I added it and did an example in the playground there…
cool is also, with your labelAttachment you can change even items in a combobox, if you attach it to the same node…
Great addition, thanks again