From deb1fd481a56f1ef979ff1d70b0e6ac6252a13ab Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 29 Jan 2015 16:25:38 +0100 Subject: [PATCH] src/tempo/tempo.h: add aubio_tempo_get_silence and aubio_tempo_get_threshold --- src/tempo/tempo.c | 8 ++++++++ src/tempo/tempo.h | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/tempo/tempo.c b/src/tempo/tempo.c index e82a4016..c2b297bb 100644 --- a/src/tempo/tempo.c +++ b/src/tempo/tempo.c @@ -150,12 +150,20 @@ uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence) { return AUBIO_OK; } +smpl_t aubio_tempo_get_silence(aubio_tempo_t * o) { + return o->silence; +} + uint_t aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold) { o->threshold = threshold; aubio_peakpicker_set_threshold(o->pp, o->threshold); return AUBIO_OK; } +smpl_t aubio_tempo_get_threshold(aubio_tempo_t * o) { + return o->threshold; +} + /* Allocate memory for an tempo detection */ aubio_tempo_t * new_aubio_tempo (char_t * tempo_mode, uint_t buf_size, uint_t hop_size, uint_t samplerate) diff --git a/src/tempo/tempo.h b/src/tempo/tempo.h index b4742e73..eca68b5c 100644 --- a/src/tempo/tempo.h +++ b/src/tempo/tempo.h @@ -93,6 +93,15 @@ smpl_t aubio_tempo_get_last_ms (aubio_tempo_t *o); */ uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence); +/** get tempo detection silence threshold + + \param o tempo detection object as returned by new_aubio_tempo() + + \return current silence threshold + +*/ +smpl_t aubio_tempo_get_silence(aubio_tempo_t * o); + /** set tempo detection peak picking threshold \param o beat tracking object @@ -103,6 +112,15 @@ uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence); */ uint_t aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold); +/** get tempo peak picking threshold + + \param o tempo detection object as returned by new_aubio_tempo() + + \return current tempo detection threshold + +*/ +smpl_t aubio_tempo_get_threshold(aubio_tempo_t * o); + /** get current tempo \param o beat tracking object -- 2.11.0