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