source: tests/src/spectral/test-specdesc.c @ 6938a20

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchpitchshiftsamplertimestretchyinfft+
Last change on this file since 6938a20 was 6938a20, checked in by Paul Brossier <piem@piem.org>, 7 years ago

tests/src/spectral/: improve examples

  • Property mode set to 100644
File size: 1001 bytes
Line 
1#include <aubio.h>
2
3int main ()
4{
5  uint_t win_s = 1024; // window size
6  cvec_t *in = new_cvec (win_s); // input buffer
7  fvec_t *out = new_fvec (1); // output spectral descriptor
8
9  aubio_specdesc_t *o;
10
11  o = new_aubio_specdesc ("energy", win_s);
12  aubio_specdesc_do (o, in, out);
13  del_aubio_specdesc (o);
14
15  o = new_aubio_specdesc ("energy", win_s);
16  aubio_specdesc_do (o, in, out);
17  del_aubio_specdesc (o);
18
19  o = new_aubio_specdesc ("hfc", win_s);
20  aubio_specdesc_do (o, in, out);
21  del_aubio_specdesc (o);
22
23  o = new_aubio_specdesc ("complex", win_s);
24  aubio_specdesc_do (o, in, out);
25  del_aubio_specdesc (o);
26
27  o = new_aubio_specdesc ("phase", win_s);
28  aubio_specdesc_do (o, in, out);
29  del_aubio_specdesc (o);
30
31  o = new_aubio_specdesc ("kl", win_s);
32  aubio_specdesc_do (o, in, out);
33  del_aubio_specdesc (o);
34
35  o = new_aubio_specdesc ("mkl", win_s);
36  aubio_specdesc_do (o, in, out);
37  del_aubio_specdesc (o);
38
39  del_cvec (in);
40  del_fvec (out);
41  aubio_cleanup ();
42
43  return 0;
44}
Note: See TracBrowser for help on using the repository browser.