Index: tests/src/spectral/test-filterbank.c
===================================================================
--- tests/src/spectral/test-filterbank.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/spectral/test-filterbank.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,44 @@
+#define AUBIO_UNSTABLE 1
+
+#include <stdio.h>
+#include <aubio.h>
+
+int
+main (void)
+{
+  /* allocate some memory */
+  uint_t win_s = 1024;          /* window size */
+  uint_t n_filters = 13;        /* number of filters */
+  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);
+
+  coeffs = aubio_filterbank_get_coeffs (o);
+  if (coeffs == NULL) {
+    return -1;
+  }
+
+  /*
+  if (fvec_max (coeffs) != 0.) {
+    return -1;
+  }
+
+  if (fvec_min (coeffs) != 0.) {
+    return -1;
+  }
+  */
+
+  fmat_print (coeffs);
+
+  aubio_filterbank_do (o, in, out);
+
+  del_aubio_filterbank (o);
+  del_cvec (in);
+  del_fvec (out);
+  aubio_cleanup ();
+
+  return 0;
+}
Index: tests/src/spectral/test-filterbank_mel.c
===================================================================
--- tests/src/spectral/test-filterbank_mel.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/spectral/test-filterbank_mel.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,40 @@
+#define AUBIO_UNSTABLE 1
+
+#include <stdio.h>
+#include <aubio.h>
+
+int
+main (void)
+{
+  /* allocate some memory */
+  uint_t win_s = 512;           /* fft size */
+  uint_t n_filters = 40;        /* number of filters */
+  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 */
+  aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
+
+  /* assign Mel-frequency coefficients */
+  aubio_filterbank_set_mel_coeffs_slaney (o, samplerate);
+
+  coeffs = aubio_filterbank_get_coeffs (o);
+  if (coeffs == NULL) {
+    return -1;
+  }
+
+  //fmat_print (coeffs);
+
+  //fprintf(stderr, "%f\n", fvec_sum(coeffs));
+
+  aubio_filterbank_do (o, in, out);
+
+  del_aubio_filterbank (o);
+  del_cvec (in);
+  del_fvec (out);
+  aubio_cleanup ();
+
+  return 0;
+}
Index: tests/src/spectral/test-mfcc.c
===================================================================
--- tests/src/spectral/test-mfcc.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/spectral/test-mfcc.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,30 @@
+#include <aubio.h>
+
+int
+main (void)
+{
+  /* allocate some memory */
+  uint_t win_s = 512;           /* fft size */
+  uint_t n_filters = 40;        /* number of filters */
+  uint_t n_coefs = 13;          /* number of coefficients */
+  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 */
+  aubio_mfcc_t *o = new_aubio_mfcc (win_s, n_filters, n_coefs, samplerate);
+
+  cvec_set (in, 1.);
+
+  aubio_mfcc_do (o, in, out);
+  fvec_print (out);
+  aubio_mfcc_do (o, in, out);
+  fvec_print (out);
+
+  del_aubio_mfcc (o);
+  del_cvec (in);
+  del_fvec (out);
+  aubio_cleanup ();
+
+  return 0;
+}
Index: tests/src/spectral/test-phasevoc-jack.c
===================================================================
--- tests/src/spectral/test-phasevoc-jack.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/spectral/test-phasevoc-jack.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,98 @@
+/** Test for phase vocoder in jack
+ *
+ * This program should start correctly, when jackd is started or when
+ * using JACK_START_SERVER=true and reconstruct each audio input channel
+ * on the corresponding output channel with some strange effects and a
+ * delay equal to the hop size (hop_s).
+ *
+ */
+
+#include <stdio.h>
+#include <unistd.h>  /* sleep() */
+#include <aubio.h>
+#include "jackio.h"
+
+uint_t testing  = 0;  /* change this to 1 to listen        */
+
+uint_t win_s    = 512;/* window size                       */
+uint_t hop_s    = 128;/* hop size                          */
+uint_t channels = 2;  /* number of audio channels          */
+uint_t midiin   = 4;  /* number of midi input channels     */
+uint_t midiout  = 2;  /* number of midi output channels    */
+uint_t pos      = 0;  /* frames%dspblocksize for jack loop */
+
+fvec_t * in[2];
+cvec_t * fftgrain[2];
+fvec_t * out[2];
+
+aubio_pvoc_t * pv[2];
+
+int aubio_process(float **input, float **output, int nframes);
+
+int main(){
+        /* allocate some memory */
+  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[i] = new_aubio_pvoc(win_s,hop_s);
+    }
+
+#ifdef HAVE_JACK
+        aubio_jack_t * jack_setup;
+        jack_setup  = new_aubio_jack(channels, channels, 
+            midiin, midiout,
+            (aubio_process_func_t)aubio_process);
+        aubio_jack_activate(jack_setup);
+        /* stay in main jack loop for 1 seconds only */
+        do {
+          sleep(1);
+        } while(testing);
+        aubio_jack_close(jack_setup);
+#else
+        fprintf(stderr, "WARNING: no jack support\n");
+#endif
+        
+    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;
+}
+
+int aubio_process(float **input, float **output, int nframes) {
+  uint_t i;       /*channels*/
+  uint_t j;       /*frames*/
+  for (j=0;j<(unsigned)nframes;j++) {
+    for (i=0;i<channels;i++) {
+      /* write input to datanew */
+      fvec_write_sample(in[i], input[i][j], pos);
+      /* put synthnew in output */
+      output[i][j] = fvec_read_sample(out[i], pos);
+    }
+    /*time for fft*/
+    if (pos == hop_s-1) {
+      /* block loop */
+    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[i]->length;i++) fftgrain[0]->phas[i] = 0.; 
+      // double phases of second channel
+      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[i], fftgrain[i], out[i]);
+      pos = -1;
+    }
+    }
+    pos++;
+  }
+  return 0;
+}
Index: tests/src/spectral/test-phasevoc.c
===================================================================
--- tests/src/spectral/test-phasevoc.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/spectral/test-phasevoc.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,30 @@
+/* test sample for phase vocoder */
+
+#include <stdio.h>
+#include <aubio.h>
+
+int main(){
+        uint_t win_s    = 1024; /* window size                       */
+        uint_t hop_s    = 256;  /* hop size                          */
+        /* allocate some memory */
+        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);
+        /* fill input with some data */
+        printf("initialised\n");
+        /* execute stft */
+        aubio_pvoc_do (pv,in,fftgrain);
+        printf("computed forward\n");
+        /* execute inverse fourier transform */
+        aubio_pvoc_rdo(pv,fftgrain,out);
+        printf("computed backard\n");
+        del_aubio_pvoc(pv);
+        del_fvec(in);
+        del_cvec(fftgrain);
+        del_fvec(out);
+        aubio_cleanup();
+        printf("memory freed\n");
+        return 0;
+}
Index: tests/src/spectral/test-specdesc.c
===================================================================
--- tests/src/spectral/test-specdesc.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/spectral/test-specdesc.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,48 @@
+
+#define AUBIO_UNSTABLE 1
+
+#include <aubio.h>
+
+int
+main ()
+{
+  uint_t win_s = 1024;          /* window size */
+  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);
+  aubio_specdesc_do (o, in, out);
+  del_aubio_specdesc (o);
+
+  o = new_aubio_specdesc ("energy", win_s);
+  aubio_specdesc_do (o, in, out);
+  del_aubio_specdesc (o);
+
+  o = new_aubio_specdesc ("hfc", win_s);
+  aubio_specdesc_do (o, in, out);
+  del_aubio_specdesc (o);
+
+  o = new_aubio_specdesc ("complex", win_s);
+  aubio_specdesc_do (o, in, out);
+  del_aubio_specdesc (o);
+
+  o = new_aubio_specdesc ("phase", win_s);
+  aubio_specdesc_do (o, in, out);
+  del_aubio_specdesc (o);
+
+  o = new_aubio_specdesc ("kl", win_s);
+  aubio_specdesc_do (o, in, out);
+  del_aubio_specdesc (o);
+
+  o = new_aubio_specdesc ("mkl", win_s);
+  aubio_specdesc_do (o, in, out);
+  del_aubio_specdesc (o);
+
+  del_cvec (in);
+  del_fvec (out);
+  aubio_cleanup ();
+
+  return 0;
+}
Index: tests/src/spectral/test-tss.c
===================================================================
--- tests/src/spectral/test-tss.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/spectral/test-tss.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,48 @@
+/* test sample for phase vocoder 
+ *
+ * this program should start correctly using JACK_START_SERVER=true and
+ * reconstruct each audio input frame perfectly on the corresponding input with
+ * a delay equal to the window size, hop_s.
+ */
+
+#include <stdio.h>
+#define AUBIO_UNSTABLE 1
+#include <aubio.h>
+
+int main(){
+	int i;
+        uint_t win_s    = 1024; /* window size                       */
+        uint_t hop_s    = 256;  /* hop size                          */
+        /* allocate some memory */
+        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);
+        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);
+        /* fill input with some data */
+        printf("initialised\n");
+        /* execute stft */
+	for (i = 0; i < 10; i++) {
+		aubio_pvoc_do (pv,in,fftgrain);
+		aubio_tss_do  (tss,fftgrain,ctrans,cstead);
+		aubio_pvoc_rdo(pvt,cstead,stead);
+		aubio_pvoc_rdo(pvs,ctrans,trans);
+	}
+        del_aubio_pvoc(pv);
+        del_fvec(in);
+        del_cvec(fftgrain);
+        del_cvec(cstead);
+        del_cvec(ctrans);
+        del_fvec(stead);
+        del_fvec(trans);
+        aubio_cleanup();
+        printf("memory freed\n");
+        return 0;
+}
