Hi,
I’m looking to swap the min/max values on some sliders in my plugin, similar to how the Q Parameter functions in Brainworx’s SSL Channel Strip:
I’ve managed to draw the slider in reverse and calculate the desired value in processBlock()
using the following code:
float parameterValue = apvts.getParameterRange(parameter_id.getParamID()).end - parameterParam->load() + apvts.getParameterRange(parameter_id.getParamID()).start;
Now I have the following difficulties:
- In
juce::AudioProcessorValueTreeState::ParameterLayout
, if the default value was the maxValue before, it now has to be the minValue. This makes sense but feels a bit odd to me—though it’s an easy fix. - In the DAW, the parameter shows a different value than in my plugin. For example, my plugin might show 3.5 while the DAW shows 0.5 because I’m interpreting the value differently in my plugin.
How can I address these discrepancies? Would it be better to implement this functionality differently altogether?