Changes in / [21bd43c:8708556]
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/tests/test-beattracking.c
r21bd43c r8708556 13 13 uint_t i = 0; 14 14 15 smpl_t curtempo;16 17 15 while (i < 10) { 18 16 aubio_beattracking_do(tempo,in,out); 19 curtempo = aubio_beattracking_get_bpm(tempo);20 if (curtempo != 0.) {21 fprintf(stdout,"%f\n",curtempo);22 return 1;23 }24 17 i++; 25 18 }; -
examples/tests/test-tempo.c
r21bd43c r8708556 10 10 uint_t i = 0; 11 11 12 smpl_t curtempo;13 14 12 while (i < 1000) { 15 13 aubio_tempo(o,in,out); 16 curtempo = aubio_tempo_get_bpm(o);17 if (curtempo != 0.) {18 fprintf(stdout,"%f\n",curtempo);19 }20 14 i++; 21 15 }; -
src/beattracking.c
r21bd43c r8708556 453 453 454 454 } 455 456 smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * bt) {457 if (bt->timesig != 0 && bt->counter == 0 && bt->flagstep == 0) {458 return 5168. / (smpl_t)bt->gp;459 } else {460 return 0.;461 }462 } -
src/beattracking.h
r21bd43c r8708556 60 60 */ 61 61 void aubio_beattracking_do(aubio_beattracking_t * bt, fvec_t * dfframes, fvec_t * out); 62 /** get current tempo in bpm63 64 \param bt beat tracking object65 66 Returns the currently observed tempo, in beats per minutes, or 0 if no67 consistent value is found.68 69 */70 smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * bt);71 62 /** delete beat tracking object 72 63 -
src/tempo.c
r21bd43c r8708556 124 124 } 125 125 126 smpl_t aubio_tempo_get_bpm(aubio_tempo_t *o) {127 return aubio_beattracking_get_bpm(o->bt);128 }129 130 126 void del_aubio_tempo (aubio_tempo_t *o) 131 127 { -
src/tempo.h
r21bd43c r8708556 50 50 void aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold); 51 51 52 /** get current tempo53 54 \param bt beat tracking object55 56 Returns the currently observed tempo, or 0 if no consistent value is found57 58 */59 smpl_t aubio_tempo_get_bpm(aubio_tempo_t * bt);60 61 52 /** delete tempo detection object */ 62 53 void del_aubio_tempo(aubio_tempo_t * o);
Note: See TracChangeset
for help on using the changeset viewer.