AudioParameterFloat parameter change notification


There is absolute no way to detect a parameter change in this class, also setValue() is private.
(The demos are using some timer-based approach in GenericEditor, which isn’t very cool if you have hundreds of parameters)

Please move setValue to public, so someone can do this

virtual void setValue(float newValue) override
	// do stuff to handle parameter change

Or, if this is not an option, please add a virtual callback

	virtual void valueChanged() {};


	void AudioParameterFloat::setValue(float newValue)
		value = range.convertFrom0to1(newValue);


OK I’ve added a valueChanged callback to the parameter classes on develop with commit 544d328.


A useful addition to that could be to check if the value actually changed:

void AudioParameterFloat::setValue (float newValue)                      
    auto unnormalised = range.convertFrom0to1 (newValue); 
    if (value != unnormalised)
        value = unnormalised;
        valueChanged (get()); 

(edited variable hiding)


Cool, second newValue should be renamed :wink:

Btw: in the meantime i returned to AudioProcessorParameterWithID because I prefer storing the parameter as normalized value for various reasons (mostly get/set integrity)


Ah, silly me :wink:
I’ll edit that…