First-order all-pass filter. More...
#include <Filter.h>
Inherits Ts.
Public Member Functions | |
AllPass1 (Tp frq=1000) | |
void | freq (Tp v) |
Set cutoff frequency. | |
void | freqF (Tp v) |
Faster, but slightly less accurate than freq() | |
Tv | operator() (Tv input) |
Filters sample. | |
Tv | high (Tv input) |
High-pass filters sample. | |
Tv | low (Tv input) |
Low-pass filters sample. | |
Tp | freq () |
Get current cutoff frequency. |
First-order all-pass filter.
This filter has the transfer function H(z) = (a + z^-1) / (1 + a z^-1). It is essentially a "phase" filter in that its only effect is to shift frequencies from 0 to Nyquist from 0 to -180 degress, respectively. The cutoff frequency is the frequency where the phase is shifted by -90 degrees. A lowpass or highpass filter can be constructed by adding or subtracting, respectively, the output of the filter to or from the input. When the center frequency is fs/4, the filter acts as a unit delay. When the center frequency is 0, the filter acts as a no-op. When the center frequency is fs/2, the filter acts as an inverter.
Tv | value (sample) type |
Tp | parameter type |
Ts | sync type |
AllPass1 | ( | Tp | frq = 1000 | ) |
[in] | frq | Center frequency |