1 #define AUBIO_UNSTABLE 1
9 uint_t win_s = 1024; // window size
10 fvec_t * in = new_fvec (win_s); // input buffer
11 fvec_t * out = new_fvec (win_s / 4); // output beat position
13 // create beattracking object
14 aubio_beattracking_t * tempo = new_aubio_beattracking(win_s, 256, 44100);
16 smpl_t bpm, confidence;
19 // put some fresh data in feature vector
22 aubio_beattracking_do(tempo,in,out);
23 // do something with the beats
26 // get bpm and confidence
27 bpm = aubio_beattracking_get_bpm(tempo);
28 confidence = aubio_beattracking_get_confidence(tempo);
29 fprintf(stderr, "found bpm %f with confidence %f\n", bpm, confidence);
33 del_aubio_beattracking(tempo);