- Timestamp:
- Oct 15, 2013, 10:57:38 PM (11 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:
- 735a739
- Parents:
- 69c39ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tempo/beattracking.c
r69c39ca racd97d1 171 171 /* find non-zero Rayleigh period */ 172 172 maxindex = fvec_max_elem (bt->acfout); 173 bt->rp = maxindex ? fvec_quad int(bt->acfout, maxindex) : 1;173 bt->rp = maxindex ? fvec_quadratic_peak_pos (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 … … 204 204 phase = step - bt->lastbeat; 205 205 } else { 206 phase = fvec_quad int(bt->phout, maxindex);206 phase = fvec_quadratic_peak_pos (bt->phout, maxindex); 207 207 } 208 208 /* take back one frame delay */ … … 306 306 } 307 307 fvec_weight (acfout, bt->gwv); 308 gp = fvec_quad int(acfout, fvec_max_elem (acfout));308 gp = fvec_quadratic_peak_pos (acfout, fvec_max_elem (acfout)); 309 309 /* 310 310 while(gp<32) gp =gp*2; … … 409 409 aubio_beattracking_get_bpm (aubio_beattracking_t * bt) 410 410 { 411 if (bt-> timesig != 0 && bt->counter == 0 && bt->flagstep == 0) {412 return 5168. / fvec_quad int(bt->acfout, bt->bp);411 if (bt->bp != 0 && bt->timesig != 0 && bt->counter == 0 && bt->flagstep == 0) { 412 return 5168. / fvec_quadratic_peak_pos (bt->acfout, bt->bp); 413 413 } else { 414 414 return 0.;
Note: See TracChangeset
for help on using the changeset viewer.