Is AudioProcessorValueTreeState::Parameter::getText() expected to be passed a normalised or non-normalised value? Unless I misreading the code, it looks like this expectation depends on whether valueToTextFunction is nullptr:
Ah right, so valueToTextFunction expects a non-normalised value, but should effectively return a string representation of the value on a “normalised” scale (in order to be consistent with AudioProcessorParameter::getText) …?
Otherwise if you have a set of parameters, some of which set valueToTextFunction and others don’t, Parameter::getText() is going to return string representations on a mix of normalised and non-normalised scales.
Also: why doesn’t valueToTextFunction take a normalised value?
we expect the host to show the values between 0% and 100%, not between 0% and 1%…
can’t we have that as the default with a simple String (range.convertFrom0to1 (v), 2) ? I can’t see why anyone would want a different behaviour…
then why not renaming the parameter “value” to “normalisedValue” and add a jassert (normalisedValue >= 0.f && normalisedValue <= 1.f) in it?
Those normalised/user values parameters are confusing, better naming would help.