[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 | |
---|
[01b8fcc] | 14 | o = new_aubio_onsetdetection (aubio_onset_energy, win_s, channels); |
---|
| 15 | aubio_onsetdetection_do (o, in, out); |
---|
| 16 | del_aubio_onsetdetection (o); |
---|
| 17 | |
---|
| 18 | o = new_aubio_onsetdetection (aubio_onset_specdiff, win_s, channels); |
---|
| 19 | aubio_onsetdetection_do (o, in, out); |
---|
| 20 | del_aubio_onsetdetection (o); |
---|
| 21 | |
---|
| 22 | o = new_aubio_onsetdetection (aubio_onset_hfc, win_s, channels); |
---|
| 23 | aubio_onsetdetection_do (o, in, out); |
---|
| 24 | del_aubio_onsetdetection (o); |
---|
| 25 | |
---|
| 26 | o = new_aubio_onsetdetection (aubio_onset_complex, win_s, channels); |
---|
| 27 | aubio_onsetdetection_do (o, in, out); |
---|
| 28 | del_aubio_onsetdetection (o); |
---|
| 29 | |
---|
| 30 | o = new_aubio_onsetdetection (aubio_onset_phase, win_s, channels); |
---|
| 31 | aubio_onsetdetection_do (o, in, out); |
---|
| 32 | del_aubio_onsetdetection (o); |
---|
[4e9101e] | 33 | |
---|
[01b8fcc] | 34 | o = new_aubio_onsetdetection (aubio_onset_kl, win_s, channels); |
---|
| 35 | aubio_onsetdetection_do (o, in, out); |
---|
| 36 | del_aubio_onsetdetection (o); |
---|
| 37 | |
---|
| 38 | o = new_aubio_onsetdetection (aubio_onset_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 | } |
---|