5 uint_t win_s = 1024; // window size
6 uint_t n_filters = 13; // number of filters
8 cvec_t *in_spec = new_cvec (win_s); // input vector of samples
9 fvec_t *out_filters = new_fvec (n_filters); // per-band outputs
11 // create filterbank object
12 aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
14 smpl_t power = aubio_filterbank_get_power(o);
15 smpl_t norm = aubio_filterbank_get_norm(o);
16 if (aubio_filterbank_set_power(o, power)) {
19 if (aubio_filterbank_set_norm(o, norm)) {
23 // apply filterbank ten times
26 aubio_filterbank_do (o, in_spec, out_filters);
30 // print out filterbank coeffs
31 fmat_t *coeffs; // pointer to the coefficients
32 coeffs = aubio_filterbank_get_coeffs (o);
35 aubio_filterbank_set_coeffs (o, coeffs);
36 coeffs = aubio_filterbank_get_coeffs (o);
39 //fvec_print (out_filters);
42 del_aubio_filterbank (o);
44 del_fvec (out_filters);