ref: 42c3dc03b1c1ab1013f95e181f71b639b4966d28
parent: 5f5edc116c0b9efc08b2c47be149e76cf9a7b35a
author: Paul Brossier <piem@piem.org>
date: Mon Nov 2 18:06:55 EST 2015
src/tempo/tempo.{c,h}: add _get_period and _get_period_s
--- a/src/tempo/tempo.c
+++ b/src/tempo/tempo.c
@@ -225,6 +225,16 @@
return aubio_beattracking_get_bpm(o->bt);
}
+smpl_t aubio_tempo_get_period (aubio_tempo_t *o)
+{
+ return aubio_beattracking_get_period (o->bt);
+}
+
+smpl_t aubio_tempo_get_period_s (aubio_tempo_t *o)
+{
+ return aubio_beattracking_get_period_s (o->bt);
+}
+
smpl_t aubio_tempo_get_confidence(aubio_tempo_t *o) {
return aubio_beattracking_get_confidence(o->bt);
}
--- a/src/tempo/tempo.h
+++ b/src/tempo/tempo.h
@@ -121,6 +121,26 @@
*/
smpl_t aubio_tempo_get_threshold(aubio_tempo_t * o);
+/** get current beat period in samples
+
+ \param bt beat tracking object
+
+ Returns the currently observed period, in samples, or 0 if no consistent
+ value is found.
+
+*/
+smpl_t aubio_tempo_get_period (aubio_tempo_t * bt);
+
+/** get current beat period in seconds
+
+ \param bt beat tracking object
+
+ Returns the currently observed period, in seconds, or 0 if no consistent
+ value is found.
+
+*/
+smpl_t aubio_tempo_get_period_s (aubio_tempo_t * bt);
+
/** get current tempo
\param o beat tracking object