Changes in / [8708556:21bd43c]
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/tests/test-beattracking.c
r8708556 r21bd43c 13 13 uint_t i = 0; 14 14 15 smpl_t curtempo; 16 15 17 while (i < 10) { 16 18 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 } 17 24 i++; 18 25 }; -
examples/tests/test-tempo.c
r8708556 r21bd43c 10 10 uint_t i = 0; 11 11 12 smpl_t curtempo; 13 12 14 while (i < 1000) { 13 15 aubio_tempo(o,in,out); 16 curtempo = aubio_tempo_get_bpm(o); 17 if (curtempo != 0.) { 18 fprintf(stdout,"%f\n",curtempo); 19 } 14 20 i++; 15 21 }; -
src/beattracking.c
r8708556 r21bd43c 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
r8708556 r21bd43c 60 60 */ 61 61 void aubio_beattracking_do(aubio_beattracking_t * bt, fvec_t * dfframes, fvec_t * out); 62 /** get current tempo in bpm 63 64 \param bt beat tracking object 65 66 Returns the currently observed tempo, in beats per minutes, or 0 if no 67 consistent value is found. 68 69 */ 70 smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * bt); 62 71 /** delete beat tracking object 63 72 -
src/tempo.c
r8708556 r21bd43c 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 126 130 void del_aubio_tempo (aubio_tempo_t *o) 127 131 { -
src/tempo.h
r8708556 r21bd43c 50 50 void aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold); 51 51 52 /** get current tempo 53 54 \param bt beat tracking object 55 56 Returns the currently observed tempo, or 0 if no consistent value is found 57 58 */ 59 smpl_t aubio_tempo_get_bpm(aubio_tempo_t * bt); 60 52 61 /** delete tempo detection object */ 53 62 void del_aubio_tempo(aubio_tempo_t * o);
Note: See TracChangeset
for help on using the changeset viewer.