Index: examples/tests/test-beattracking.c
===================================================================
--- examples/tests/test-beattracking.c	(revision 203c551c7a66307c45e1887a2d3194893b2feecd)
+++ examples/tests/test-beattracking.c	(revision e34b0101944dbd29c994deeabc481d7aa0032b9f)
@@ -13,5 +13,5 @@
         uint_t i = 0;
 
-        smpl_t curtempo;
+        smpl_t curtempo, curtempoconf;
 
         while (i < 10) {
@@ -19,4 +19,9 @@
           curtempo = aubio_beattracking_get_bpm(tempo);
           if (curtempo != 0.) {
+            fprintf(stdout,"%f\n",curtempo);
+            return 1;
+          }
+          curtempoconf = aubio_beattracking_get_confidence(tempo);
+          if (curtempoconf != 0.) {
             fprintf(stdout,"%f\n",curtempo);
             return 1;
Index: examples/tests/test-tempo.c
===================================================================
--- examples/tests/test-tempo.c	(revision 203c551c7a66307c45e1887a2d3194893b2feecd)
+++ examples/tests/test-tempo.c	(revision e34b0101944dbd29c994deeabc481d7aa0032b9f)
@@ -10,5 +10,5 @@
         uint_t i = 0;
 
-        smpl_t curtempo;
+        smpl_t curtempo, curtempoconf;
 
         while (i < 1000) {
@@ -17,4 +17,10 @@
           if (curtempo != 0.) {
             fprintf(stdout,"%f\n",curtempo);
+            return 1;
+          }
+          curtempoconf = aubio_beattracking_get_confidence(o);
+          if (curtempoconf != 0.) {
+            fprintf(stdout,"%f\n",curtempo);
+            return 1;
           }
           i++;
Index: src/beattracking.c
===================================================================
--- src/beattracking.c	(revision 203c551c7a66307c45e1887a2d3194893b2feecd)
+++ src/beattracking.c	(revision e34b0101944dbd29c994deeabc481d7aa0032b9f)
@@ -461,2 +461,7 @@
         }
 }
+
+smpl_t aubio_beattracking_get_confidence(aubio_beattracking_t * bt) {
+        if (bt->gp) return vec_max(bt->acfout);
+        else return 0.;
+}
Index: src/beattracking.h
===================================================================
--- src/beattracking.h	(revision 203c551c7a66307c45e1887a2d3194893b2feecd)
+++ src/beattracking.h	(revision e34b0101944dbd29c994deeabc481d7aa0032b9f)
@@ -69,4 +69,13 @@
 */
 smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * bt);
+/** get current tempo confidence 
+
+  \param bt beat tracking object
+
+  Returns the confidence with which the tempo has been observed, 0 if no
+  consistent value is found.
+
+*/
+smpl_t aubio_beattracking_get_confidence(aubio_beattracking_t * bt);
 /** delete beat tracking object
 
Index: src/tempo.c
===================================================================
--- src/tempo.c	(revision 203c551c7a66307c45e1887a2d3194893b2feecd)
+++ src/tempo.c	(revision e34b0101944dbd29c994deeabc481d7aa0032b9f)
@@ -128,4 +128,8 @@
 }
 
+smpl_t aubio_tempo_get_confidence(aubio_tempo_t *o) {
+  return aubio_beattracking_get_confidence(o->bt);
+}
+
 void del_aubio_tempo (aubio_tempo_t *o)
 {
Index: src/tempo.h
===================================================================
--- src/tempo.h	(revision 203c551c7a66307c45e1887a2d3194893b2feecd)
+++ src/tempo.h	(revision e34b0101944dbd29c994deeabc481d7aa0032b9f)
@@ -59,4 +59,14 @@
 smpl_t aubio_tempo_get_bpm(aubio_tempo_t * bt);
 
+/** get current tempo confidence
+
+  \param bt beat tracking object
+
+  Returns the confidence with which the tempo has been observed, 0 if no
+  consistent value is found.
+
+*/
+smpl_t aubio_tempo_get_confidence(aubio_tempo_t * bt);
+
 /** delete tempo detection object */
 void del_aubio_tempo(aubio_tempo_t * o);
Index: swig/aubio.i
===================================================================
--- swig/aubio.i	(revision 203c551c7a66307c45e1887a2d3194893b2feecd)
+++ swig/aubio.i	(revision e34b0101944dbd29c994deeabc481d7aa0032b9f)
@@ -258,4 +258,6 @@
 void aubio_beattracking_do(aubio_beattracking_t * bt, fvec_t * dfframes, fvec_t * out);
 void del_aubio_beattracking(aubio_beattracking_t * p);
+smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * p);
+smpl_t aubio_beattracking_get_confidence(aubio_beattracking_t * p);
 
 
