ProcessorDuplicator - how to?

Yes your approach looks good except for a single line. You need to dereference the filter state, as each mono filter has a pointer to the state of the ProcessorDuplicator:

auto loCoeff = dsp::IIR::Coefficients<float>::makeLowShelf (sampleRate, loFreq, loQ, 0.25);
*filter.get<0>  ().state = *loCoeff;
auto hiCoeff = dsp::IIR::Coefficients<float>::makeHighShelf (sampleRate, hiFreq, hiQ, 0.25);
*filter.get<1>  ().state = *hiCoeff;

In general, what may be confusing is that some filters in the dsp module are multi-channel and some are only mono and need to be duplicated (like IIRFilter and FIRFilter).

2 Likes