Parameter hierarchy

Is it possible to use parameter hierarchy in JUCE? For instance if we have several channel strips in a plugin, is it possible to have a way of getting all parameters of one channel strip in another AudioProcessorValueTreeState?
It could also help making A/B comparisons at some point?

The AudioProcessor class owns parameter objects (it stores them in an OwnedArray). Obviously, this is just one big, flat array. But, you can store raw pointers to the AudioProcessorParameterWithID objects in one or several different structures (Arrays, HashMaps etc) depending on how you might need to access the parameters for different scenarios. You could also use carefully crafted ids which makes finding a parameter using AudioProcessorValueTreeState::getParameter() straightforward (although calling this frequently might not be the best approach as it does an exhaustive search to find the parameter with the matching id).

1 Like

Well, I like the AudioProcessorValueTreeState because it handles everything, but it seems that its parameters are stored flat, you can’t have a real tree. It would be nice to be able to extract part of the tree for a channels trip for instance, so that we can organize parameters that are similar.
I may end up rewriting my own AudioProcessorValueTreeState…