Go to the source code of this file.
Typedefs | |
| typedef struct _aubio_filter_t | aubio_filter_t |
| Digital filter. | |
Functions | |
| void | aubio_filter_do (aubio_filter_t *f, fvec_t *in) |
| filter input vector (in-place) | |
| void | aubio_filter_do_outplace (aubio_filter_t *f, fvec_t *in, fvec_t *out) |
| filter input vector (out-of-place) | |
| void | aubio_filter_do_filtfilt (aubio_filter_t *f, fvec_t *in, fvec_t *tmp) |
| filter input vector forward and backward | |
| lvec_t * | aubio_filter_get_feedback (aubio_filter_t *f) |
returns a pointer to feedback coefficients | |
| lvec_t * | aubio_filter_get_feedforward (aubio_filter_t *f) |
returns a pointer to feedforward coefficients | |
| uint_t | aubio_filter_get_order (aubio_filter_t *f) |
| get order of the filter | |
| uint_t | aubio_filter_get_samplerate (aubio_filter_t *f) |
| get sampling rate of the filter | |
| uint_t | aubio_filter_set_samplerate (aubio_filter_t *f, uint_t samplerate) |
| get sampling rate of the filter | |
| void | aubio_filter_do_reset (aubio_filter_t *f) |
| reset filter memory | |
| aubio_filter_t * | new_aubio_filter (uint_t order) |
| create new filter object | |
| void | del_aubio_filter (aubio_filter_t *f) |
| delete a filter object | |
This object stores a digital filter of order
. It contains the following data:
feedforward coefficients
feedback coefficients
input signal
output signalFor convenience, the samplerate of the input signal is also stored in the object.
Feedforward and feedback parameters can be modified using aubio_filter_get_feedback() and aubio_filter_get_feedforward().
The function aubio_filter_do_outplace() computes the following output signal
from the input signal
:
The function aubio_filter_do() executes the same computation but modifies directly the input signal (in-place).
The function aubio_filter_do_filtfilt() version runs the filter twice, first forward then backward, to compensate with the phase shifting of the forward operation.
Some convenience functions are provided:
Definition in file filter.h.
| typedef struct _aubio_filter_t aubio_filter_t |
Digital filter.
| void aubio_filter_do | ( | aubio_filter_t * | f, | |
| fvec_t * | in | |||
| ) |
filter input vector (in-place)
| f | filter object as returned by new_aubio_filter() | |
| in | input vector to filter |
| void aubio_filter_do_filtfilt | ( | aubio_filter_t * | f, | |
| fvec_t * | in, | |||
| fvec_t * | tmp | |||
| ) |
filter input vector forward and backward
| f | aubio_filter_t object as returned by new_aubio_filter() | |
| in | fvec_t input vector to filter | |
| tmp | memory space to use for computation |
| void aubio_filter_do_outplace | ( | aubio_filter_t * | f, | |
| fvec_t * | in, | |||
| fvec_t * | out | |||
| ) |
filter input vector (out-of-place)
| f | filter object as returned by new_aubio_filter() | |
| in | input vector to filter | |
| out | output vector to store filtered input |
| void aubio_filter_do_reset | ( | aubio_filter_t * | f | ) |
| lvec_t* aubio_filter_get_feedback | ( | aubio_filter_t * | f | ) |
returns a pointer to feedback coefficients
| f | filter object to get parameters from |
coefficients | lvec_t* aubio_filter_get_feedforward | ( | aubio_filter_t * | f | ) |
returns a pointer to feedforward coefficients
| f | filter object to get coefficients from |
coefficients | uint_t aubio_filter_get_order | ( | aubio_filter_t * | f | ) |
get order of the filter
| f | filter to get order from |
| uint_t aubio_filter_get_samplerate | ( | aubio_filter_t * | f | ) |
get sampling rate of the filter
| f | filter to get sampling rate from |
| uint_t aubio_filter_set_samplerate | ( | aubio_filter_t * | f, | |
| uint_t | samplerate | |||
| ) |
get sampling rate of the filter
| f | filter to get sampling rate from | |
| samplerate | sample rate to set the filter to |
| void del_aubio_filter | ( | aubio_filter_t * | f | ) |
delete a filter object
| f | filter object to delete |
| aubio_filter_t* new_aubio_filter | ( | uint_t | order | ) |
create new filter object
This function creates a new aubio_filter_t object, given the order of the filter.
| order | order of the filter (number of coefficients) |
1.5.6