shithub: aubio

Download patch

ref: b9012288f1ee2598521be2c70ab0575e0a027b2d
parent: 000b0903393a05eceb0f62c92ed7edf5f070ca52
author: Paul Brossier <[email protected]>
date: Wed Sep 23 15:50:40 EDT 2009

examples/aubiomfcc.c: update to latest mfcc version

--- a/examples/aubiomfcc.c
+++ b/examples/aubiomfcc.c
@@ -24,7 +24,7 @@
 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 @@
       
       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 @@
 
 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);