quantumVERB  1.0.0
A FOSS convolution reverb plugin
reverb::MainPipeline Class Reference

#include <MainPipeline.h>

Inheritance diagram for reverb::MainPipeline:
Collaboration diagram for reverb::MainPipeline:

Public Types

using Ptr = std::shared_ptr< MainPipeline >
 
- Public Types inherited from reverb::Task
using Ptr = std::shared_ptr< Task >
 

Public Member Functions

 MainPipeline (juce::AudioProcessor *processor)
 Constructs a MainPipeline object associated with an AudioProcessor. More...
 
virtual void updateParams (const juce::AudioProcessorValueTreeState &params, const juce::String &="") override
 Updates parameters from processor parameter tree. More...
 
virtual void updateSampleRate (double sr) override
 Update sample rate for pipeline and child tasks. More...
 
virtual AudioBlock exec (AudioBlock audio) override
 Apply reverb effect to given audio buffer. More...
 
virtual bool needsToRun () const override
 Pipeline must always be executed. More...
 
void loadIR (AudioBlock irIn)
 Copy reference to IR buffer. More...
 
- Public Member Functions inherited from reverb::Task
 Task (juce::AudioProcessor *processor)
 

Public Attributes

AudioBlock ir
 
- Public Attributes inherited from reverb::Task
double sampleRate
 

Protected Attributes

Convolution::Ptr convolution
 
Gain::Ptr gain
 
Mixer::Ptr dryWetMixer
 
- Protected Attributes inherited from reverb::Task
juce::AudioProcessor * processor
 
bool mustExec = true
 

Additional Inherited Members

- Protected Member Functions inherited from reverb::Task
float getParam (const juce::AudioProcessorValueTreeState &params, const juce::String &blockId) const
 Internal method used to get (and check) a parameter's value.
 

Detailed Description

Main audio processing pipeline. Contains various steps applied on every processing cycle, in particular convolution with the associated impulse response and some cleanup steps afterwards. This pipeline constitutes the critical path (i.e. it limits plugin performance) and thus is more heavily optimised than its IR counterpart.

Definition at line 27 of file MainPipeline.h.

Constructor & Destructor Documentation

◆ MainPipeline()

reverb::MainPipeline::MainPipeline ( juce::AudioProcessor *  processor)

Constructs a MainPipeline object associated with an AudioProcessor.

Creates a MainPipeline and each of its steps.

Parameters
[in]processorPointer to main processor

Definition at line 25 of file MainPipeline.cpp.

Member Function Documentation

◆ exec()

AudioBlock reverb::MainPipeline::exec ( AudioBlock  audio)
overridevirtual

Apply reverb effect to given audio buffer.

Load original audio buffer into dryWetMixer object, then apply reverb pipeline steps in series (convolution w/ IR, dry/wet mixing and output attenuation). Output replaces samples in given audio buffer.

Parameters
[in,out]audioAudio sample buffer

Implements reverb::Task.

Definition at line 80 of file MainPipeline.cpp.

◆ loadIR()

void reverb::MainPipeline::loadIR ( AudioBlock  irIn)

Copy reference to IR buffer.

Calls convolution block's loadIR method to pass along the given audio block

Parameters
[in]irInInput IR block

Definition at line 99 of file MainPipeline.cpp.

◆ needsToRun()

virtual bool reverb::MainPipeline::needsToRun ( ) const
inlineoverridevirtual

Pipeline must always be executed.

Returns
True

Reimplemented from reverb::Task.

Definition at line 52 of file MainPipeline.h.

◆ updateParams()

void reverb::MainPipeline::updateParams ( const juce::AudioProcessorValueTreeState &  params,
const juce::String &  = "" 
)
overridevirtual

Updates parameters from processor parameter tree.

Parameters
[in]paramsProcessor parameter tree
[in]blockIdID of block whose paramters should be checked

Implements reverb::Task.

Definition at line 40 of file MainPipeline.cpp.

◆ updateSampleRate()

void reverb::MainPipeline::updateSampleRate ( double  sr)
overridevirtual

Update sample rate for pipeline and child tasks.

Compares new sample rate with previous value. If different, sets mustExec to true in order to re-run pipeline for new sample rate. Store new sample rate value in object.

Parameters
[in]srSample rate

Reimplemented from reverb::Task.

Definition at line 57 of file MainPipeline.cpp.


The documentation for this class was generated from the following files: