1 #define AUBIO_UNSTABLE 1
11 uint_t win_s = 1024; // window size
12 fvec_t * in = new_fvec (win_s); // input buffer
13 fvec_t * out = new_fvec (win_s / 4); // output beat position
15 // create beattracking object
16 aubio_beattracking_t * tempo = new_aubio_beattracking(win_s, 256, 44100);
18 smpl_t bpm, confidence;
21 // put some fresh data in feature vector
24 aubio_beattracking_do(tempo,in,out);
25 // do something with the beats
28 // get bpm and confidence
29 bpm = aubio_beattracking_get_bpm(tempo);
30 confidence = aubio_beattracking_get_confidence(tempo);
31 fprintf(stderr, "found bpm %f with confidence %f\n", bpm, confidence);
35 del_aubio_beattracking(tempo);