OpenShot Library | OpenShotAudio  0.2.2
juce::dsp::LadderFilter< Type > Class Template Reference

Multi-mode filter based on the Moog ladder filter. More...

#include <juce_LadderFilter.h>

Public Types

enum  Mode { LPF12, HPF12, LPF24, HPF24 }
 

Public Member Functions

 LadderFilter ()
 Creates an uninitialised filter. More...
 
void setEnabled (bool newValue) noexcept
 Enables or disables the filter. More...
 
void setMode (Mode newValue) noexcept
 Sets filter mode. More...
 
void prepare (const juce::dsp::ProcessSpec &spec)
 Initialises the filter. More...
 
size_t getNumChannels () const noexcept
 Returns the current number of channels. More...
 
void reset () noexcept
 Resets the internal state variables of the filter. More...
 
void setCutoffFrequencyHz (Type newValue) noexcept
 Sets the cutoff frequency of the filter. More...
 
void setResonance (Type newValue) noexcept
 Sets the resonance of the filter. More...
 
void setDrive (Type newValue) noexcept
 Sets the amount of saturation in the filter. More...
 
template<typename ProcessContext >
void process (const ProcessContext &context) noexcept
 

Protected Member Functions

Type processSample (Type inputValue, size_t channelToUse) noexcept
 
void updateSmoothers () noexcept
 

Detailed Description

template<typename Type>
class juce::dsp::LadderFilter< Type >

Multi-mode filter based on the Moog ladder filter.

Definition at line 42 of file juce_LadderFilter.h.

Constructor & Destructor Documentation

◆ LadderFilter()

template<typename Type >
juce::dsp::LadderFilter< Type >::LadderFilter ( )

Member Function Documentation

◆ setEnabled()

template<typename Type >
void juce::dsp::LadderFilter< Type >::setEnabled ( bool  newValue)
inlinenoexcept

Enables or disables the filter.

If disabled it will simply pass through the input signal.

Definition at line 58 of file juce_LadderFilter.h.

References juce::dsp::LadderFilter< Type >::prepare(), and juce::dsp::LadderFilter< Type >::setMode().

◆ setMode()

template<typename Type >
void juce::dsp::LadderFilter< Type >::setMode ( Mode  newValue)
noexcept

◆ prepare()

template<typename Type >
void juce::dsp::LadderFilter< Type >::prepare ( const juce::dsp::ProcessSpec spec)

◆ getNumChannels()

◆ reset()

◆ setCutoffFrequencyHz()

template<typename Type >
void juce::dsp::LadderFilter< Type >::setCutoffFrequencyHz ( Type  newValue)
noexcept

Sets the cutoff frequency of the filter.

Parameters
newValuecutoff frequency in Hz

Definition at line 87 of file juce_LadderFilter.cpp.

Referenced by juce::dsp::LadderFilter< Type >::getNumChannels().

◆ setResonance()

template<typename Type >
void juce::dsp::LadderFilter< Type >::setResonance ( Type  newValue)
noexcept

Sets the resonance of the filter.

Parameters
newValuea value between 0 and 1; higher values increase the resonance and can result in self oscillation!

Definition at line 96 of file juce_LadderFilter.cpp.

Referenced by juce::dsp::LadderFilter< Type >::getNumChannels(), and juce::dsp::LadderFilter< Type >::LadderFilter().

◆ setDrive()

template<typename Type >
void juce::dsp::LadderFilter< Type >::setDrive ( Type  newValue)
noexcept

Sets the amount of saturation in the filter.

Parameters
newValuesaturation amount; it can be any number greater than or equal to one. Higher values result in more distortion.

Definition at line 105 of file juce_LadderFilter.cpp.

References juce::SmoothedValue< FloatType, SmoothingType >::getNextValue(), and juce::SmoothedValue< FloatType, SmoothingType >::reset().

Referenced by juce::dsp::LadderFilter< Type >::getNumChannels(), and juce::dsp::LadderFilter< Type >::LadderFilter().


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