source: tests/src/test-onsetdetection.c @ 3f99693

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

src/onset: use a string to set onset mode, keeping onset types enum private, update everywhere onsets are used

  • Property mode set to 100644
File size: 1.3 KB
Line 
1
2#include <aubio.h>
3
4int
5main ()
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}
Note: See TracBrowser for help on using the repository browser.