From: Paul Brossier Date: Sat, 12 Sep 2009 11:13:10 +0000 (+0200) Subject: src/tempo/tempo.c: always output tempo, pass along interpolated position X-Git-Tag: bzr2git~367 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0482e7675f5580c340a188f29fc6ae7485809066;p=aubio.git src/tempo/tempo.c: always output tempo, pass along interpolated position --- 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 */ } } }