src/tempo/tempo.h: add aubio_tempo_get_silence and aubio_tempo_get_threshold
authorPaul Brossier <piem@piem.org>
Thu, 29 Jan 2015 15:25:38 +0000 (16:25 +0100)
committerPaul Brossier <piem@piem.org>
Thu, 29 Jan 2015 15:25:38 +0000 (16:25 +0100)
src/tempo/tempo.c
src/tempo/tempo.h

index e82a401..c2b297b 100644 (file)
@@ -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)
index b4742e7..eca68b5 100644 (file)
@@ -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