Changeset 6938a20 for tests/src/spectral/test-mfcc.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-mfcc.c
r26775a3 r6938a20 1 1 #include <aubio.h> 2 2 3 int 4 main (void) 3 int main () 5 4 { 6 /* allocate some memory */ 7 uint_t win_s = 512; /* fft size */ 8 uint_t n_filters = 40; /* number of filters */ 9 uint_t n_coefs = 13; /* number of coefficients */ 10 cvec_t *in = new_cvec (win_s); /* input buffer */ 11 fvec_t *out = new_fvec (n_coefs); /* input buffer */ 12 smpl_t samplerate = 16000.; 5 uint_t win_s = 512; // fft size 6 uint_t n_filters = 40; // number of filters 7 uint_t n_coefs = 13; // number of coefficients 8 smpl_t samplerate = 16000.; // samplerate 9 cvec_t *in = new_cvec (win_s); // input buffer 10 fvec_t *out = new_fvec (n_coefs); // output coefficients 13 11 14 / * allocate fft and other memory space */12 // create mfcc object 15 13 aubio_mfcc_t *o = new_aubio_mfcc (win_s, n_filters, n_coefs, samplerate); 16 14 17 15 cvec_set (in, 1.); 18 19 aubio_mfcc_do (o, in, out);20 fvec_print (out);21 16 aubio_mfcc_do (o, in, out); 22 17 fvec_print (out); 23 18 19 cvec_set (in, .5); 20 aubio_mfcc_do (o, in, out); 21 fvec_print (out); 22 23 // clean up 24 24 del_aubio_mfcc (o); 25 25 del_cvec (in);
Note: See TracChangeset
for help on using the changeset viewer.