Second-order low-pass filter (BiQuad DF2). Attenuates frequencies above the cutoff frequency. Coefficients are derived from the Audio EQ Cookbook.
More...
#include <Filter.h>
|
| | LowPassFilter ()=default |
| |
| | LowPassFilter (float frequency, float sampleRate, float q=0.7071f) |
| |
| void | begin (float frequency, float sampleRate, float q=0.7071f) |
| |
| T | process (T value) override |
| | Processes the input value and returns the filtered output value.
|
| |
| void | reset () override |
| |
template<typename T = float>
class audio_tools::LowPassFilter< T >
Second-order low-pass filter (BiQuad DF2). Attenuates frequencies above the cutoff frequency. Coefficients are derived from the Audio EQ Cookbook.
- Parameters
-
| frequency | cutoff frequency in Hz |
| sampleRate | sample rate in Hz |
| q | quality factor (default 0.7071 = Butterworth, no resonance peak) |
- Author
- pschatzmann
- Copyright
- GNU General Public License v3.0
- Template Parameters
-
| T | sample type (use float or double; for fixed-point types like q1_14_t use LowPassFilterDF1 instead – DF2's single delay line needs much more dynamic range than the signal for low cutoff/sampleRate ratios and will saturate/misbehave in a bounded fixed-point type) |
◆ LowPassFilter() [1/2]
template<typename T = float>
◆ LowPassFilter() [2/2]
template<typename T = float>
| LowPassFilter |
( |
float |
frequency, |
|
|
float |
sampleRate, |
|
|
float |
q = 0.7071f |
|
) |
| |
|
inline |
◆ begin()
template<typename T = float>
| void begin |
( |
float |
frequency, |
|
|
float |
sampleRate, |
|
|
float |
q = 0.7071f |
|
) |
| |
|
inline |
◆ process()
template<typename T = float>
|
|
inlineoverridevirtualinherited |
Processes the input value and returns the filtered output value.
Implements Filter< T >.
◆ reset()
template<typename T = float>
|
|
inlineoverridevirtualinherited |
Clears the internal state (delay lines) without changing the coefficients. Call after reconfiguring filter parameters via begin() to avoid transients from stale state.
Reimplemented from Filter< T >.
◆ a_1
template<typename T = float>
◆ a_2
template<typename T = float>
◆ b_0
template<typename T = float>
◆ b_1
template<typename T = float>
◆ b_2
template<typename T = float>
◆ w_0
template<typename T = float>
◆ w_1
template<typename T = float>
The documentation for this class was generated from the following file:
- src/AudioTools/CoreAudio/AudioFilter/Filter.h