- Timestamp:
- Nov 2, 2015, 11:02:58 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:
- 42c3dc0
- Parents:
- 43b7c6d
- Location:
- src/tempo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tempo/beattracking.c
r43b7c6d r5f5edc1 410 410 411 411 smpl_t 412 aubio_beattracking_get_period (aubio_beattracking_t * bt) 413 { 414 return bt->hop_size * bt->bp; 415 } 416 417 smpl_t 418 aubio_beattracking_get_period_s (aubio_beattracking_t * bt) 419 { 420 return aubio_beattracking_get_period(bt) / (smpl_t) bt->samplerate; 421 } 422 423 smpl_t 412 424 aubio_beattracking_get_bpm (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.; -
src/tempo/beattracking.h
r43b7c6d r5f5edc1 68 68 fvec_t * out); 69 69 70 /** get current beat period in samples 71 72 \param bt beat tracking object 73 74 Returns the currently observed period, in samples, or 0 if no consistent 75 value is found. 76 77 */ 78 smpl_t aubio_beattracking_get_period (aubio_beattracking_t * bt); 79 80 /** get current beat period in seconds 81 82 \param bt beat tracking object 83 84 Returns the currently observed period, in seconds, or 0 if no consistent 85 value is found. 86 87 */ 88 smpl_t aubio_beattracking_get_period_s (aubio_beattracking_t * bt); 89 70 90 /** get current tempo in bpm 71 91
Note: See TracChangeset
for help on using the changeset viewer.