- Timestamp:
- Nov 17, 2018, 12:22:59 PM (6 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
- Children:
- 78706cd
- Parents:
- 6b46a4e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/filterbank_mel.c
r6b46a4e r831f702 91 91 92 92 /* compute triangle heights so that each triangle has unit area */ 93 for (fn = 0; fn < n_filters; fn++) { 94 triangle_heights->data[fn] = 95 2. / (upper_freqs->data[fn] - lower_freqs->data[fn]); 93 if (aubio_filterbank_get_norm(fb)) { 94 for (fn = 0; fn < n_filters; fn++) { 95 triangle_heights->data[fn] = 96 2. / (upper_freqs->data[fn] - lower_freqs->data[fn]); 97 } 98 } else { 99 fvec_ones (triangle_heights); 96 100 } 97 101 … … 118 122 119 123 /* compute positive slope step size */ 120 riseInc = 121 triangle_heights->data[fn] / 122 (center_freqs->data[fn] - lower_freqs->data[fn]); 124 riseInc = triangle_heights->data[fn] 125 / (center_freqs->data[fn] - lower_freqs->data[fn]); 123 126 124 127 /* compute coefficients in positive slope */ … … 134 137 135 138 /* compute negative slope step size */ 136 downInc = 137 triangle_heights->data[fn] / 138 (upper_freqs->data[fn] - center_freqs->data[fn]); 139 downInc = triangle_heights->data[fn] 140 / (upper_freqs->data[fn] - center_freqs->data[fn]); 139 141 140 142 /* compute coefficents in negative slope */
Note: See TracChangeset
for help on using the changeset viewer.