Logo Search packages:      
Sourcecode: calf version File versions  Download package

dsp::biquad_coeffs< Coeff > Class Template Reference

#include <biquad.h>

Inheritance diagram for dsp::biquad_coeffs< Coeff >:

dsp::biquad_d1< Coeff, T > dsp::biquad_d2< Coeff, T >

List of all members.


Detailed Description

template<class Coeff = float>
class dsp::biquad_coeffs< Coeff >

Coefficients for two-pole two-zero filter, for floating point values, plus a bunch of functions to set them to typical values.

Coefficient calculation is based on famous Robert Bristow-Johnson's equations, except where it's not. The coefficient calculation is NOT mine, the only exception is the lossy optimization in Zoelzer and rbj HP filter code.

See http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt for reference.

don't use this for integers because it won't work

Definition at line 45 of file biquad.h.


Public Types

typedef std::complex< double > cfloat

Public Member Functions

template<class U>
void copy_coeffs (const biquad_coeffs< U > &src)
 copy coefficients from another biquad
float freq_gain (float freq, float sr)
cfloat h_z (const cfloat &z)
void set_allpass (float freq, float pole_r, float sr)
void set_bilinear (float aa0, float aa1, float aa2, float ab0, float ab1, float ab2)
 set digital filter parameters based on given analog filter parameters
void set_bp_rbj (double fc, double q, double esr, double gain=1.0)
void set_br_rbj (double fc, double q, double esr, double gain=1.0)
void set_highshelf_rbj (float freq, float q, float peak, float sr)
void set_hp_rbj (float fc, float q, float esr, float gain=1.0)
void set_hp_rbj_optimized (float fc, float q, float esr, float gain=1.0)
void set_lowshelf_rbj (float freq, float q, float peak, float sr)
void set_lp_rbj (float fc, float q, float sr, float gain=1.0)
void set_lp_zoelzer (float fc, float q, float odsr, float gain=1.0)
void set_null ()
void set_peakeq_rbj (float freq, float q, float peak, float sr)

Static Public Member Functions

static float prewarp (float freq, float sr)
 prewarping for bilinear transform, maps given digital frequency to analog counterpart for analog filter design
static float unwarp (float omega, float sr)
 convert analog angular frequency value to digital
static float unwarpf (float t, float sr)
 convert analog filter time constant to digital counterpart

Public Attributes

Coeff a0
Coeff a1
Coeff a2
Coeff b1
Coeff b2

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index