Ignore:
Timestamp:
Oct 19, 2009, 2:45:13 PM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
b849106
Parents:
59c046d
Message:

src/temporal: derive biquad from filter, use in peakpicker

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/temporal/biquad.h

    r59c046d rb01bd4a  
    2727  This file implements a normalised biquad filter (second order IIR):
    2828 
    29   \f$ 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] \f$
     29  \f$ 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] \f$
    3030
    3131  The filtfilt version runs the filter twice, forward and backward, to
    3232  compensate the phase shifting of the forward operation.
     33
     34  See also <a href="http://en.wikipedia.org/wiki/Digital_biquad_filter">Digital
     35  biquad filter</a> on wikipedia.
    3336
    3437*/
     
    3841#endif
    3942
    40 /** biquad filter object */
    41 typedef struct _aubio_biquad_t aubio_biquad_t;
     43/** set coefficients of a biquad filter
    4244
    43 /** filter input vector
    44 
    45   \param b biquad object as returned by new_aubio_biquad
    46   \param in input vector to filter
     45  \param b0 forward filter coefficient
     46  \param b1 forward filter coefficient
     47  \param b2 forward filter coefficient
     48  \param a1 feedback filter coefficient
     49  \param a2 feedback filter coefficient
    4750
    4851*/
    49 void aubio_biquad_do(aubio_biquad_t * b, fvec_t * in);
    50 /** filter input vector forward and backward
     52uint_t
     53aubio_filter_set_biquad (aubio_filter_t * f, lsmp_t b0, lsmp_t b1, lsmp_t b2,
     54    lsmp_t a1, lsmp_t a2);
    5155
    52   \param b biquad object as returned by new_aubio_biquad
    53   \param in input vector to filter
    54   \param tmp memory space to use for computation
     56/** create new biquad filter
     57
     58  \param b0 forward filter coefficient
     59  \param b1 forward filter coefficient
     60  \param b2 forward filter coefficient
     61  \param a1 feedback filter coefficient
     62  \param a2 feedback filter coefficient
    5563
    5664*/
    57 void aubio_biquad_do_filtfilt(aubio_biquad_t * b, fvec_t * in, fvec_t * tmp);
    58 /** create new biquad filter
    59 
    60   \param b1 forward filter coefficient
    61   \param b2 forward filter coefficient
    62   \param b3 forward filter coefficient
    63   \param a2 feedback filter coefficient
    64   \param a3 feedback filter coefficient
    65 
    66 */
    67 aubio_biquad_t * new_aubio_biquad(lsmp_t b1, lsmp_t b2, lsmp_t b3, lsmp_t a2, lsmp_t a3);
    68 
    69 /** delete biquad filter
    70  
    71   \param b biquad object to delete
    72 
    73 */
    74 void del_aubio_biquad(aubio_biquad_t * b);
     65aubio_filter_t *
     66new_aubio_filter_biquad (lsmp_t b0, lsmp_t b1, lsmp_t b2, lsmp_t a1, lsmp_t a2,
     67    uint_t channels);
    7568
    7669#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.