Typedefs | Functions

biquad.h File Reference

Second order Infinite Impulse Response filter. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _aubio_biquad_t aubio_biquad_t
 biquad filter object

Functions

void aubio_biquad_do (aubio_biquad_t *b, fvec_t *in)
 filter input vector
void aubio_biquad_do_filtfilt (aubio_biquad_t *b, fvec_t *in, fvec_t *tmp)
 filter input vector forward and backward
aubio_biquad_tnew_aubio_biquad (lsmp_t b1, lsmp_t b2, lsmp_t b3, lsmp_t a2, lsmp_t a3)
 create new biquad filter
void del_aubio_biquad (aubio_biquad_t *b)
 delete biquad filter

Detailed Description

Second order Infinite Impulse Response filter.

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

$ y[n] = b_1 x[n] + b_2 x[n-1] + b_3 x[n-2] - a_2 y[n-1] - a_3 y[n-2] $

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


Function Documentation

void aubio_biquad_do ( aubio_biquad_t b,
fvec_t in 
)

filter input vector

Parameters:
bbiquad object as returned by new_aubio_biquad
ininput vector to filter
void aubio_biquad_do_filtfilt ( aubio_biquad_t b,
fvec_t in,
fvec_t tmp 
)

filter input vector forward and backward

Parameters:
bbiquad object as returned by new_aubio_biquad
ininput vector to filter
tmpmemory space to use for computation
void del_aubio_biquad ( aubio_biquad_t b )

delete biquad filter

Parameters:
bbiquad object to delete
aubio_biquad_t* new_aubio_biquad ( lsmp_t  b1,
lsmp_t  b2,
lsmp_t  b3,
lsmp_t  a2,
lsmp_t  a3 
)

create new biquad filter

Parameters:
b1forward filter coefficient
b2forward filter coefficient
b3forward filter coefficient
a2feedback filter coefficient
a3feedback filter coefficient
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines