Changeset f264b17 for src/tempo/beattracking.c
- Timestamp:
- Jun 22, 2016, 1:00:10 PM (9 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:
- 4b9443c4
- Parents:
- 60fc05b (diff), 6769586 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tempo/beattracking.c
r60fc05b rf264b17 124 124 125 125 void 126 aubio_beattracking_do (aubio_beattracking_t * bt, fvec_t * dfframe,126 aubio_beattracking_do (aubio_beattracking_t * bt, const fvec_t * dfframe, 127 127 fvec_t * output) 128 128 { … … 410 410 411 411 smpl_t 412 aubio_beattracking_get_bpm (aubio_beattracking_t * bt) 412 aubio_beattracking_get_period (const aubio_beattracking_t * bt) 413 { 414 return bt->hop_size * bt->bp; 415 } 416 417 smpl_t 418 aubio_beattracking_get_period_s (const aubio_beattracking_t * bt) 419 { 420 return aubio_beattracking_get_period(bt) / (smpl_t) bt->samplerate; 421 } 422 423 smpl_t 424 aubio_beattracking_get_bpm (const aubio_beattracking_t * bt) 413 425 { 414 426 if (bt->bp != 0) { 415 return 60. * bt->samplerate/ bt->bp / bt->hop_size;427 return 60. / aubio_beattracking_get_period_s(bt); 416 428 } else { 417 429 return 0.; … … 420 432 421 433 smpl_t 422 aubio_beattracking_get_confidence ( aubio_beattracking_t * bt)434 aubio_beattracking_get_confidence (const aubio_beattracking_t * bt) 423 435 { 424 436 if (bt->gp) {
Note: See TracChangeset
for help on using the changeset viewer.