AudioProcessorListener::audioProcessorParameterChanged is called each time a parameter is changed from Processor, but not if the host change a parameter...
Before juce 3.2, I used AudioProcessor::setParameter to put some code to update audio variable updates or something else. But now I'm using the new AudioProcessorParameter class.
I am new to juce, surely I'm missing something obvious.
mmh an ugly hack, I had to change AudioProcessor::sendParamChangeMessageToListeners to public, and call it in my param class to call sendParamChangeMessageToListeners from setValue()...
Is there a correct way to do it without changing juce?
There is nothing stopping you from forwarding the AudioProcessorParameter's setValue callback to your AudioProcessor. All you need to do is to have your AudioProcessorParameter subclass store a pointer to your AudioProcessor.
I have little sample code on a private repo which does exactly this. It will call a changeParameter method on the AudioProcessor which does nothing in my code but could re-calculate some DSP if necessary.
Thanks Fabian, I do not call to ProcessorEditor from setParameter/setValue, I have solved this way: I created a Listener on my BaseParam, so AudioProcessor inherits from BaseParam::Listener, it calls PluginAudioProcessor::onParamChange(BaseParam *param), no locks no threads... it calls from parameter::setValue(), I don't know if it is the correct way for update coefficients witch complex and heavy maths...
To comunicate to Gui, I use timercallback from Editor.