aubio  0.4.9
Functions
biquad.h File Reference

Second order Infinite Impulse Response filter. More...

Go to the source code of this file.

Functions

uint_t aubio_filter_set_biquad (aubio_filter_t *f, lsmp_t b0, lsmp_t b1, lsmp_t b2, lsmp_t a1, lsmp_t a2)
 set coefficients of a biquad filter More...
 
aubio_filter_tnew_aubio_filter_biquad (lsmp_t b0, lsmp_t b1, lsmp_t b2, lsmp_t a1, lsmp_t a2)
 create biquad filter with b0, b1, b2, a1, a2 coeffs More...
 

Detailed Description

Second order Infinite Impulse Response filter.

This file implements a normalised biquad filter (second order IIR):

\( y[n] = b_0 x[n] + b_1 x[n-1] + b_2 x[n-2] - a_1 y[n-1] - a_2 y[n-2] \)

The filtfilt version runs the filter twice, forward and backward, to compensate the phase shifting of the forward operation.

See also Digital biquad filter on wikipedia.

Definition in file biquad.h.

Function Documentation

◆ aubio_filter_set_biquad()

uint_t aubio_filter_set_biquad ( aubio_filter_t f,
lsmp_t  b0,
lsmp_t  b1,
lsmp_t  b2,
lsmp_t  a1,
lsmp_t  a2 
)

set coefficients of a biquad filter

Parameters
ffilter object as returned by new_aubio_filter()
b0forward filter coefficient
b1forward filter coefficient
b2forward filter coefficient
a1feedback filter coefficient
a2feedback filter coefficient

◆ new_aubio_filter_biquad()

aubio_filter_t* new_aubio_filter_biquad ( lsmp_t  b0,
lsmp_t  b1,
lsmp_t  b2,
lsmp_t  a1,
lsmp_t  a2 
)

create biquad filter with b0, b1, b2, a1, a2 coeffs

Parameters
b0forward filter coefficient
b1forward filter coefficient
b2forward filter coefficient
a1feedback filter coefficient
a2feedback filter coefficient
Examples:
temporal/test-biquad.c.