- Timestamp:
- May 17, 2006, 9:43:27 PM (19 years ago)
- 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:
- f44b111
- Parents:
- ebfbd15
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/biquad.h
rebfbd15 rab0b69b 22 22 23 23 /** \file 24 * biquad filter 25 * 26 * \f$ y[n] = b_1 x[n] + b_2 x[n-1] + b_3 x[n-2] - 27 * a_2 y[n-1] - a_3 y[n-2] \f$ 28 */ 24 25 Second order Infinite Impulse Response filter 26 27 This file implements a normalised biquad filter (second order IIR): 28 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$ 30 31 The filtfilt version runs the filter twice, forward and backward, to 32 compensate the phase shifting of the forward operation. 33 34 */ 29 35 30 36 #ifdef __cplusplus … … 32 38 #endif 33 39 40 /** biquad filter object */ 34 41 typedef struct _aubio_biquad_t aubio_biquad_t; 35 42 43 /** filter input vector 44 45 \param b biquad object as returned by new_aubio_biquad 46 \param in input vector to filter 47 48 */ 36 49 void aubio_biquad_do(aubio_biquad_t * b, fvec_t * in); 50 /** filter input vector forward and backward 51 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 55 56 */ 37 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 */ 38 67 aubio_biquad_t * new_aubio_biquad(lsmp_t b1, lsmp_t b2, lsmp_t b3, lsmp_t a2, lsmp_t a3); 39 68 -
src/filter.h
rebfbd15 rab0b69b 22 22 23 23 /** \file 24 * filter 25 * 26 * \f$ y[n] = b_1 x[n] + ... + b_{order} x[n-order] - 27 * a_2 y[n-1] - ... - a_{order} y[n-order]\f$ 28 */ 24 25 Infinite Impulse Response filter 26 27 This file implements IIR filters of any order: 28 29 \f$ y[n] = b_1 x[n] + ... + b_{order} x[n-order] - 30 a_2 y[n-1] - ... - a_{order} y[n-order]\f$ 31 32 The filtfilt version runs the filter twice, forward and backward, to 33 compensate the phase shifting of the forward operation. 34 35 */ 29 36 30 37 #ifdef __cplusplus … … 32 39 #endif 33 40 41 /** IIR filter object */ 34 42 typedef struct _aubio_filter_t aubio_filter_t; 43 44 /** filter input vector (in-place) 45 46 \param b biquad object as returned by new_aubio_biquad 47 \param in input vector to filter 48 49 */ 35 50 void aubio_filter_do(aubio_filter_t * b, fvec_t * in); 51 /** filter input vector (out-of-place) 52 53 \param b biquad object as returned by new_aubio_biquad 54 \param in input vector to filter 55 \param out output vector to store filtered input 56 57 */ 36 58 void aubio_filter_do_outplace(aubio_filter_t * b, fvec_t * in, fvec_t * out); 59 /** filter input vector forward and backward 60 61 \param b biquad object as returned by new_aubio_biquad 62 \param in input vector to filter 63 \param tmp memory space to use for computation 64 65 */ 37 66 void aubio_filter_do_filtfilt(aubio_filter_t * b, fvec_t * in, fvec_t * tmp); 67 /** create new IIR filter 68 69 \param b vector of forward coefficients 70 \param a vector of feedback coefficients 71 \param order order of the filter (number of coefficients) 72 73 */ 38 74 aubio_filter_t * new_aubio_filter(uint_t samplerate, uint_t order); 75 /** create a new A-design filter 76 77 \param samplerate sampling-rate of the signal to filter 78 79 */ 39 80 aubio_filter_t * new_aubio_adsgn_filter(uint_t samplerate); 81 /** create a new C-design filter 82 83 \param samplerate sampling-rate of the signal to filter 84 85 */ 40 86 aubio_filter_t * new_aubio_cdsgn_filter(uint_t samplerate); 41 87
Note: See TracChangeset
for help on using the changeset viewer.