source: tests/src/test-onsetdetection.c @ 36fa6cb

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

move python/tests to tests/python, examples/tests to tests/src, add .bzrignore

  • Property mode set to 100644
File size: 1.9 KB
Line 
1
2#include <aubio.h>
3
4int main(){
5        /* allocate some memory */
6        uint_t win_s      = 1024;                       /* window size */
7        uint_t channels   = 1;                          /* number of channel */
8        cvec_t * in       = new_cvec (win_s, channels); /* input buffer */
9        fvec_t * out      = new_fvec (1, channels);     /* input buffer */
10 
11        /* allocate fft and other memory space */
12        aubio_onsetdetection_t * o = 
13          new_aubio_onsetdetection(aubio_onset_energy, win_s, channels);
14        aubio_onsetdetection(o,in,out);
15        aubio_onsetdetection_energy(o,in,out);
16        del_aubio_onsetdetection(o);
17
18        o = new_aubio_onsetdetection(aubio_onset_specdiff, win_s, channels);
19        aubio_onsetdetection(o,in,out);
20        aubio_onsetdetection_specdiff(o,in,out);
21        del_aubio_onsetdetection(o);
22
23        o = new_aubio_onsetdetection(aubio_onset_hfc, win_s, channels);
24        aubio_onsetdetection(o,in,out);
25        aubio_onsetdetection_hfc(o,in,out);
26        del_aubio_onsetdetection(o);
27
28        o = new_aubio_onsetdetection(aubio_onset_complex, win_s, channels);
29        aubio_onsetdetection(o,in,out);
30        aubio_onsetdetection_complex(o,in,out);
31        del_aubio_onsetdetection(o);
32
33        o = new_aubio_onsetdetection(aubio_onset_phase, win_s, channels);
34        aubio_onsetdetection(o,in,out);
35        aubio_onsetdetection_phase(o,in,out);
36        del_aubio_onsetdetection(o);
37
38        o = new_aubio_onsetdetection(aubio_onset_kl, win_s, channels);
39        aubio_onsetdetection(o,in,out);
40        aubio_onsetdetection_kl(o,in,out);
41        del_aubio_onsetdetection(o);
42
43        o = new_aubio_onsetdetection(aubio_onset_mkl, win_s, channels);
44        aubio_onsetdetection(o,in,out);
45        aubio_onsetdetection_mkl(o,in,out);
46        del_aubio_onsetdetection(o);
47
48        del_cvec(in);
49        del_fvec(out);
50        aubio_cleanup();
51
52        return 0;
53}
54
Note: See TracBrowser for help on using the repository browser.