In JUCE the DSPs have a process function that takes an audio buffer reference and process it. So to make a multiband compressor in theory the programmer doesn’t have to re-write the compressor and filters. They can make it by: (assuming 3 bands)
Construct 3 filters
Construct 3 compressors
For every buffer block, copy the block 2 more times, pass them into each filter, call filter->process(buffer) to get the bands
Pass the bands into compressors, call compressor->process(buffer)
Combine the output buffers from the compressors
Here is an example:
(File PluginProcessor.cpp, key functions: SimpleMBCompAudioProcessor::splitBands and SimpleMBCompAudioProcessor::processBlock )
Does FMOD DSPs also have something similar to the process function that takes an audio buffer and outputs the processed result. (Or a way to add DSP callbacks to the out-of-box DSPs)
Thank you for the explanation, while yes this is possible it will be rather messy.
Yes, we do. Both the FMOD_DSP_READ_CALLBACK and the FMOD_DSP_PROCESS_CALLBACK (FMOD API | Plugin API Reference - DSP) which allow you to process an audio buffer.
This is the part where it will get messy:
It would be possible to pass either a built DSP into another or pass the System object which will allow you to build DSP within the ‘top-level’ DSP. However, this could cause race condition issues and other unexpected behavior. In summary, while it is possible to do so, I wouldn’t recommend it - since you’re familiar with JUCE, you may find it easier to implement the filters and compressors yourself, and connect them to the DSP parameters"