source: tests/src/spectral/test-filterbank.c @ 8f68dfb

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

tests/src/spectral/: improve test examples

  • Property mode set to 100644
File size: 750 bytes
Line 
1#define AUBIO_UNSTABLE 1
2
3#include <stdio.h>
4#include <aubio.h>
5
6int main (void) {
7  uint_t win_s = 1024; // window size
8  uint_t n_filters = 13; // number of filters
9  cvec_t *in = new_cvec (win_s); // input buffer
10  fvec_t *out = new_fvec (win_s); // vector output */
11  fmat_t *coeffs = NULL;
12
13  // create filterbank
14  aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
15
16  coeffs = aubio_filterbank_get_coeffs (o);
17  if (coeffs == NULL) {
18    return -1;
19  }
20
21  /*
22  if (fvec_max (coeffs) != 0.) {
23    return -1;
24  }
25
26  if (fvec_min (coeffs) != 0.) {
27    return -1;
28  }
29  */
30
31  fmat_print (coeffs);
32
33  aubio_filterbank_do (o, in, out);
34
35  del_aubio_filterbank (o);
36  del_cvec (in);
37  del_fvec (out);
38  aubio_cleanup ();
39
40  return 0;
41}
Note: See TracBrowser for help on using the repository browser.