Changeset cb0415d


Ignore:
Timestamp:
Sep 6, 2007, 6:04:08 PM (17 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
21bd43c, 229ea56
Parents:
6fadb0d
Message:

tempo.{c,h}: add aubio_tempo_get_bpm, which for now just calls aubio_beattracking_get_bpm, also update test-tempo.c

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • examples/tests/test-tempo.c

    r6fadb0d rcb0415d  
    1010        uint_t i = 0;
    1111
     12        smpl_t curtempo;
     13
    1214        while (i < 1000) {
    1315          aubio_tempo(o,in,out);
     16          curtempo = aubio_tempo_get_bpm(o);
     17          if (curtempo != 0.) {
     18            fprintf(stdout,"%f\n",curtempo);
     19          }
    1420          i++;
    1521        };
  • src/tempo.c

    r6fadb0d rcb0415d  
    124124}
    125125
     126smpl_t aubio_tempo_get_bpm(aubio_tempo_t *o) {
     127  return aubio_beattracking_get_bpm(o->bt);
     128}
     129
    126130void del_aubio_tempo (aubio_tempo_t *o)
    127131{
  • src/tempo.h

    r6fadb0d rcb0415d  
    5050void aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold);
    5151
     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*/
     59smpl_t aubio_tempo_get_bpm(aubio_tempo_t * bt);
     60
    5261/** delete tempo detection object */
    5362void del_aubio_tempo(aubio_tempo_t * o);
Note: See TracChangeset for help on using the changeset viewer.