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 parameterIndex. It 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!