From: Paul Brossier Date: Wed, 23 Sep 2009 17:50:40 +0000 (+0200) Subject: examples/aubiomfcc.c: update to latest mfcc version X-Git-Tag: bzr2git~328 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b9012288f1ee2598521be2c70ab0575e0a027b2d;p=aubio.git examples/aubiomfcc.c: update to latest mfcc version --- diff --git a/examples/aubiomfcc.c b/examples/aubiomfcc.c index 80b0bc06..f5752cb3 100644 --- a/examples/aubiomfcc.c +++ b/examples/aubiomfcc.c @@ -24,7 +24,7 @@ fvec_t * mfcc_out; aubio_mfcc_t * mfcc; uint_t n_filters = 40; -uint_t n_coefs = 11; +uint_t n_coefs = 13; unsigned int pos = 0; /*frames%dspblocksize*/ uint_t usepitch = 0; @@ -69,12 +69,7 @@ void process_print (void) { uint_t coef_cnt; if (output_filename == NULL) { - if(frames >= 4) { - outmsg("%f\t",(frames-4)*overlap_size/(float)samplerate); - } - else if (frames < 4) { - outmsg("%f\t",0.); - } + outmsg("%f\t",frames*overlap_size/(float)samplerate); for (coef_cnt = 0; coef_cnt < n_coefs; coef_cnt++) { outmsg("%f ",mfcc_out->data[0][coef_cnt]); } @@ -84,17 +79,15 @@ void process_print (void) { int main(int argc, char **argv) { // params - buffer_size = 1024; - overlap_size = 512; + buffer_size = 512; + overlap_size = 256; examples_common_init(argc,argv); - smpl_t lowfreq = 133.333f; - smpl_t highfreq = 44100.f; mfcc_out = new_fvec(n_coefs,channels); //populating the filter - mfcc = new_aubio_mfcc(buffer_size, samplerate, n_filters, n_coefs , lowfreq, highfreq, channels); + mfcc = new_aubio_mfcc(buffer_size, samplerate, n_filters, n_coefs); //process examples_common_process(aubio_process,process_print);