1 | |
---|
2 | #include <aubio.h> |
---|
3 | |
---|
4 | int |
---|
5 | main () |
---|
6 | { |
---|
7 | uint_t win_s = 1024; /* window size */ |
---|
8 | uint_t channels = 1; /* number of channel */ |
---|
9 | cvec_t *in = new_cvec (win_s, channels); /* input buffer */ |
---|
10 | fvec_t *out = new_fvec (1, channels); /* input buffer */ |
---|
11 | |
---|
12 | aubio_onsetdetection_t *o; |
---|
13 | |
---|
14 | o = new_aubio_onsetdetection ("energy", win_s, channels); |
---|
15 | aubio_onsetdetection_do (o, in, out); |
---|
16 | del_aubio_onsetdetection (o); |
---|
17 | |
---|
18 | o = new_aubio_onsetdetection ("energy", win_s, channels); |
---|
19 | aubio_onsetdetection_do (o, in, out); |
---|
20 | del_aubio_onsetdetection (o); |
---|
21 | |
---|
22 | o = new_aubio_onsetdetection ("hfc", win_s, channels); |
---|
23 | aubio_onsetdetection_do (o, in, out); |
---|
24 | del_aubio_onsetdetection (o); |
---|
25 | |
---|
26 | o = new_aubio_onsetdetection ("complex", win_s, channels); |
---|
27 | aubio_onsetdetection_do (o, in, out); |
---|
28 | del_aubio_onsetdetection (o); |
---|
29 | |
---|
30 | o = new_aubio_onsetdetection ("phase", win_s, channels); |
---|
31 | aubio_onsetdetection_do (o, in, out); |
---|
32 | del_aubio_onsetdetection (o); |
---|
33 | |
---|
34 | o = new_aubio_onsetdetection ("kl", win_s, channels); |
---|
35 | aubio_onsetdetection_do (o, in, out); |
---|
36 | del_aubio_onsetdetection (o); |
---|
37 | |
---|
38 | o = new_aubio_onsetdetection ("mkl", win_s, channels); |
---|
39 | aubio_onsetdetection_do (o, in, out); |
---|
40 | del_aubio_onsetdetection (o); |
---|
41 | |
---|
42 | del_cvec (in); |
---|
43 | del_fvec (out); |
---|
44 | aubio_cleanup (); |
---|
45 | |
---|
46 | return 0; |
---|
47 | } |
---|