- Timestamp:
- Sep 12, 2007, 7:36:11 PM (17 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:
- e5f6a0b
- Parents:
- 95a64c7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/filterbank.c
r95a64c7 rbc4ba75 225 225 for(filter_cnt=0; filter_cnt<allFilters; filter_cnt++) 226 226 AUBIO_DBG("filter n. %d %f %f %f %f\n",filter_cnt, lower_freqs->data[0][filter_cnt], center_freqs->data[0][filter_cnt], upper_freqs->data[0][filter_cnt], triangle_heights->data[0][filter_cnt]); 227 228 227 229 228 //filling the fft_freqs lookup table, which assigns the frequency in hz to each bin 230 231 229 for(bin_cnt=0; bin_cnt<win_s; bin_cnt++){ 232 233 230 //TODO: check the formula! 234 235 231 fft_freqs->data[0][bin_cnt]= (smpl_t)samplerate* (smpl_t)bin_cnt/ (smpl_t)win_s; 236 237 } 238 239 232 } 233 240 234 //building each filter table 241 235 for(filter_cnt=0; filter_cnt<allFilters; filter_cnt++){ 242 236 243 237 //TODO:check special case : lower freq =0 244 245 238 //calculating rise increment in mag/Hz 246 239 smpl_t riseInc= triangle_heights->data[0][filter_cnt]/(center_freqs->data[0][filter_cnt]-lower_freqs->data[0][filter_cnt]); 247 240 241 242 AUBIO_DBG("\nfilter %d",filter_cnt); 248 243 //zeroing begining of filter 249 AUBIO_DBG("\nfilter %d",filter_cnt);250 251 244 AUBIO_DBG("\nzero begin\n"); 252 253 245 for(bin_cnt=0; bin_cnt<win_s-1; bin_cnt++){ 254 246 //zeroing beigining of array
Note: See TracChangeset
for help on using the changeset viewer.