JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::dsp::Phaser< SampleType > Class Template Reference

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>

Collaboration diagram for juce::dsp::Phaser< SampleType >:

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::LinearoscVolume
 
SampleType rate = 1.0
 
double sampleRate = 44100.0
 
int updateCounter = 0
 

Static Private Attributes

static constexpr int maxUpdateCounter = 4
 
static constexpr int numStages = 6
 

Detailed Description

template<typename SampleType>
class juce::dsp::Phaser< SampleType >

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}

Constructor & Destructor Documentation

◆ Phaser()

template<typename SampleType >
juce::dsp::Phaser< SampleType >::Phaser ( )

Constructor.

Member Function Documentation

◆ prepare()

template<typename SampleType >
void juce::dsp::Phaser< SampleType >::prepare ( const ProcessSpec spec)

Initialises the processor.

◆ process()

◆ reset()

template<typename SampleType >
void juce::dsp::Phaser< SampleType >::reset ( )

Resets the internal state variables of the processor.

◆ setCentreFrequency()

template<typename SampleType >
void juce::dsp::Phaser< SampleType >::setCentreFrequency ( SampleType  newCentreHz)

Sets the centre frequency (in Hz) of the phaser all-pass filters modulation.

◆ setDepth()

template<typename SampleType >
void juce::dsp::Phaser< SampleType >::setDepth ( SampleType  newDepth)

Sets the volume (between 0 and 1) of the LFO modulating the phaser all-pass filters.

◆ setFeedback()

template<typename SampleType >
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.

◆ setMix()

template<typename SampleType >
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).

◆ setRate()

template<typename SampleType >
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.

◆ update()

template<typename SampleType >
void juce::dsp::Phaser< SampleType >::update ( )
private

Member Data Documentation

◆ bufferFrequency

template<typename SampleType >
AudioBuffer<SampleType> juce::dsp::Phaser< SampleType >::bufferFrequency
private

◆ centreFrequency

template<typename SampleType >
SampleType juce::dsp::Phaser< SampleType >::centreFrequency = 1300.0
private

◆ depth

template<typename SampleType >
SampleType juce::dsp::Phaser< SampleType >::depth = 0.5
private

◆ dryWet

template<typename SampleType >
DryWetMixer<SampleType> juce::dsp::Phaser< SampleType >::dryWet
private

◆ feedback

template<typename SampleType >
SampleType juce::dsp::Phaser< SampleType >::feedback = 0.0
private

◆ feedbackVolume

template<typename SampleType >
std::vector<SmoothedValue<SampleType, ValueSmoothingTypes::Linear> > juce::dsp::Phaser< SampleType >::feedbackVolume { 2 }
private

◆ filters

template<typename SampleType >
OwnedArray<FirstOrderTPTFilter<SampleType> > juce::dsp::Phaser< SampleType >::filters
private

◆ lastOutput

template<typename SampleType >
std::vector<SampleType> juce::dsp::Phaser< SampleType >::lastOutput { 2 }
private

◆ maxUpdateCounter

template<typename SampleType >
constexpr int juce::dsp::Phaser< SampleType >::maxUpdateCounter = 4
staticconstexprprivate

◆ mix

template<typename SampleType >
SampleType juce::dsp::Phaser< SampleType >::mix = 0.5
private

◆ normCentreFrequency

template<typename SampleType >
SampleType juce::dsp::Phaser< SampleType >::normCentreFrequency = 0.5
private

◆ numStages

template<typename SampleType >
constexpr int juce::dsp::Phaser< SampleType >::numStages = 6
staticconstexprprivate

◆ osc

template<typename SampleType >
Oscillator<SampleType> juce::dsp::Phaser< SampleType >::osc
private

◆ oscVolume

template<typename SampleType >
SmoothedValue<SampleType, ValueSmoothingTypes::Linear> juce::dsp::Phaser< SampleType >::oscVolume
private

◆ rate

template<typename SampleType >
SampleType juce::dsp::Phaser< SampleType >::rate = 1.0
private

◆ sampleRate

template<typename SampleType >
double juce::dsp::Phaser< SampleType >::sampleRate = 44100.0
private

◆ updateCounter

template<typename SampleType >
int juce::dsp::Phaser< SampleType >::updateCounter = 0
private

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