source: tests/src/tempo/test-beattracking.c @ c2e0aef

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since c2e0aef was e9436a6, checked in by Paul Brossier <piem@piem.org>, 12 years ago

tests/src/tempo/test-beattracking.c: fix output size

  • Property mode set to 100644
File size: 768 bytes
Line 
1#define AUBIO_UNSTABLE 1
2
3#include <aubio.h>
4
5int main ()
6{
7  uint_t i = 0;
8  uint_t win_s = 1024; // window size
9  fvec_t * in = new_fvec (win_s); // input buffer
10  fvec_t * out = new_fvec (win_s / 4); // output beat position
11
12  // create beattracking object
13  aubio_beattracking_t * tempo  = new_aubio_beattracking(win_s);
14
15  smpl_t bpm, confidence;
16
17  while (i < 10) {
18    // put some fresh data in feature vector
19    // ...
20
21    aubio_beattracking_do(tempo,in,out);
22    // do something  with the beats
23    // ...
24
25    // get bpm and confidence
26    bpm = aubio_beattracking_get_bpm(tempo);
27    confidence = aubio_beattracking_get_confidence(tempo);
28    i++;
29  };
30
31  del_aubio_beattracking(tempo);
32  del_fvec(in);
33  del_fvec(out);
34  aubio_cleanup();
35
36  return 0;
37}
38
Note: See TracBrowser for help on using the repository browser.