- Timestamp:
- Sep 27, 2009, 2:19:49 AM (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:
- 17b7d66
- Parents:
- e792ea8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tempo/beattracking.c
re792ea8 r3de10bb 194 194 /* find Rayleigh period */ 195 195 maxindex = vec_max_elem (bt->phout); 196 if (maxindex == winlen) 197 maxindex = 0; 198 phase = 1. + vec_quadint (bt->phout, maxindex, 1); 196 if (maxindex >= winlen - 1) { 197 // AUBIO_WRN ("damned, no idea what this groove is\n"); 198 phase = step - bt->lastbeat; 199 } else { 200 phase = vec_quadint (bt->phout, maxindex, 1); 201 } 199 202 #if 0 // debug metronome mode 200 203 phase = step - bt->lastbeat; … … 206 209 i = 1; 207 210 beat = bp - phase; 211 //AUBIO_DBG ("beat: %f, bp: %f, phase: %f, lastbeat: %f, step: %d, winlen: %d\n", 212 // beat, bp, phase, bt->lastbeat, step, winlen); 208 213 /* start counting the beats */ 214 while (beat + bp < 0) { 215 beat += bp; 216 } 217 209 218 if (beat >= 0) { 219 //AUBIO_DBG ("beat: %d, %f, %f\n", i, bp, beat); 210 220 output->data[0][i] = beat; 211 221 i++; … … 214 224 while (beat + bp <= step) { 215 225 beat += bp; 226 //AUBIO_DBG ("beat: %d, %f, %f\n", i, bp, beat); 216 227 output->data[0][i] = beat; 217 228 i++;
Note: See TracChangeset
for help on using the changeset viewer.