Dual-Mono EQ Processor

Hi everyone,

I am trying to create a dual-mono EQ processor. I know how to use ProcessorDuplicator to make a mono processor into stereo instance, and I would separate the left and right channels. How would I do so?

Thank you,
Andy

I’m still stuck. I had the idea of trying to split the ProcessorDuplicator some how, and or configuring the channel busses, and I haven’t found the right way. I’d love to hear y’all’s insights! Thank you.

Hi, I assume you are stuck with converting an AudioBuffer into two ProcessContext objects, in order to process both with two separate IIR filters.
You can do this by converting your stereo AudioBuffer to an AudioBlock:
AudioBlock stereoBlock (buffer);
and then get two subblocks from it:

auto leftBlock = stereoBlock.getSingleChannelBlock (0);
auto rightBlock = stereoBlock.getSingleChannelBlock (0);

Create a context from each, and process them by their corresponding filter object.

Hey, here is what I have in my processBlock:

ScopedNoDenormals noDenormals;
auto totalNumInputChannels  = getTotalNumInputChannels();
auto totalNumOutputChannels = getTotalNumOutputChannels();

dsp::AudioBlock<float> stereoBlock (buffer);

auto leftBlock = stereoBlock.getSingleChannelBlock (1);
auto rightBlock = stereoBlock.getSingleChannelBlock (2);

updateLeftShelf8k();
updateRightShelf8k();
updateLeftBell4k();
updateRightBell4k();
updateLeftBell2k();
updateRightBell2k();
updateLeftBell1k();
updateRightBell1k();
updateLeftBell500();
updateRightBell500();
updateLeftShelf250();
updateRightShelf250();
    
leftShelf8k.process(dsp::ProcessContextReplacing<float> (leftBlock));
rightShelf8k.process(dsp::ProcessContextReplacing<float> (rightBlock));
leftBell4k.process(dsp::ProcessContextReplacing<float> (leftBlock));
rightBell4k.process(dsp::ProcessContextReplacing<float> (rightBlock));
leftBell2k.process(dsp::ProcessContextReplacing<float> (leftBlock));
rightBell2k.process(dsp::ProcessContextReplacing<float> (rightBlock));
leftBell1k.process(dsp::ProcessContextReplacing<float> (leftBlock));
rightBell1k.process(dsp::ProcessContextReplacing<float> (rightBlock));
leftBell500.process(dsp::ProcessContextReplacing<float> (leftBlock));
rightBell500.process(dsp::ProcessContextReplacing<float> (rightBlock));
leftShelf250.process(dsp::ProcessContextReplacing<float> (leftBlock));
rightShelf250.process(dsp::ProcessContextReplacing<float> (rightBlock));

This setup makes sense to me, but Xcode does not show the bottom chunk of code in color, as it normally would if the function were working. In my PluginProcessor.h, I removed all of my processor duplicator lines, that used to look like this.

dsp::ProcessorDuplicator<dsp::IIR::Filter <float>, dsp::IIR::Coefficients <float>> leftShelf8k;

How do I solve this problem? Thanks for your help!