From 0482e7675f5580c340a188f29fc6ae7485809066 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 12 Sep 2009 13:13:10 +0200 Subject: [PATCH] src/tempo/tempo.c: always output tempo, pass along interpolated position --- src/tempo/tempo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tempo/tempo.c b/src/tempo/tempo.c index 3a006361..46f6ea2b 100644 --- a/src/tempo/tempo.c +++ b/src/tempo/tempo.c @@ -75,13 +75,11 @@ void aubio_tempo(aubio_tempo_t *o, fvec_t * input, fvec_t * tempo) i=0; for (i = 1; i < o->out->data[0][0]; i++ ) { /* if current frame is a predicted tactus */ - if (o->blockpos == o->out->data[0][i]) { + if (o->blockpos == FLOOR(o->out->data[0][i])) { + tempo->data[0][0] = 1. + o->out->data[0][i] - FLOOR(o->out->data[0][i]); /* set tactus */ /* test for silence */ if (aubio_silence_detection(input, o->silence)==1) { tempo->data[0][1] = 0; /* unset onset */ - tempo->data[0][0] = 0; /* unset tactus */ - } else { - tempo->data[0][0] = 1; /* set tactus */ } } } -- 2.26.2