A 6 stage phaser that modulates first order all-pass filters to create sweeping notches in the magnitude frequency response. More...
#include <juce_Phaser.h>

Public Member Functions | |
| Phaser () | |
| Constructor. More... | |
| void | prepare (const ProcessSpec &spec) |
| Initialises the processor. More... | |
| template<typename ProcessContext > | |
| void | process (const ProcessContext &context) noexcept |
| Processes the input and output samples supplied in the processing context. More... | |
| void | reset () |
| Resets the internal state variables of the processor. More... | |
| void | setCentreFrequency (SampleType newCentreHz) |
| Sets the centre frequency (in Hz) of the phaser all-pass filters modulation. More... | |
| void | setDepth (SampleType newDepth) |
| Sets the volume (between 0 and 1) of the LFO modulating the phaser all-pass filters. More... | |
| void | setFeedback (SampleType newFeedback) |
| Sets the feedback volume (between -1 and 1) of the phaser. More... | |
| void | setMix (SampleType newMix) |
| Sets the amount of dry and wet signal in the output of the phaser (between 0 for full dry and 1 for full wet). More... | |
| void | setRate (SampleType newRateHz) |
| Sets the rate (in Hz) of the LFO modulating the phaser all-pass filters. More... | |
Private Member Functions | |
| void | update () |
Private Attributes | |
| AudioBuffer< SampleType > | bufferFrequency |
| SampleType | centreFrequency = 1300.0 |
| SampleType | depth = 0.5 |
| DryWetMixer< SampleType > | dryWet |
| SampleType | feedback = 0.0 |
| std::vector< SmoothedValue< SampleType, ValueSmoothingTypes::Linear > > | feedbackVolume { 2 } |
| OwnedArray< FirstOrderTPTFilter< SampleType > > | filters |
| std::vector< SampleType > | lastOutput { 2 } |
| SampleType | mix = 0.5 |
| SampleType | normCentreFrequency = 0.5 |
| Oscillator< SampleType > | osc |
| SmoothedValue< SampleType, ValueSmoothingTypes::Linear > | oscVolume |
| SampleType | rate = 1.0 |
| double | sampleRate = 44100.0 |
| int | updateCounter = 0 |
Static Private Attributes | |
| static constexpr int | maxUpdateCounter = 4 |
| static constexpr int | numStages = 6 |
A 6 stage phaser that modulates first order all-pass filters to create sweeping notches in the magnitude frequency response.
This audio effect can be controlled with standard phaser parameters: the speed and depth of the LFO controlling the frequency response, a mix control, a feedback control, and the centre frequency of the modulation.
@tags{DSP}
| juce::dsp::Phaser< SampleType >::Phaser | ( | ) |
Constructor.
| void juce::dsp::Phaser< SampleType >::prepare | ( | const ProcessSpec & | spec | ) |
Initialises the processor.
|
inlinenoexcept |
Processes the input and output samples supplied in the processing context.
References juce::dsp::Phaser< SampleType >::bufferFrequency, juce::gl::counter, juce::dsp::Phaser< SampleType >::dryWet, juce::dsp::Phaser< SampleType >::feedbackVolume, juce::dsp::Phaser< SampleType >::filters, juce::dsp::AudioBlock< SampleType >::getSubBlock(), juce::AudioBuffer< Type >::getWritePointer(), juce::gl::input, int(), jassert, juce::jlimit(), juce::jmin(), juce::dsp::Phaser< SampleType >::lastOutput, juce::mapToLog10(), juce::dsp::Phaser< SampleType >::maxUpdateCounter, juce::gl::n, juce::dsp::Phaser< SampleType >::normCentreFrequency, juce::dsp::Phaser< SampleType >::numStages, juce::dsp::Phaser< SampleType >::osc, juce::dsp::Phaser< SampleType >::oscVolume, juce::gl::output, juce::dsp::Phaser< SampleType >::sampleRate, and juce::dsp::Phaser< SampleType >::updateCounter.
| void juce::dsp::Phaser< SampleType >::reset | ( | ) |
Resets the internal state variables of the processor.
| void juce::dsp::Phaser< SampleType >::setCentreFrequency | ( | SampleType | newCentreHz | ) |
Sets the centre frequency (in Hz) of the phaser all-pass filters modulation.
| void juce::dsp::Phaser< SampleType >::setDepth | ( | SampleType | newDepth | ) |
Sets the volume (between 0 and 1) of the LFO modulating the phaser all-pass filters.
| void juce::dsp::Phaser< SampleType >::setFeedback | ( | SampleType | newFeedback | ) |
Sets the feedback volume (between -1 and 1) of the phaser.
Negative can be used to get specific phaser sounds.
| void juce::dsp::Phaser< SampleType >::setMix | ( | SampleType | newMix | ) |
Sets the amount of dry and wet signal in the output of the phaser (between 0 for full dry and 1 for full wet).
| void juce::dsp::Phaser< SampleType >::setRate | ( | SampleType | newRateHz | ) |
Sets the rate (in Hz) of the LFO modulating the phaser all-pass filters.
This rate must be lower than 100 Hz.
|
private |
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
private |
|
private |
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
private |
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
staticconstexprprivate |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
private |
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
staticconstexprprivate |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
private |
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().
|
private |
Referenced by juce::dsp::Phaser< SampleType >::process().