AudioProcessorValueTreeState GUI Attachments


#1

I've been experiementing with the new enticing processor parameter managment objects. It looks really promising but I've come accross a vexing issue regarding the gui AudioProcessorValueTreeState gui attachments. It seems that when attaching a slider to the state, AudioProcessor::setParameter(int parameterIndex, float newValue) is only invoked upon moving the slider. This would be fine except that I haven't found any way to access the state's parameters via parameterIndexIt seems that every AudioProcessorValueTreeState method uses the String ID as the "key". Is there something I'm completely disregarding?

Specifically what I have in mind:

- use the given gui attachments

- when AudioProcessor::setParameter() is invoked, take the normalized range [0, 1] and use the NormalisableRange built in to the AudioProcessorValueTreeState::Parameter to map newValue to it's full unormalized range. Then call setValue() on the parameter, updating all Listeners of that parameter.

I'd rather not make an array of string IDs and use an enum list to access them. Redundancy is what I'm trying to reduce :) Any tips?

Go juce team!

RP


#2

IMHO these classes need a whole redesign, sorry, even when it makes things incompatible.

(This classes were just introduced, so i hope there is a chance)

The parameter should be stored as the normalized values (to prevent rounding issues, if the processor sets a value, and gets a different value later)

Instead there should be accessor-functions for the real values. (There could be meta-data like the range, "ID", stored in the Chunk, so if the range

will changed later, the values will be rescaled when the plugin-state is set)

also i think it would be cool if AudioProcessParamterBool/Float/Choice & AudioProcesserValueTreeState would work together

This would be a real benefit. 


 

 


#3

Another suggestion i have is

AudioProcessParameterHertz, for a logarithmic storage of a frequency (maybe 0,0001Hz - 192kHz) and something like AudioProcessParameterVolume


#4

In what way do the folks at Roli use the AudioProcessorValueTreeState gui attachments ?


#5

I would also love to see some example code for AudioProcessorValueTreeState as well. Perhaps integrated into the audio plugin demo example.

I'm getting hung up on where to store my GUI attachments. I would love to use the AudioProcessorValueTreeState::addParameterListener method to manage my attachments but it takes an AudioProcessorValueTreeState::Listener* as a construction argument. The AudioProcessorValueTreeState::_____Attachment classes themselves are not Listeners. They have a private Pimpl member which inherits AudioProcessorValueTreeState::AttachedControlBase but this cannot be accesed nor instantiated because it is private. How are we expected to use AudioProcessorValueTreeState::addParameterListener?


#6

All of the equator UI widgets use them to control things.


#7

What, then, is parameterIndex used for in AudioProcessor::setParameter(int parameterIndex, float newValue) in the Equator AudioProcessor?


#8

That's an old way of setting the parameter values - the method will be deprecated eventually, but some people are still using it.