SPUC
3.0
|
Template for 2nd Order IIR filter. More...
#include <iir_2nd.h>
Public Types | |
typedef mixed_type< Numeric, Coeff >::dtype | sum_type |
Public Member Functions | |
iir_2nd (Coeff B0, Coeff B1, Coeff B2, Coeff A1, Coeff A2, long b=0) | |
iir_2nd (Coeff A1=0, Coeff A2=0) | |
void | set_round_bits (long x) |
int | get_round_bits () |
Coeff | get_b0 () |
Coeff | get_b1 () |
Coeff | get_b2 () |
Coeff | get_a1 () |
Coeff | get_a2 () |
void | reset () |
void | set_a (Coeff A1, Coeff A2) |
void | set_b (Coeff A1, Coeff A2) |
void | set_coeffs (Coeff B0, Coeff B1, Coeff B2, Coeff A1, Coeff A2) |
iir_2nd (const char *file) | |
Constructor reading coefficients from a file. More... | |
void | print () |
Print out coefficients. More... | |
Numeric | clock (Numeric input) |
Input new sample and calculate output. More... | |
Public Attributes | |
Numeric | fb2 |
Numeric | fb1 |
Numeric | fb0 |
Protected Attributes | |
long | round_bits |
Coeff | b0 |
Coeff | b1 |
Coeff | b2 |
Coeff | a1 |
Coeff | a2 |
Numeric | in [3] |
quantiser< Coeff > | Q |
Template for 2nd Order IIR filter.
The filter is assumed to be a low pass 2nd order digital filter of the form
typedef mixed_type<Numeric,Coeff>::dtype SPUC::iir_2nd< Numeric, Coeff >::sum_type |
|
inline |
|
inline |
|
inline |
Constructor reading coefficients from a file.
References SPUC::iir_2nd< Numeric, Coeff >::a1, SPUC::iir_2nd< Numeric, Coeff >::a2, SPUC::iir_2nd< Numeric, Coeff >::b0, SPUC::iir_2nd< Numeric, Coeff >::b1, SPUC::iir_2nd< Numeric, Coeff >::b2, and SPUC::iir_2nd< Numeric, Coeff >::reset().
|
inline |
Input new sample and calculate output.
References SPUC::iir_2nd< Numeric, Coeff >::fb0, SPUC::iir_2nd< Numeric, Coeff >::fb1, SPUC::iir_2nd< Numeric, Coeff >::fb2, and SPUC::iir_2nd< Numeric, Coeff >::Q.
Referenced by SPUC::notch_iir< Numeric, Coeff >::clock(), and main().
|
inline |
Referenced by SPUC::notch_iir< Numeric, Coeff >::set_freq().
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by SPUC::notch_iir< Numeric, Coeff >::set_depth().
|
inline |
|
inline |
Print out coefficients.
References SPUC::iir_2nd< Numeric, Coeff >::a1, SPUC::iir_2nd< Numeric, Coeff >::a2, SPUC::iir_2nd< Numeric, Coeff >::b0, SPUC::iir_2nd< Numeric, Coeff >::b1, and SPUC::iir_2nd< Numeric, Coeff >::b2.
Referenced by main().
|
inline |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::iir_2nd().
|
inline |
|
inline |
|
inline |
|
inline |
References SPUC::quantiser< Numeric >::set_bits().
Referenced by main().
|
protected |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::iir_2nd(), main(), and SPUC::iir_2nd< Numeric, Coeff >::print().
|
protected |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::iir_2nd(), main(), and SPUC::iir_2nd< Numeric, Coeff >::print().
|
protected |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::iir_2nd(), main(), and SPUC::iir_2nd< Numeric, Coeff >::print().
|
protected |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::iir_2nd(), main(), and SPUC::iir_2nd< Numeric, Coeff >::print().
|
protected |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::iir_2nd(), main(), and SPUC::iir_2nd< Numeric, Coeff >::print().
Numeric SPUC::iir_2nd< Numeric, Coeff >::fb0 |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::clock().
Numeric SPUC::iir_2nd< Numeric, Coeff >::fb1 |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::clock().
Numeric SPUC::iir_2nd< Numeric, Coeff >::fb2 |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::clock(), and main().
|
protected |
|
protected |
Referenced by SPUC::iir_2nd< Numeric, Coeff >::clock().
|
protected |