source: tests/src/test-onsetdetection.c @ f603b57

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

src/onset: rename aubio_onsetdetection to aubio_onsetdetection_do

  • 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 (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);
33
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}
Note: See TracBrowser for help on using the repository browser.