Reading/writing values lock free to/from processBlock

@kunz

But the problem is that the dsp::IIR::Filter class and processorDuplicator doesn’t provide any methods for updating relevant parameters from the outside world (i.e. frequency, gain and q) so I will need to call the various makeXYZ to provide coefficients.

I don’t see how I can manipulate the coefficients directly in the coefficient’s array in a meaningful way. I will need to claculate them all for every change in freq/gain/q and since they are all recalculated I believed the most efficient way was to replace the filter.state of the processorDuplicator as presented here in the examples that I started out from. But maybe I’m wrong? Is there some more efficient way?

Just to make things clear, all these complications for me, are only valid for the filter types that don’t let med manipulate frequency, gain and q directly. Seems to me it makes things a whole lot more complicated and if I’m to follow the general advice in Juce tutorials not to make a lot of function calls and calculations inside process block I would need to recalculate coefficients outside the process block. That was my impression.

For smoothing it get’s even more confusing for me… Let’s say I would make an ordinary 6-band channel-eq (loshelf, 4xpeak, highshelf). None of the filters would be directly manipulated but would need a makeXYZ-call and adding smoothing to this I end up with an extreme amount of calls inside the process block. For a 128-sample buffer, wouldn’t I end up with 128*6 = 768 calls and reassignments of filter.state for every processBlock for one single channel?

Feels like I’m missing some fundamental design aspect on how to use the IIR-filter and how to set things up.