aubio 0.4.9
Loading...
Searching...
No Matches
filterbank.h File Reference

Filterbank object. More...

Go to the source code of this file.

Typedefs

typedef struct _aubio_filterbank_t aubio_filterbank_t
 filterbank object
 

Functions

aubio_filterbank_tnew_aubio_filterbank (uint_t n_filters, uint_t win_s)
 create filterbank object
 
void del_aubio_filterbank (aubio_filterbank_t *f)
 destroy filterbank object
 
void aubio_filterbank_do (aubio_filterbank_t *f, const cvec_t *in, fvec_t *out)
 compute filterbank
 
fmat_taubio_filterbank_get_coeffs (const aubio_filterbank_t *f)
 return a pointer to the matrix object containing all filter coefficients
 
uint_t aubio_filterbank_set_coeffs (aubio_filterbank_t *f, const fmat_t *filters)
 copy filter coefficients to the filterbank
 
uint_t aubio_filterbank_set_norm (aubio_filterbank_t *f, smpl_t norm)
 set norm parameter
 
smpl_t aubio_filterbank_get_norm (aubio_filterbank_t *f)
 get norm parameter
 
uint_t aubio_filterbank_set_power (aubio_filterbank_t *f, smpl_t power)
 set power parameter
 
smpl_t aubio_filterbank_get_power (aubio_filterbank_t *f)
 get power parameter
 

Detailed Description

Filterbank object.

General-purpose spectral filterbank object.

Definition in file filterbank.h.

Typedef Documentation

◆ aubio_filterbank_t

typedef struct _aubio_filterbank_t aubio_filterbank_t

filterbank object

This object stores a matrix of spectral filter coefficients.

Definition at line 45 of file filterbank.h.

Function Documentation

◆ aubio_filterbank_do()

void aubio_filterbank_do ( aubio_filterbank_t * f,
const cvec_t * in,
fvec_t * out )

compute filterbank

Parameters
ffilterbank object, as returned by new_aubio_filterbank()
ininput spectrum containing an input spectrum of length win_s
outoutput vector containing the energy found in each band, nfilt output values
Examples
spectral/test-filterbank.c, and spectral/test-filterbank_mel.c.

◆ aubio_filterbank_get_coeffs()

fmat_t * aubio_filterbank_get_coeffs ( const aubio_filterbank_t * f)

return a pointer to the matrix object containing all filter coefficients

Parameters
ffilterbank object, as returned by new_aubio_filterbank()
Examples
spectral/test-filterbank.c, and spectral/test-filterbank_mel.c.

◆ aubio_filterbank_get_norm()

smpl_t aubio_filterbank_get_norm ( aubio_filterbank_t * f)

get norm parameter

Parameters
ffilterbank object, as returned by new_aubio_filterbank()
Returns
1 if norm is set, 0 otherwise. Defaults to 1.
Examples
spectral/test-filterbank.c.

◆ aubio_filterbank_get_power()

smpl_t aubio_filterbank_get_power ( aubio_filterbank_t * f)

get power parameter

Parameters
ffilterbank object, as returned by new_aubio_filterbank()
Returns
current power parameter. Defaults to 1.
Examples
spectral/test-filterbank.c.

◆ aubio_filterbank_set_coeffs()

uint_t aubio_filterbank_set_coeffs ( aubio_filterbank_t * f,
const fmat_t * filters )

copy filter coefficients to the filterbank

Parameters
ffilterbank object, as returned by new_aubio_filterbank()
filtersfilter bank coefficients to copy from
Examples
spectral/test-filterbank.c.

◆ aubio_filterbank_set_norm()

uint_t aubio_filterbank_set_norm ( aubio_filterbank_t * f,
smpl_t norm )

set norm parameter

Parameters
ffilterbank object, as returned by new_aubio_filterbank()
norm1 to norm the filters, 0 otherwise.

If set to 0, the filters will not be normalized. If set to 1, each filter will be normalized to one. Defaults to 1.

This function should be called before setting the filters with one of aubio_filterbank_set_triangle_bands(), aubio_filterbank_set_mel_coeffs(), aubio_filterbank_set_mel_coeffs_htk(), or aubio_filterbank_set_mel_coeffs_slaney().

Examples
spectral/test-filterbank.c.

◆ aubio_filterbank_set_power()

uint_t aubio_filterbank_set_power ( aubio_filterbank_t * f,
smpl_t power )

set power parameter

Parameters
ffilterbank object, as returned by new_aubio_filterbank()
powerRaise norm of the input spectrum norm to this power before computing filterbank. Defaults to 1.
Examples
spectral/test-filterbank.c.

◆ del_aubio_filterbank()

void del_aubio_filterbank ( aubio_filterbank_t * f)

destroy filterbank object

Parameters
ffilterbank object, as returned by new_aubio_filterbank()
Examples
spectral/test-filterbank.c, and spectral/test-filterbank_mel.c.

◆ new_aubio_filterbank()

aubio_filterbank_t * new_aubio_filterbank ( uint_t n_filters,
uint_t win_s )

create filterbank object

Parameters
n_filtersnumber of filters to create
win_ssize of analysis buffer (and length the FFT transform)
Examples
spectral/test-filterbank.c, and spectral/test-filterbank_mel.c.