In the past I’ve written some plug-ins with a few parameters with the old get/setParameter functions and a switch of the index in each of these.
I’m now trying to use the new AudioFloatParameter class and addParameter in the AudioProcessor’s constructor.
My question is about retrieving the values (I’m just using the hosts default GUI for now to test things). Say I have a delay class which I which I want to write into to change the delay time when the host GUI is changed. Previously I’d pick up the index and value in setParameter and pass down into my delay class here, subsequently being picked up in processBlock.
From the JUCE examples, I’m thinking I now need to do this in processBlock. Indeed this works, but is this correct? If there were then multiple parameters, I’d have to be updating all of them regardless in processBlock, which seems inefficient when that’s not the parameter being changed. Wasn’t this avoided using the old ‘setParameter’ through the switch (maybe this was inefficient though and I just didn’t realise?!)
Have I just misunderstood something here?!
Any help greatly appreciated.