|
arduino-audio-tools
|
Second-order notch (band-reject) filter (BiQuad DF2). Rejects frequencies near the center frequency and passes those further away. Useful for removing a specific unwanted frequency (e.g. mains hum at 50/60 Hz). Coefficients are derived from the Audio EQ Cookbook. More...
#include <Filter.h>
Public Member Functions | |
| NotchFilter ()=default | |
| NotchFilter (float frequency, float sampleRate, float q=1.0) | |
| void | begin (float frequency, float sampleRate, float q=1.0) |
| T | process (T value) override |
| Processes the input value and returns the filtered output value. | |
| void | reset () override |
Protected Attributes | |
| T | a_1 = 0 |
| T | a_2 = 0 |
| T | b_0 = 0 |
| T | b_1 = 0 |
| T | b_2 = 0 |
| T | w_0 = 0 |
| T | w_1 = 0 |
Second-order notch (band-reject) filter (BiQuad DF2). Rejects frequencies near the center frequency and passes those further away. Useful for removing a specific unwanted frequency (e.g. mains hum at 50/60 Hz). Coefficients are derived from the Audio EQ Cookbook.
| frequency | center frequency to reject in Hz |
| sampleRate | sample rate in Hz |
| q | quality factor (default 1.0; higher values narrow the rejection band) |
| T | sample type (use float or double) |
|
default |
Processes the input value and returns the filtered output value.
Implements Filter< T >.
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 >.