LMMS
Loading...
Searching...
No Matches
juce::dsp::Phaser< SampleType > Class Template Reference

#include <juce_Phaser.h>

Public Member Functions

 Phaser ()
void setRate (SampleType newRateHz)
void setDepth (SampleType newDepth)
void setCentreFrequency (SampleType newCentreHz)
void setFeedback (SampleType newFeedback)
void setMix (SampleType newMix)
void prepare (const ProcessSpec &spec)
void reset ()
template<typename ProcessContext>
void process (const ProcessContext &context) noexcept

Private Member Functions

void update ()

Private Attributes

Oscillator< SampleType > osc
OwnedArray< FirstOrderTPTFilter< SampleType > > filters
SmoothedValue< SampleType, ValueSmoothingTypes::LinearoscVolume
std::vector< SmoothedValue< SampleType, ValueSmoothingTypes::Linear > > feedbackVolume { 2 }
DryWetMixer< SampleType > dryWet
std::vector< SampleType > lastOutput { 2 }
AudioBuffer< SampleType > bufferFrequency
SampleType normCentreFrequency = 0.5
double sampleRate = 44100.0
int updateCounter = 0
SampleType rate = 1.0
SampleType depth = 0.5
SampleType feedback = 0.0
SampleType mix = 0.5
SampleType centreFrequency = 1300.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>
Phaser::Phaser ( )

Constructor.

Member Function Documentation

◆ prepare()

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

Initialises the processor.

◆ process()

template<typename SampleType>
template<typename ProcessContext>
void juce::dsp::Phaser< SampleType >::process ( const ProcessContext & context)
inlinenoexcept

Processes the input and output samples supplied in the processing context.

◆ reset()

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

Resets the internal state variables of the processor.

◆ setCentreFrequency()

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

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

◆ setDepth()

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

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

◆ setFeedback()

template<typename SampleType>
void Phaser::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 Phaser::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 Phaser::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 Phaser::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>
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>
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 files: