The setValueNotifyingHost() is declared in AudioProcessorParameter, where the parameter exists only as normalised.
Please add to AudioParameterFloat, AudioParameterBool etc a set() method, that is symmetric to get():
void AudioParameterFloat::set (float value)
{
auto normalised = range.convertTo0To1 (value);
setValueNotifyingHost (normalised);
}
void AudioParameterBool::set (bool value)
{
setValueNotifyingHost (value ? 1.0f : 0.0f);
}
void AudioParameterInt::set (int value)
{
auto normalised = range.convertTo0To1 (float (value));
setValueNotifyingHost (normalised);
}
I realise that the operator=
does that, I find the set() method cleaner in the code, since the = requires to be careful with dereferencing. And it would show the symmetry to the get() method.