Changeset 416c0b5


Ignore:
Timestamp:
Sep 6, 2007, 6:01:41 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:
6fadb0d
Parents:
ade9afe
Message:

beattracking.{h,c}: add function aubio_beattracking_get_bpm to return the observed tempo at any moment

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/beattracking.c

    rade9afe r416c0b5  
    453453
    454454}
     455
     456smpl_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

    rade9afe r416c0b5  
    6060*/
    6161void 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*/
     70smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * bt);
    6271/** delete beat tracking object
    6372
Note: See TracChangeset for help on using the changeset viewer.