Attaching other parameters to a ValueTreeState

Hi, I have a bunch of sliders / combo boxes and buttons attached in my plug-in editor, and everything works great with the processor. I’m currently building an EQ with XY coordinates that I want to associate them with the processor. I don’t mind adding X & Y separately, but I want to know how I use the same kind of AudioProcessorValueTreeState setup.
It only has ‘ButtonAttachment’ & ‘SliderAttachment’ etc? Is there a way of doing this with non standard components? It seems obvious at first, but I can’t find it, sorry.

There are two ways to do it, the easiest is to create two invisible sliders, that you connect using the SliderAttachment, and then you can use the two Value objects of the sliders as model of your drawing, connecting to it using Value::referTo().

The other is by hand using the AudioProcessorValueTreeState::addParameterListener()

Hope that helps

3 Likes

Thank-you for the swift answer I’m going to try the addParamterListener route as it seems a little cleaner to me.
Thanks again.
Dave H.