2-pole/2-zero IIR filter More...
#include <Filter.h>
Inherits Ts.
Public Member Functions | |
| Biquad (Tp frq=Tp(1000), Tp res=Tp(1), FilterType type=LOW_PASS) | |
| void | coef (Tp a0, Tp a1, Tp a2, Tp b0, Tp b1, Tp b2) |
| Set input (a) and output (b) coefficients directly. | |
| void | freq (Tp v) |
| Set center frequency. | |
| void | res (Tp v) |
| Set resonance. | |
| void | set (Tp frq, Tp res) |
| Set filter center frequency and resonance. | |
| void | set (Tp frq, Tp res, FilterType type) |
| Set all filter params. | |
| void | type (FilterType type) |
| Set type of filter. | |
| void | zero () |
| Zero internal delays. | |
| Tv | operator() (Tv i0) |
| Filter next sample. | |
| Tv | nextBP (Tv i0) |
| Optimized for band-pass types. | |
| Tp | freq () const |
| Get center frequency. | |
| Tp | res () const |
| Get resonance. | |
| FilterType | type () const |
| Get filter type. | |
2-pole/2-zero IIR filter
The biquadratic filter contains 2 zeroes and 2 poles in its transfer function. The zeroes provide a better response near the DC and Nyquist frequencies than an all-pole filter would. Second-order IIRs have a 12 dB/octave cutoff slope and are normally cascaded (run in series) to obtain a sharper response. This particular implementation utilizes the Butterworth design.
These filters are adapted from: http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
| Tv | value (sample) type |
| Tp | parameter type |
| Ts | sync type |
| Biquad | ( | Tp | frq = Tp(1000), |
| Tp | res = Tp(1), |
||
| FilterType | type = LOW_PASS |
||
| ) |
| [in] | frq | Center frequency |
| [in] | res | Resonance amount in [1, inf) |
| [in] | type | Type of filter |