- Timestamp:
- Sep 29, 2009, 7:58:43 PM (15 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:
- a54502c
- Parents:
- 78d14d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/temporal/filter.c
r78d14d4 r6481c0c 37 37 }; 38 38 39 void aubio_filter_do(aubio_filter_t * f, fvec_t * in) { 40 aubio_filter_do_outplace(f, in, in); 39 void aubio_filter_do_outplace(aubio_filter_t * f, fvec_t * in, fvec_t * out) { 40 fvec_copy(in, out); 41 aubio_filter_do (f, out); 41 42 } 42 43 43 void aubio_filter_do _outplace(aubio_filter_t * f, fvec_t * in, fvec_t * out) {44 void aubio_filter_do(aubio_filter_t * f, fvec_t * in) { 44 45 uint_t i,j,l, order = f->order; 45 46 lsmp_t *x; … … 53 54 for (j = 0; j < in->length; j++) { 54 55 /* new input */ 55 if (IS_DENORMAL(in->data[i][j])) { 56 x[0] = y[0] = 0.; 57 } else { 58 x[0] = in->data[i][j]; 59 y[0] = b[0] * x[0]; 60 for (l=1;l<order; l++) { 61 y[0] += b[l] * x[l]; 62 y[0] -= a[l] * y[l]; 63 } 56 x[0] = KILL_DENORMAL(in->data[i][j]); 57 y[0] = b[0] * x[0]; 58 for (l=1;l<order; l++) { 59 y[0] += b[l] * x[l]; 60 y[0] -= a[l] * y[l]; 64 61 } 65 62 /* new output */ 66 out->data[i][j] = y[0];63 in->data[i][j] = y[0]; 67 64 /* store for next sample */ 68 65 for (l=order-1; l>0; l--){
Note: See TracChangeset
for help on using the changeset viewer.