Changeset 6938a20 for tests/src/spectral/test-filterbank.c
- Timestamp:
- Mar 3, 2013, 7:37:43 PM (12 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 9547247
- Parents:
- 26775a3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/spectral/test-filterbank.c
r26775a3 r6938a20 1 #define AUBIO_UNSTABLE 12 3 #include <stdio.h>4 1 #include <aubio.h> 5 2 6 int main (void) { 3 int main () 4 { 7 5 uint_t win_s = 1024; // window size 8 6 uint_t n_filters = 13; // number of filters 9 cvec_t *in = new_cvec (win_s); // input buffer10 fvec_t *out = new_fvec (win_s); // vector output */11 fmat_t *coeffs = NULL;12 7 13 // create filterbank 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 10 fmat_t *coeffs; // pointer to the coefficients 11 12 // create filterbank object 14 13 aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s); 15 14 16 15 coeffs = aubio_filterbank_get_coeffs (o); 17 if (coeffs == NULL) {18 return -1;19 }20 16 21 /* 22 if (fvec_max (coeffs) != 0.) { 23 return -1; 24 } 17 aubio_filterbank_do (o, in_spec, out_filters); 25 18 26 if (fvec_min (coeffs) != 0.) { 27 return -1; 28 } 29 */ 30 31 fmat_print (coeffs); 32 33 aubio_filterbank_do (o, in, out); 19 // fmat_print (coeffs); 20 // cvec_print(in_spec); 21 // fvec_print(out_filters); 34 22 35 23 del_aubio_filterbank (o); 36 del_cvec (in );37 del_fvec (out );24 del_cvec (in_spec); 25 del_fvec (out_filters); 38 26 aubio_cleanup (); 39 27
Note: See TracChangeset
for help on using the changeset viewer.