|
| void | setupN (double centerFrequency, double q_factor=10) |
| |
| void | setup (double sampleRate, double centerFrequency, double q_factor=10) |
| |
|
template<typename Sample > |
| Sample | filter (Sample s) |
| | filter operation
|
| |
|
void | reset () |
| | resets the delay lines to zero
|
| |
|
const DirectFormI & | getState () |
| | gets the delay lines (=state) of the filter
|
| |
| complex_t | response (double normalizedFrequency) const |
| |
| std::vector< PoleZeroPair > | getPoleZeros () const |
| |
| double | getA0 () const |
| |
| double | getA1 () const |
| |
| double | getA2 () const |
| |
| double | getB0 () const |
| |
| double | getB1 () const |
| |
| double | getB2 () const |
| |
| template<class StateType > |
| double | filter (double s, StateType &state) const |
| |
| void | setCoefficients (double a0, double a1, double a2, double b0, double b1, double b2) |
| |
| void | setOnePole (complex_t pole, complex_t zero) |
| |
| void | setTwoPole (complex_t pole1, complex_t zero1, complex_t pole2, complex_t zero2) |
| |
| void | setPoleZeroPair (const PoleZeroPair &pair) |
| |
| void | setIdentity () |
| |
| void | applyScale (double scale) |
| |
Bandstop with Q factor: the higher the Q factor the more narrow is the notch. However, a narrow notch has a long impulse response ( = ringing) and numerical problems might prevent perfect damping. Practical values of the Q factor are about Q = 10 to 20. In terms of the design the Q factor defines the radius of the poles as r = exp(- pi*(centerFrequency/sampleRate)/q_factor) whereas the angles of the poles/zeros define the bandstop frequency. The higher Q the closer r moves towards the unit circle.