[4e9101e] | 1 | |
---|
| 2 | #include <aubio.h> |
---|
| 3 | |
---|
[01b8fcc] | 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; |
---|
[4e9101e] | 13 | |
---|
[b4f5967] | 14 | o = new_aubio_onsetdetection ("energy", win_s, channels); |
---|
[01b8fcc] | 15 | aubio_onsetdetection_do (o, in, out); |
---|
| 16 | del_aubio_onsetdetection (o); |
---|
| 17 | |
---|
[b4f5967] | 18 | o = new_aubio_onsetdetection ("energy", win_s, channels); |
---|
[01b8fcc] | 19 | aubio_onsetdetection_do (o, in, out); |
---|
| 20 | del_aubio_onsetdetection (o); |
---|
| 21 | |
---|
[b4f5967] | 22 | o = new_aubio_onsetdetection ("hfc", win_s, channels); |
---|
[01b8fcc] | 23 | aubio_onsetdetection_do (o, in, out); |
---|
| 24 | del_aubio_onsetdetection (o); |
---|
| 25 | |
---|
[b4f5967] | 26 | o = new_aubio_onsetdetection ("complex", win_s, channels); |
---|
[01b8fcc] | 27 | aubio_onsetdetection_do (o, in, out); |
---|
| 28 | del_aubio_onsetdetection (o); |
---|
| 29 | |
---|
[b4f5967] | 30 | o = new_aubio_onsetdetection ("phase", win_s, channels); |
---|
[01b8fcc] | 31 | aubio_onsetdetection_do (o, in, out); |
---|
| 32 | del_aubio_onsetdetection (o); |
---|
[4e9101e] | 33 | |
---|
[b4f5967] | 34 | o = new_aubio_onsetdetection ("kl", win_s, channels); |
---|
[01b8fcc] | 35 | aubio_onsetdetection_do (o, in, out); |
---|
| 36 | del_aubio_onsetdetection (o); |
---|
| 37 | |
---|
[b4f5967] | 38 | o = new_aubio_onsetdetection ("mkl", win_s, channels); |
---|
[01b8fcc] | 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 | } |
---|