Juce::dsp::convolution crackling at higher sample rates

Hello Everyone,

I have been building a guitar amp simulator and for the reverb I am using the juce::dsp::convolution class. For some reason, the plugin crackles at higher sample rates (88.2k,96k), but not at lower ones. I have been setting my block size low (32 samples), however I have tested it against another commercial guitar amp plugin so I am confident that it is an issue with my implementation of the JUCE convolution class.

Here is the following code I am using:
in the header file:

juce::dsp::ConvolutionMessageQueue queue;
 juce::dsp::Convolution reverbConv{ juce::dsp::Convolution::NonUniform {2048}, queue};

and then In the process block:

    //Getting number and Size of IR
    irNumber = *apvts.getRawParameterValue("REVERBSELECTOR");
    juce::String irName = BinaryData::namedResourceList[irNumber];
//    DBG(irName);
    irData = BinaryData::getNamedResource(irName.toRawUTF8(), irSize);

    audioBlock.copyTo(temp);
    if (*apvts.getRawParameterValue("REVERBYPASS") != true)
    {
        // Update IR if it has been changed in GUI
        if (irNumber != currentLoadedIr)
        {
//            DBG(irNumber);
//            DBG(currentLoadedIr);
            loadIR();
            currentLoadedIr = irNumber;
        }

        updateReverbEq();
        reverbConv.process(context);
        reverbLP.process(context);
        reverbHP.process(context);
    }

If anyone has any suggestions or has encountered the problem before, I’d love to hear them! It’s also worth mentioning that in prepare to play I am just passing it the spec object which uses the sample rate values from that.

Thanks!
Noah

the plugin crackles because the CPU overloads: the convolution uses more CPU at higher samplerates. Lower blocksizes further increase CPU usage.
The JUCE convolution is not the most economic convoluter on the market, but you can try set the latency of it longer, so that it tones down its CPOU usage.

Gotcha thanks for the tip!

I instantiated it the following way:

juce::dsp::Convolution reverbConv{juce::dsp::Convolution::Latency {128}, queue};

Just out of curiosity, does anyone know why one cannot initialize a convolution object to be non-uniform and have a fixed latency size? I am probably missing something but I am just curious!