source: tests/src/spectral/test-filterbank.c @ 986131d

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since 986131d was 986131d, checked in by Eduard Müller <mueller.eduard@googlemail.com>, 7 years ago

Intel IPP support for aubio

See emuell/aubio/ intel_ipp2 for details please

  • Property mode set to 100644
File size: 920 bytes
Line 
1#include <aubio.h>
2
3int main (void)
4{
5  aubio_init();
6 
7  uint_t win_s = 1024; // window size
8  uint_t n_filters = 13; // number of filters
9
10  cvec_t *in_spec = new_cvec (win_s); // input vector of samples
11  fvec_t *out_filters = new_fvec (n_filters); // per-band outputs
12
13  // create filterbank object
14  aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
15
16  // apply filterbank ten times
17  uint_t n = 10;
18  while (n) {
19    aubio_filterbank_do (o, in_spec, out_filters);
20    n--;
21  }
22
23  // print out filterbank coeffs
24  fmat_t *coeffs; // pointer to the coefficients
25  coeffs = aubio_filterbank_get_coeffs (o);
26  fmat_print (coeffs);
27
28  aubio_filterbank_set_coeffs (o, coeffs);
29  coeffs = aubio_filterbank_get_coeffs (o);
30  fmat_print (coeffs);
31
32  //fvec_print (out_filters);
33
34  // clean up
35  del_aubio_filterbank (o);
36  del_cvec (in_spec);
37  del_fvec (out_filters);
38 
39  aubio_cleanup ();
40
41  return 0;
42}
Note: See TracBrowser for help on using the repository browser.