Attach value to AudioProcessorValueTree

#1

I managed to attach all my Sliders, Buttons and Comboboxes via the -Attachement classes but am puzzled with the other components.

I can attach a Listener, but from what I understand the Listener listens to the AudioProcessorValueTree and not the other way around?

0 Likes

#2

I marked this solved earlier, because I thought I had it figured out when I didn’t.

My approach so far is:
call AudioProcessorValueTree::state::setProperty(), however the property doesn’t seem to change, am I missing something or is this the wrong approach overall?

0 Likes

#3

Can you provide some example code showing us exactly what you’re doing?

0 Likes

#4

I was trying to find a way to connect any parameter that is not a Slider/Button/Combobox to the ValueTree. I found a solution like this:

  1. Give your component a reference to your AudioProcessorValueTreeState m_value_tree
  2. Every time the value changes call

m_value_tree.getParameter(my_variable_identifier)->setValueNotifyingHost(new_value);

I don’t know if this is the indended way, but it seems to work. (note that new_value needs to be scaled to 0…1 )

0 Likes