shithub: aubio

Download patch

ref: deb1fd481a56f1ef979ff1d70b0e6ac6252a13ab
parent: 9be906af5ff8216c2ff90b17ee4eb7b6fb37dd5c
author: Paul Brossier <piem@piem.org>
date: Thu Jan 29 11:25:38 EST 2015

src/tempo/tempo.h: add aubio_tempo_get_silence and aubio_tempo_get_threshold

--- a/src/tempo/tempo.c
+++ b/src/tempo/tempo.c
@@ -150,10 +150,18 @@
   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 */
--- a/src/tempo/tempo.h
+++ b/src/tempo/tempo.h
@@ -93,6 +93,15 @@
 */
 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
@@ -102,6 +111,15 @@
 
 */
 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