Hi, bit confused about some of the intended functionality of these classes.
For example, using the AudioParameterInteger class is the intention to be able to do things like:
Set min and max to -64 and 63, then call setValueNotifyingHost with a value in this range, or am I expected to normalise this to a 0…1 range myself? Are -ve values valid for min/max or is everything expected to be +ve?
setValueNotifyingHost must be called with the normalized value (0.0-1.0) which is a bit inconvenient…I wonder if that is an oversight or if there is some good reason for that.
yes, seems to defeat the purpose of specifying a min/max range - if they aren’t used to normalise input/output, what are they actually for?
A late reply but I realized the Juce subclasses of AudioProcessorParameter implement the = operator which do both the parameter range conversion into the normalized range and the setValueNotifyingHost call. The documentation for some reason omits mentioning that.
AudioParameterFloat& AudioParameterFloat::operator= ( float newValue )
Changes the parameter’s current value.
AudioParameterFloat& AudioParameterFloat::operator= (float newValue)
if (value != newValue)
setValueNotifyingHost (range.convertTo0to1 (newValue));
No mention of it making the setValueNotifyingHost call with the converted value…