//number of harmonics in shift invariant comb filterbank
uint_t numelem = 4;
- smpl_t phase; // beat alignment (step - lastbeat)
- smpl_t beat; // beat position
+ smpl_t phase; // beat alignment (step - lastbeat)
+ smpl_t beat; // beat position
smpl_t bp; // beat period
uint_t a, b; // used to build shift invariant comb filterbank
uint_t kmax; // number of elements used to find beat phase
i = 1;
beat = bp - phase;
- // AUBIO_DBG ("bp: %f, phase: %f, lastbeat: %f, step: %d, winlen: %d\n",
+ // AUBIO_DBG ("bp: %f, phase: %f, lastbeat: %f, step: %d, winlen: %d\n",
// bp, phase, bt->lastbeat, step, winlen);
/* the next beat will be earlier than 60% of the tempo period
gp = 0;
}
- //now look for step change - i.e. a difference between gp and rp that
+ //now look for step change - i.e. a difference between gp and rp that
// is greater than 2*constthresh - always true in first case, since gp = 0
if (counter == 0) {
if (ABS (gp - rp) > 2. * bt->g_var) {
counter = 2; // let it look next time
}
} else if (counter > 0) {
- //if counter doesn't = 1,
+ //if counter doesn't = 1,
counter = counter - 1;
}
/*
- Copyright (C) 2003-2013 Matthew Davies and Paul Brossier <piem@aubio.org>
+ Copyright (C) 2003-2015 Matthew Davies and Paul Brossier <piem@aubio.org>
This file is part of aubio.
Engeeniring Society 118th Convention, Barcelona, Spain, May 2005.
\example tempo/test-beattracking.c
-
+
*/
#ifndef _AUBIO_BEATTRACKING_H
#define _AUBIO_BEATTRACKING_H
/** create beat tracking object
\param winlen length of the onset detection window
- \param hop_size number of onset detection samples [512]
+ \param hop_size number of onset detection samples [512]
\param samplerate samplerate of the input signal
*/
aubio_beattracking_t * new_aubio_beattracking(uint_t winlen, uint_t hop_size,
uint_t samplerate);
-/** track the beat
+/** track the beat
\param bt beat tracking object
\param dfframes current input detection function frame, smoothed by
- adaptive median threshold.
- \param out stored detected beat locations
+ adaptive median threshold.
+ \param out stored detected beat locations
*/
void aubio_beattracking_do (aubio_beattracking_t * bt, fvec_t * dfframes,
*/
smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * bt);
-/** get current tempo confidence
+/** get current tempo confidence
\param bt beat tracking object