![]() |
quantumVERB
1.0.0
A FOSS convolution reverb plugin
|
#include <PluginProcessor.h>
Public Member Functions | |
AudioProcessor () | |
Constructs a reverb audio processor & initialises its inner pipelines. | |
void | prepareToPlay (double sampleRate, int samplesPerBlock) override |
Prepare the processor before playback starts. More... | |
void | releaseResources () override |
Release resource when playback stops. More... | |
void | processBlock (juce::AudioSampleBuffer &audio, juce::MidiBuffer &) override |
Applies reverb effect on audio buffer using parameters given through the editor. More... | |
void | processBlockBypassed (juce::AudioSampleBuffer &audio, juce::MidiBuffer &midi) override |
juce::AudioProcessorEditor * | createEditor () override |
bool | hasEditor () const override |
const juce::String | getName () const override |
bool | acceptsMidi () const override |
bool | producesMidi () const override |
bool | isMidiEffect () const override |
double | getTailLengthSeconds () const override |
int | getNumPrograms () override |
int | getCurrentProgram () override |
void | setCurrentProgram (int index) override |
const juce::String | getProgramName (int index) override |
void | changeProgramName (int index, const juce::String &newName) override |
void | getStateInformation (juce::MemoryBlock &destData) override |
void | setStateInformation (const void *data, int sizeInBytes) override |
Public Attributes | |
juce::AudioProcessorValueTreeState | parameters |
std::vector< IRPipeline::Ptr > | irPipelines |
std::vector< MainPipeline::Ptr > | mainPipelines |
std::mutex | updatingParams |
Protected Member Functions | |
void | initParams () |
void | updateParams (double sampleRate) |
Update parameters across all channels. More... | |
void | updateParamsForChannel (int channelIdx, double sampleRate) |
Update parameters for a given channel. More... | |
void | processChannel (int channelIdx) |
Applies reverb effect on single channel using preconfigured pipelines. More... | |
Protected Attributes | |
bool | paramsInitialised = false |
int64_t | blocksProcessed = 0 |
AudioBlock | audioChannels |
Static Protected Attributes | |
static constexpr int | NUM_BLOCKS_PER_UPDATE_PARAMS = 5 |
Main reverb audio processor class. Contains all processing steps and provides a user- facing editor for parameter adjustment.
Definition at line 31 of file PluginProcessor.h.
|
protected |
Low-shelf filter
Peak filter 1
Peak filter 2
High-shelf filter
IR gain
IR length
Pre-delay
Dry/wet mixer
Output gain
Meta: Bypass detection flag
Impulse responses
IR file choice is given by a string that may be one of the following: 1) name of a valid audio resource in BinaryData.h 2) full path to user-provided IR file
END: Processor is responsible for deleting parameters on destruction
Definition at line 475 of file PluginProcessor.cpp.
|
override |
Prepare the processor before playback starts.
Called before playback starts, to let the processor prepare itself.
You can call getTotalNumInputChannels and getTotalNumOutputChannels or query the busLayout member variable to find out the number of channels your processBlock callback must process.
The samplesPerBlock value is a strong hint about the maximum number of samples that will be provided in each block. You may want to use this value to resize internal buffers. You should program defensively in case a buggy host exceeds this value. The actual block sizes that the host uses may be different each time the callback happens: completely variable block sizes can be expected from some hosts.
sampleRate | [in] Target sample rate (constant until playback stops) |
samplesPerBlock | [in] Hint about max. expected samples in upcoming block |
Definition at line 131 of file PluginProcessor.cpp.
|
override |
Applies reverb effect on audio buffer using parameters given through the editor.
[in] | buffer | Audio buffer containing samples to process |
midiMessages | Unused |
Definition at line 212 of file PluginProcessor.cpp.
|
protected |
Applies reverb effect on single channel using preconfigured pipelines.
[in] | channelIdx | Index of channel to process |
Definition at line 313 of file PluginProcessor.cpp.
|
override |
Release resource when playback stops.
Used when playback stops as an opportunity to free up any spare memory, etc.
Definition at line 178 of file PluginProcessor.cpp.
|
protected |
Update parameters across all channels.
Update parameters in all IRPipeline and MainPipeline objects. If necessary, reprocess IR and add to MainPipeline.
MainPipeline is double-buffered to avoid interfering with processChannel(). IRPipeline is not used by any other methods, so it does not need protection.
[in] | sampleRate | Current sample rate |
Definition at line 341 of file PluginProcessor.cpp.
|
protected |
Update parameters for a given channel.
Update parameters in IRPipeline and Mainpipeline for given channel. If necessary, reprocess IR using new parameters and copy to MainPipeline.
MainPipeline is double-buffered to avoid interfering with processChannel(). IRPipeline is not used by any other methods, so it does not need protection.
[in] | channelIdx | Channel parameters should be updated for |
[in] | sampleRate | Current sample rate |
Definition at line 380 of file PluginProcessor.cpp.