#include <Filter.h>
|
using | Ptr = std::shared_ptr< Filter > |
|
using | Ptr = std::shared_ptr< Task > |
|
|
| Filter (juce::AudioProcessor *processor, float freq=1000.0f, float q=0.71f, float gain=1.5f) |
| Constructs a Filter object with optional frequency/gain/Q parameters. More...
|
|
virtual void | updateParams (const juce::AudioProcessorValueTreeState ¶ms, const juce::String &blockId) override |
| Updates parameters from processor parameter tree. More...
|
|
virtual AudioBlock | exec (AudioBlock ir) override |
| Filters the audio in AudioSampleBuffer. More...
|
|
float | getAmplitude (float freq) |
| Returns the filter absolute amplitude response at a given frequency. More...
|
|
float | getdBAmplitude (float freq) |
| Returns the filter amplitude response in dB at a given frequency. More...
|
|
| Task (juce::AudioProcessor *processor) |
|
virtual bool | needsToRun () const |
| Tells caller whether block must be run for current block. More...
|
|
virtual void | updateSampleRate (double sr) |
| Update sample rate for task block. More...
|
|
|
static float | todB (float m) |
|
static float | invdB (float dB) |
|
|
void | setFrequency (float) |
| Sets the filter frequency and updates the IIR filter coefficients (Meant to be used by Equalizer class) More...
|
|
void | setQ (float) |
| Sets the filter Q factor and updates the IIR filter coefficients (Meant to be used by Equalizer class) More...
|
|
void | setGain (float) |
| Sets the filter band gain and updates the IIR filter coefficients (Meant to be used by Equalizer class) More...
|
|
virtual void | buildFilter ()=0 |
|
float | getParam (const juce::AudioProcessorValueTreeState ¶ms, const juce::String &blockId) const |
| Internal method used to get (and check) a parameter's value.
|
|
|
float | frequency |
|
float | Q |
|
float | gainFactor |
|
juce::AudioProcessor * | processor |
|
bool | mustExec = true |
|
|
class | Equalizer |
|
class | EqualizerMocked |
|
The Filter class is the abstract class from which the three filter types of the plugin are derived.
Definition at line 24 of file Filter.h.
◆ Filter()
reverb::Filter::Filter |
( |
juce::AudioProcessor * |
processor, |
|
|
float |
freq = 1000.0f , |
|
|
float |
q = 0.71f , |
|
|
float |
gain = 1.5f |
|
) |
| |
Constructs a Filter object with optional frequency/gain/Q parameters.
The Filter object is constructed from the processor pointer and from the optional frequency/gain/Q parameters. The frequency is the cut-off frequency of the derived LowShelfFilter/HighShelfFilter and the center frequency of the PeakFilter class.
- Parameters
-
[in] | processor | Pointer to main processor |
[in] | freq | Band frequency |
[in] | gain | Band gain |
[in] | q | Q factor |
Definition at line 29 of file Filter.cpp.
◆ exec()
AudioBlock reverb::Filter::exec |
( |
AudioBlock |
ir | ) |
|
|
overridevirtual |
Filters the audio in AudioSampleBuffer.
This function filters an AudioBuffer using the IIR filter's coefficients
- Parameters
-
[in,out] | ir | Contains the audio to be filtered, the output is placed in that same buffer |
Implements reverb::Task.
Definition at line 81 of file Filter.cpp.
◆ getAmplitude()
float reverb::Filter::getAmplitude |
( |
float |
freq | ) |
|
Returns the filter absolute amplitude response at a given frequency.
- Parameters
-
[in] | freq | Frequency at which the filter magnitude is evaluated |
Definition at line 109 of file Filter.cpp.
◆ getdBAmplitude()
float reverb::Filter::getdBAmplitude |
( |
float |
freq | ) |
|
Returns the filter amplitude response in dB at a given frequency.
- Parameters
-
[in] | freq | Frequency at which the filter magnitude is evaluated |
- Returns
- Filter amplitude response in dB
Definition at line 142 of file Filter.cpp.
◆ setFrequency()
void reverb::Filter::setFrequency |
( |
float |
freq | ) |
|
|
protected |
Sets the filter frequency and updates the IIR filter coefficients (Meant to be used by Equalizer class)
- Parameters
-
[in] | freq | Frequency to be set |
Definition at line 155 of file Filter.cpp.
◆ setGain()
void reverb::Filter::setGain |
( |
float |
gain | ) |
|
|
protected |
Sets the filter band gain and updates the IIR filter coefficients (Meant to be used by Equalizer class)
- Parameters
-
[in] | freq | Band gain to be set |
Definition at line 184 of file Filter.cpp.
◆ setQ()
void reverb::Filter::setQ |
( |
float |
q | ) |
|
|
protected |
Sets the filter Q factor and updates the IIR filter coefficients (Meant to be used by Equalizer class)
- Parameters
-
[in] | freq | Q factor to be set |
Definition at line 170 of file Filter.cpp.
◆ updateParams()
void reverb::Filter::updateParams |
( |
const juce::AudioProcessorValueTreeState & |
params, |
|
|
const juce::String & |
blockId |
|
) |
| |
|
overridevirtual |
Updates parameters from processor parameter tree.
- Parameters
-
[in] | params | Processor parameter tree |
[in] | blockId | ID of block whose paramters should be checked |
Implements reverb::Task.
Definition at line 42 of file Filter.cpp.
The documentation for this class was generated from the following files: