Changeset fc2d7fb for src/spectral
- Timestamp:
- Feb 16, 2016, 9:48:32 PM (9 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:
- c02a1cc
- Parents:
- a7348ca5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/filterbank.c
ra7348ca5 rfc2d7fb 59 59 aubio_filterbank_do (aubio_filterbank_t * f, cvec_t * in, fvec_t * out) 60 60 { 61 uint_t j, fn; 61 /* apply filter to all input channel, provided out has enough channels */ 62 //uint_t max_filters = MIN (f->n_filters, out->length); 63 //uint_t max_length = MIN (in->length, f->filters->length); 62 64 63 /* apply filter to all input channel, provided out has enough channels */ 64 uint_t max_filters = MIN (f->n_filters, out->length); 65 uint_t max_length = MIN (in->length, f->filters->length); 65 // view cvec->norm as fvec->data 66 fvec_t tmp; 67 tmp.length = in->length; 68 tmp.data = in->norm; 66 69 67 /* reset all values in output vector */ 68 fvec_zeros (out); 69 70 /* for each filter */ 71 for (fn = 0; fn < max_filters; fn++) { 72 /* for each sample */ 73 for (j = 0; j < max_length; j++) { 74 out->data[fn] += in->norm[j] * f->filters->data[fn][j]; 75 } 76 } 70 fmat_vecmul(f->filters, &tmp, out); 77 71 78 72 return;
Note: See TracChangeset
for help on using the changeset viewer.