Changes in src/tempo/beattracking.c [2823389:72db1cf]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tempo/beattracking.c
r2823389 r72db1cf 171 171 /* find non-zero Rayleigh period */ 172 172 maxindex = fvec_max_elem (bt->acfout); 173 bt->rp = maxindex ? fvec_quad ratic_peak_pos(bt->acfout, maxindex) : 1;173 bt->rp = maxindex ? fvec_quadint (bt->acfout, maxindex) : 1; 174 174 //rp = (maxindex==127) ? 43 : maxindex; //rayparam 175 175 bt->rp = (maxindex == bt->acfout->length - 1) ? bt->rayparam : maxindex; //rayparam … … 183 183 /* end of biased filterbank */ 184 184 185 if (bp == 0) {186 output->data[0] = 0;187 return;188 }189 185 190 186 /* deliberate integer operation, could be set to 3 max eventually */ … … 208 204 phase = step - bt->lastbeat; 209 205 } else { 210 phase = fvec_quad ratic_peak_pos(bt->phout, maxindex);206 phase = fvec_quadint (bt->phout, maxindex); 211 207 } 212 208 /* take back one frame delay */ … … 310 306 } 311 307 fvec_weight (acfout, bt->gwv); 312 gp = fvec_quad ratic_peak_pos(acfout, fvec_max_elem (acfout));308 gp = fvec_quadint (acfout, fvec_max_elem (acfout)); 313 309 /* 314 310 while(gp<32) gp =gp*2; … … 386 382 387 383 /* if tempo is > 206 bpm, half it */ 388 while ( 0 < bp &&bp < 25) {384 while (bp < 25) { 389 385 #if AUBIO_BEAT_WARNINGS 390 386 AUBIO_WRN ("doubling from %f (%f bpm) to %f (%f bpm)\n", … … 413 409 aubio_beattracking_get_bpm (aubio_beattracking_t * bt) 414 410 { 415 if (bt-> bp != 0 && bt->timesig != 0 && bt->counter == 0 && bt->flagstep == 0) {416 return 5168. / fvec_quad ratic_peak_pos(bt->acfout, bt->bp);411 if (bt->timesig != 0 && bt->counter == 0 && bt->flagstep == 0) { 412 return 5168. / fvec_quadint (bt->acfout, bt->bp); 417 413 } else { 418 414 return 0.;
Note: See TracChangeset
for help on using the changeset viewer.