Best practice or misunderstanding regarding AudioProcessorGraph performance in static graphs?

Hi all,

I’ve read that using AudioProcessorGraph is not recommended in cases where the graph is not supposed to change at runtime. What’s the best way to set a static chain then ? It’s unclear to me. I’ve been using juce::dsp::ProcessorChain so far, but in the end it doesn’t seem to be so standard and is a bit of pain now because I’m trying to include some components that were already written as AudioProcessors in the first place.

Thanks in advance!

juce::dsp::ProcessorChain is the best bet for performance, because it can be optimised at compile time.

You will not be able to get that performance with juce::AudioProcessor because of the virtual calls.

However, the ProcessorChain is not suitable if your graph is not serial (hence chain).

You can still run juce::dsp::Processors e.g through a DryWetMixer, but that doesn’t happen in the ProcessorChain, but you call it manually in your processBlock() (pushDrySamples before running the processor or the chain, and afterwards the mixWetSamples.

TL;DR: if you can afford, rewriting the AudioProcessors into juce::dsp::Processors will help performance.

1 Like

Alright thanks, very clear!