shithub: aubio

Download patch

ref: aea235c732e935b5f9448ae3b51badef8b94ee3e
parent: 4621cd6431bcc8ddc7312dc0d98482cfeabaa17a
author: Paul Brossier <piem@piem.org>
date: Thu Dec 3 20:47:17 EST 2009

tests/src: switch to mono

--- a/tests/src/temporal/test-aweighting.c
+++ b/tests/src/temporal/test-aweighting.c
@@ -7,28 +7,27 @@
   uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000};
   uint_t nrates = 6;
   uint_t samplerate, i = 0;
-  uint_t channels = 2;
 
   for ( samplerate = rates[i]; i < nrates ; i++ ) {
-    f = new_aubio_filter_a_weighting (channels, samplerate);
+    f = new_aubio_filter_a_weighting (samplerate);
     del_aubio_filter (f);
 
-    f = new_aubio_filter (7, channels*2);
+    f = new_aubio_filter (7);
     aubio_filter_set_a_weighting (f, samplerate);
     del_aubio_filter (f);
   }
 
   // samplerate unknown
-  f = new_aubio_filter_a_weighting (channels, 4200);
+  f = new_aubio_filter_a_weighting (4200);
   del_aubio_filter (f);
 
   // order to small
-  f = new_aubio_filter (2, channels*2);
+  f = new_aubio_filter (2);
   aubio_filter_set_a_weighting (f, samplerate);
   del_aubio_filter (f);
 
   // order to big
-  f = new_aubio_filter (12, channels*2);
+  f = new_aubio_filter (12);
   aubio_filter_set_a_weighting (f, samplerate);
   del_aubio_filter (f);
 
--- a/tests/src/temporal/test-cweighting.c
+++ b/tests/src/temporal/test-cweighting.c
@@ -7,28 +7,27 @@
   uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000};
   uint_t nrates = 6;
   uint_t samplerate, i = 0;
-  uint_t channels = 2;
 
   for ( samplerate = rates[i]; i < nrates ; i++ ) {
-    f = new_aubio_filter_c_weighting (channels, samplerate);
+    f = new_aubio_filter_c_weighting (samplerate);
     del_aubio_filter (f);
 
-    f = new_aubio_filter (5, channels*2);
+    f = new_aubio_filter (5);
     aubio_filter_set_c_weighting (f, samplerate);
     del_aubio_filter (f);
   }
 
   // samplerate unknown
-  f = new_aubio_filter_c_weighting (channels, 4200);
+  f = new_aubio_filter_c_weighting (4200);
   del_aubio_filter (f);
 
   // order to small
-  f = new_aubio_filter (2, channels*2);
+  f = new_aubio_filter (2);
   aubio_filter_set_c_weighting (f, samplerate);
   del_aubio_filter (f);
 
   // order to big
-  f = new_aubio_filter (12, channels*2);
+  f = new_aubio_filter (12);
   aubio_filter_set_c_weighting (f, samplerate);
   del_aubio_filter (f);
 
--- a/tests/src/test-beattracking.c
+++ b/tests/src/test-beattracking.c
@@ -6,12 +6,11 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
-        fvec_t * out      = new_fvec (win_s/4, channels);     /* input buffer */
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
+        fvec_t * out      = new_fvec (win_s/4);     /* input buffer */
   
         /* allocate fft and other memory space */
-        aubio_beattracking_t * tempo  = new_aubio_beattracking(win_s, channels);
+        aubio_beattracking_t * tempo  = new_aubio_beattracking(win_s);
 
         uint_t i = 0;
 
--- a/tests/src/test-biquad.c
+++ b/tests/src/test-biquad.c
@@ -3,9 +3,8 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
-        aubio_filter_t * o = new_aubio_filter_biquad(0.3,0.2,0.1,0.2,0.3, channels);
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
+        aubio_filter_t * o = new_aubio_filter_biquad(0.3,0.2,0.1,0.2,0.3);
 
         aubio_filter_do_filtfilt(o,in,in);
         aubio_filter_do(o,in);
--- a/tests/src/test-cvec.c
+++ b/tests/src/test-cvec.c
@@ -3,8 +3,7 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        cvec_t * sp       = new_cvec (win_s, channels); /* input buffer */
+        cvec_t * sp       = new_cvec (win_s); /* input buffer */
         del_cvec(sp);
 
         return 0;
--- a/tests/src/test-fft.c
+++ b/tests/src/test-fft.c
@@ -4,20 +4,19 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 8;                       /* window size        */
-        uint_t channels   = 1;                        /* number of channels */
-        fvec_t * in       = new_fvec (win_s, channels); /* input buffer       */
-        cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
-        fvec_t * out      = new_fvec (win_s, channels); /* output buffer      */
-        in->data[0][0] = 1;
-        in->data[0][1] = 2;
-        in->data[0][2] = 3;
-        in->data[0][3] = 4;
-        in->data[0][4] = 5;
-        in->data[0][5] = 6;
-        in->data[0][6] = 5;
-        in->data[0][7] = 6;
+        fvec_t * in       = new_fvec (win_s); /* input buffer       */
+        cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */
+        fvec_t * out      = new_fvec (win_s); /* output buffer      */
+        in->data[0] = 1;
+        in->data[1] = 2;
+        in->data[2] = 3;
+        in->data[3] = 4;
+        in->data[4] = 5;
+        in->data[5] = 6;
+        in->data[6] = 5;
+        in->data[7] = 6;
         /* allocate fft and other memory space */
-        aubio_fft_t * fft = new_aubio_fft(win_s,channels);
+        aubio_fft_t * fft = new_aubio_fft(win_s);
         /* fill input with some data */
         fvec_print(in);
         /* execute stft */
--- a/tests/src/test-filter.c
+++ b/tests/src/test-filter.c
@@ -5,27 +5,26 @@
 {
   /* allocate some memory */
   uint_t win_s = 32;            /* window size */
-  uint_t channels = 1;          /* number of channel */
-  fvec_t *in = new_fvec (win_s, channels);      /* input buffer */
-  fvec_t *out = new_fvec (win_s, channels);     /* input buffer */
+  fvec_t *in = new_fvec (win_s);      /* input buffer */
+  fvec_t *out = new_fvec (win_s);     /* input buffer */
 
 
-  aubio_filter_t *o = new_aubio_filter_c_weighting (channels, 44100);
-  in->data[0][12] = 0.5;
+  aubio_filter_t *o = new_aubio_filter_c_weighting (44100);
+  in->data[12] = 0.5;
   fvec_print (in);
   aubio_filter_do (o, in);
   fvec_print (in);
   del_aubio_filter (o);
 
-  o = new_aubio_filter_c_weighting (channels, 44100);
-  in->data[0][12] = 0.5;
+  o = new_aubio_filter_c_weighting (44100);
+  in->data[12] = 0.5;
   fvec_print (in);
   aubio_filter_do_outplace (o, in, out);
   fvec_print (out);
   del_aubio_filter (o);
 
-  o = new_aubio_filter_c_weighting (channels, 44100);
-  in->data[0][12] = 0.5;
+  o = new_aubio_filter_c_weighting (44100);
+  in->data[12] = 0.5;
   fvec_print (in);
   aubio_filter_do_filtfilt (o, in, out);
   fvec_print (out);
--- a/tests/src/test-filterbank.c
+++ b/tests/src/test-filterbank.c
@@ -8,11 +8,10 @@
 {
   /* allocate some memory */
   uint_t win_s = 1024;          /* window size */
-  uint_t channels = 2;          /* number of channel */
   uint_t n_filters = 13;        /* number of filters */
-  cvec_t *in = new_cvec (win_s, channels);      /* input buffer */
-  fvec_t *out = new_fvec (win_s, channels);     /* input buffer */
-  fvec_t *coeffs = NULL;
+  cvec_t *in = new_cvec (win_s);      /* input buffer */
+  fvec_t *out = new_fvec (win_s);     /* input buffer */
+  fmat_t *coeffs = NULL;
 
   /* allocate fft and other memory space */
   aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
@@ -22,6 +21,7 @@
     return -1;
   }
 
+  /*
   if (fvec_max (coeffs) != 0.) {
     return -1;
   }
@@ -29,8 +29,9 @@
   if (fvec_min (coeffs) != 0.) {
     return -1;
   }
+  */
 
-  fvec_print (coeffs);
+  fmat_print (coeffs);
 
   aubio_filterbank_do (o, in, out);
 
--- a/tests/src/test-filterbank_mel.c
+++ b/tests/src/test-filterbank_mel.c
@@ -8,11 +8,10 @@
 {
   /* allocate some memory */
   uint_t win_s = 512;           /* fft size */
-  uint_t channels = 2;          /* number of channel */
   uint_t n_filters = 40;        /* number of filters */
-  cvec_t *in = new_cvec (win_s, channels);      /* input buffer */
-  fvec_t *out = new_fvec (win_s, channels);     /* input buffer */
-  fvec_t *coeffs = NULL;
+  cvec_t *in = new_cvec (win_s);      /* input buffer */
+  fvec_t *out = new_fvec (win_s);     /* input buffer */
+  fmat_t *coeffs = NULL;
   smpl_t samplerate = 16000.;
 
   /* allocate fft and other memory space */
@@ -26,7 +25,7 @@
     return -1;
   }
 
-  //fvec_print (coeffs);
+  //fmat_print (coeffs);
 
   //fprintf(stderr, "%f\n", fvec_sum(coeffs));
 
--- a/tests/src/test-fvec.c
+++ b/tests/src/test-fvec.c
@@ -3,8 +3,7 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
         del_fvec(in);
 
         return 0;
--- a/tests/src/test-hist.c
+++ b/tests/src/test-hist.c
@@ -7,7 +7,7 @@
 {
   uint_t length;
   for (length = 1; length < 10; length ++ ) {
-    aubio_hist_t *o = new_aubio_hist(0, 1, length, 5);
+    aubio_hist_t *o = new_aubio_hist(0, 1, length);
     fvec_t *t = new_aubio_window("hanning", length);
     aubio_hist_do(o,t);
     fvec_print(t);
--- a/tests/src/test-mfcc.c
+++ b/tests/src/test-mfcc.c
@@ -5,11 +5,10 @@
 {
   /* allocate some memory */
   uint_t win_s = 512;           /* fft size */
-  uint_t channels = 1;          /* number of channel */
   uint_t n_filters = 40;        /* number of filters */
   uint_t n_coefs = 13;          /* number of coefficients */
-  cvec_t *in = new_cvec (win_s, channels);      /* input buffer */
-  fvec_t *out = new_fvec (n_coefs, channels);     /* input buffer */
+  cvec_t *in = new_cvec (win_s);      /* input buffer */
+  fvec_t *out = new_fvec (n_coefs);     /* input buffer */
   smpl_t samplerate = 16000.;
 
   /* allocate fft and other memory space */
--- a/tests/src/test-onset.c
+++ b/tests/src/test-onset.c
@@ -3,10 +3,9 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec_t * in       = new_fvec (win_s/4, channels); /* input buffer */
-        fvec_t * out      = new_fvec (2, channels);     /* input buffer */
-        aubio_onset_t * onset  = new_aubio_onset("complex", win_s, win_s/4, channels, 44100.);
+        fvec_t * in       = new_fvec (win_s/4); /* input buffer */
+        fvec_t * out      = new_fvec (2);     /* input buffer */
+        aubio_onset_t * onset  = new_aubio_onset("complex", win_s, win_s/4, 44100.);
         uint_t i = 0;
 
         while (i < 10) {
--- a/tests/src/test-onsetdetection.c
+++ b/tests/src/test-onsetdetection.c
@@ -7,37 +7,36 @@
 main ()
 {
   uint_t win_s = 1024;          /* window size */
-  uint_t channels = 1;          /* number of channel */
-  cvec_t *in = new_cvec (win_s, channels);      /* input buffer */
-  fvec_t *out = new_fvec (1, channels); /* input buffer */
+  cvec_t *in = new_cvec (win_s);      /* input buffer */
+  fvec_t *out = new_fvec (1); /* input buffer */
 
   aubio_specdesc_t *o;
   
-  o = new_aubio_specdesc ("energy", win_s, channels);
+  o = new_aubio_specdesc ("energy", win_s);
   aubio_specdesc_do (o, in, out);
   del_aubio_specdesc (o);
 
-  o = new_aubio_specdesc ("energy", win_s, channels);
+  o = new_aubio_specdesc ("energy", win_s);
   aubio_specdesc_do (o, in, out);
   del_aubio_specdesc (o);
 
-  o = new_aubio_specdesc ("hfc", win_s, channels);
+  o = new_aubio_specdesc ("hfc", win_s);
   aubio_specdesc_do (o, in, out);
   del_aubio_specdesc (o);
 
-  o = new_aubio_specdesc ("complex", win_s, channels);
+  o = new_aubio_specdesc ("complex", win_s);
   aubio_specdesc_do (o, in, out);
   del_aubio_specdesc (o);
 
-  o = new_aubio_specdesc ("phase", win_s, channels);
+  o = new_aubio_specdesc ("phase", win_s);
   aubio_specdesc_do (o, in, out);
   del_aubio_specdesc (o);
 
-  o = new_aubio_specdesc ("kl", win_s, channels);
+  o = new_aubio_specdesc ("kl", win_s);
   aubio_specdesc_do (o, in, out);
   del_aubio_specdesc (o);
 
-  o = new_aubio_specdesc ("mkl", win_s, channels);
+  o = new_aubio_specdesc ("mkl", win_s);
   aubio_specdesc_do (o, in, out);
   del_aubio_specdesc (o);
 
--- a/tests/src/test-peakpick.c
+++ b/tests/src/test-peakpick.c
@@ -5,9 +5,8 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
-        fvec_t * out      = new_fvec (1, channels); /* input buffer */
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
+        fvec_t * out      = new_fvec (1); /* input buffer */
         aubio_peakpicker_t * o = new_aubio_peakpicker(1);
         aubio_peakpicker_set_threshold (o, 0.3);
 
--- a/tests/src/test-phasevoc-jack.c
+++ b/tests/src/test-phasevoc-jack.c
@@ -21,21 +21,24 @@
 uint_t midiout  = 2;  /* number of midi output channels    */
 uint_t pos      = 0;  /* frames%dspblocksize for jack loop */
 
-fvec_t * in;
-cvec_t * fftgrain;
-fvec_t * out;
+fvec_t * in[2];
+cvec_t * fftgrain[2];
+fvec_t * out[2];
 
-aubio_pvoc_t * pv;
+aubio_pvoc_t * pv[2];
 
 int aubio_process(float **input, float **output, int nframes);
 
 int main(){
         /* allocate some memory */
-        in       = new_fvec (hop_s, channels); /* input buffer       */
-        fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
-        out      = new_fvec (hop_s, channels); /* output buffer      */
+  uint_t i;
+    for (i=0;i<channels;i++) {
+        in[i]       = new_fvec (hop_s); /* input buffer       */
+        fftgrain[i] = new_cvec (win_s); /* fft norm and phase */
+        out[i]      = new_fvec (hop_s); /* output buffer      */
         /* allocate fft and other memory space */
-        pv = new_aubio_pvoc(win_s,hop_s,channels);
+        pv[i] = new_aubio_pvoc(win_s,hop_s);
+    }
 
 #ifdef HAVE_JACK
         aubio_jack_t * jack_setup;
@@ -52,10 +55,12 @@
         fprintf(stderr, "WARNING: no jack support\n");
 #endif
         
-        del_aubio_pvoc(pv);
-        del_cvec(fftgrain);
-        del_fvec(in);
-        del_fvec(out);
+    for (i=0;i<channels;i++) {
+        del_aubio_pvoc(pv[i]);
+        del_cvec(fftgrain[i]);
+        del_fvec(in[i]);
+        del_fvec(out[i]);
+    }
         aubio_cleanup();
         return 0;
 }
@@ -66,24 +71,26 @@
   for (j=0;j<(unsigned)nframes;j++) {
     for (i=0;i<channels;i++) {
       /* write input to datanew */
-      fvec_write_sample(in, input[i][j], i, pos);
+      fvec_write_sample(in[i], input[i][j], pos);
       /* put synthnew in output */
-      output[i][j] = fvec_read_sample(out, i, pos);
+      output[i][j] = fvec_read_sample(out[i], pos);
     }
     /*time for fft*/
     if (pos == hop_s-1) {
       /* block loop */
-      aubio_pvoc_do (pv,in, fftgrain);
+    for (i=0;i<channels;i++) {
+      aubio_pvoc_do (pv[i], in[i], fftgrain[i]);
       // zero phases of first channel
-      for (i=0;i<fftgrain->length;i++) fftgrain->phas[0][i] = 0.; 
+      for (i=0;i<fftgrain[i]->length;i++) fftgrain[0]->phas[i] = 0.; 
       // double phases of second channel
-      for (i=0;i<fftgrain->length;i++) {
-        fftgrain->phas[1][i] = 
-          aubio_unwrap2pi (fftgrain->phas[1][i] * 2.); 
+      for (i=0;i<fftgrain[i]->length;i++) {
+        fftgrain[1]->phas[i] = 
+          aubio_unwrap2pi (fftgrain[1]->phas[i] * 2.); 
       }
       // copy second channel to third one
-      aubio_pvoc_rdo(pv,fftgrain,out);
+      aubio_pvoc_rdo(pv[i], fftgrain[i], out[i]);
       pos = -1;
+    }
     }
     pos++;
   }
--- a/tests/src/test-phasevoc.c
+++ b/tests/src/test-phasevoc.c
@@ -6,13 +6,12 @@
 int main(){
         uint_t win_s    = 1024; /* window size                       */
         uint_t hop_s    = 256;  /* hop size                          */
-        uint_t channels = 4;  /* number of channels                */
         /* allocate some memory */
-        fvec_t * in       = new_fvec (hop_s, channels); /* input buffer       */
-        cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
-        fvec_t * out      = new_fvec (hop_s, channels); /* output buffer      */
+        fvec_t * in       = new_fvec (hop_s); /* input buffer       */
+        cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */
+        fvec_t * out      = new_fvec (hop_s); /* output buffer      */
         /* allocate fft and other memory space */
-        aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s,channels);
+        aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s);
         /* fill input with some data */
         printf("initialised\n");
         /* execute stft */
--- a/tests/src/test-pitchdetection.c
+++ b/tests/src/test-pitchdetection.c
@@ -7,11 +7,10 @@
   uint_t win_s = 1024;          /* window size */
   uint_t hop_s = win_s / 4;     /* hop size */
   uint_t samplerate = 44100;    /* samplerate */
-  uint_t channels = 1;          /* number of channel */
-  fvec_t *in = new_fvec (hop_s, channels);      /* input buffer */
-  fvec_t *out = new_fvec (1, channels); /* input buffer */
+  fvec_t *in = new_fvec (hop_s);      /* input buffer */
+  fvec_t *out = new_fvec (1); /* input buffer */
   aubio_pitch_t *o =
-      new_aubio_pitch ("default", win_s, hop_s, channels, samplerate);
+      new_aubio_pitch ("default", win_s, hop_s, samplerate);
   uint_t i = 0;
 
   while (i < 100) {
--- a/tests/src/test-pitchfcomb.c
+++ b/tests/src/test-pitchfcomb.c
@@ -6,11 +6,10 @@
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
         uint_t hop_s      = win_s/4;                    /* hop size */
-        uint_t channels   = 3;                          /* number of channel */
-        fvec_t * in       = new_fvec (hop_s, channels); /* input buffer */
-        fvec_t * out      = new_fvec (1, channels);
+        fvec_t * in       = new_fvec (hop_s); /* input buffer */
+        fvec_t * out      = new_fvec (1);
         aubio_pitchfcomb_t * o  = new_aubio_pitchfcomb (
-          win_s, hop_s, channels);
+          win_s, hop_s);
         uint_t i = 0;
 
         while (i < 2) {
--- a/tests/src/test-pitchmcomb.c
+++ b/tests/src/test-pitchmcomb.c
@@ -6,11 +6,10 @@
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
         uint_t hop_s      = win_s/4;                    /* hop size */
-        uint_t channels   = 1;                          /* number of channel */
-        cvec_t * in       = new_cvec (win_s, channels); /* input buffer */
-        fvec_t * out      = new_fvec (1, channels); /* input buffer */
+        cvec_t * in       = new_cvec (win_s); /* input buffer */
+        fvec_t * out      = new_fvec (1); /* input buffer */
 
-        aubio_pitchmcomb_t * o  = new_aubio_pitchmcomb(win_s, hop_s, channels);
+        aubio_pitchmcomb_t * o  = new_aubio_pitchmcomb(win_s, hop_s);
         uint_t i = 0;
 
         while (i < 1000) {
--- a/tests/src/test-pitchschmitt.c
+++ b/tests/src/test-pitchschmitt.c
@@ -5,8 +5,8 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        fvec_t * in       = new_fvec (win_s, 1); /* input buffer */
-        fvec_t * out = new_fvec (1, 1); /* input buffer */
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
+        fvec_t * out = new_fvec (1); /* input buffer */
         aubio_pitchschmitt_t * o  = new_aubio_pitchschmitt(win_s);
         uint_t i = 0;
 
--- a/tests/src/test-pitchyin.c
+++ b/tests/src/test-pitchyin.c
@@ -5,9 +5,8 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
-        fvec_t * out      = new_fvec (win_s/2, channels); /* input buffer */
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
+        fvec_t * out      = new_fvec (win_s/2); /* input buffer */
         aubio_pitchyin_t *p = new_aubio_pitchyin (win_s);
         uint_t i = 0;
 
--- a/tests/src/test-pitchyinfft.c
+++ b/tests/src/test-pitchyinfft.c
@@ -5,9 +5,8 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
-        fvec_t * out      = new_fvec (1, channels); /* output pitch periods */
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
+        fvec_t * out      = new_fvec (1); /* output pitch periods */
         aubio_pitchyinfft_t * o  = new_aubio_pitchyinfft(win_s);
         aubio_pitchyinfft_set_tolerance (o, 0.2);
         uint_t i = 0;
--- a/tests/src/test-resample.c
+++ b/tests/src/test-resample.c
@@ -6,10 +6,9 @@
 {
   /* allocate some memory */
   uint_t win_s = 1024;          /* window size */
-  uint_t channels = 1;          /* number of channel */
   smpl_t ratio = 0.5;
-  fvec_t *in = new_fvec (win_s, channels);      /* input buffer */
-  fvec_t *out = new_fvec ((uint_t) (win_s * ratio), channels);  /* input buffer */
+  fvec_t *in = new_fvec (win_s);      /* input buffer */
+  fvec_t *out = new_fvec ((uint_t) (win_s * ratio));  /* input buffer */
   aubio_resampler_t *o = new_aubio_resampler (0.5, 0);
   uint_t i = 0;
 
--- a/tests/src/test-scale.c
+++ b/tests/src/test-scale.c
@@ -5,8 +5,7 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
         aubio_scale_t * o = new_aubio_scale(0,1,2,3);
         aubio_scale_set_limits (o,0,1,2,3);
         uint_t i = 0;
--- a/tests/src/test-tempo.c
+++ b/tests/src/test-tempo.c
@@ -4,10 +4,9 @@
 int main(){
         /* allocate some memory */
         uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
-        fvec_t * out      = new_fvec (2, channels);     /* input buffer */
-        aubio_tempo_t * o  = new_aubio_tempo("complex", win_s, win_s/4, channels, 44100.);
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
+        fvec_t * out      = new_fvec (2);     /* input buffer */
+        aubio_tempo_t * o  = new_aubio_tempo("complex", win_s, win_s/4, 44100.);
         uint_t i = 0;
 
         smpl_t curtempo, curtempoconf;
--- a/tests/src/test-tss.c
+++ b/tests/src/test-tss.c
@@ -13,20 +13,19 @@
 	int i;
         uint_t win_s    = 1024; /* window size                       */
         uint_t hop_s    = 256;  /* hop size                          */
-        uint_t channels = 4;  /* number of channels                */
         /* allocate some memory */
-        fvec_t * in       = new_fvec (hop_s, channels); /* input buffer       */
-        cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
-        cvec_t * cstead   = new_cvec (win_s, channels); /* fft norm and phase */
-        cvec_t * ctrans   = new_cvec (win_s, channels); /* fft norm and phase */
-        fvec_t * stead    = new_fvec (hop_s, channels); /* output buffer      */
-        fvec_t * trans    = new_fvec (hop_s, channels); /* output buffer      */
+        fvec_t * in       = new_fvec (hop_s); /* input buffer       */
+        cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */
+        cvec_t * cstead   = new_cvec (win_s); /* fft norm and phase */
+        cvec_t * ctrans   = new_cvec (win_s); /* fft norm and phase */
+        fvec_t * stead    = new_fvec (hop_s); /* output buffer      */
+        fvec_t * trans    = new_fvec (hop_s); /* output buffer      */
         /* allocate fft and other memory space */
-        aubio_pvoc_t * pv = new_aubio_pvoc (win_s,hop_s,channels);
-        aubio_pvoc_t * pvt = new_aubio_pvoc(win_s,hop_s,channels);
-        aubio_pvoc_t * pvs = new_aubio_pvoc(win_s,hop_s,channels);
+        aubio_pvoc_t * pv = new_aubio_pvoc (win_s,hop_s);
+        aubio_pvoc_t * pvt = new_aubio_pvoc(win_s,hop_s);
+        aubio_pvoc_t * pvs = new_aubio_pvoc(win_s,hop_s);
 
-	aubio_tss_t *  tss = new_aubio_tss(win_s,hop_s,channels);
+	aubio_tss_t *  tss = new_aubio_tss(win_s,hop_s);
         /* fill input with some data */
         printf("initialised\n");
         /* execute stft */