Index: tests/src/Makefile.am
===================================================================
--- tests/src/Makefile.am	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/Makefile.am	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,36 @@
+AM_CFLAGS = -I$(top_srcdir)/src
+AM_LDFLAGS = -L$(top_builddir)/src -laubio @FFTWLIB_LIBS@
+
+test_phasevoc_jack_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/ext @JACK_CFLAGS@
+test_phasevoc_jack_LDADD  = $(AM_LDFLAGS) -laubioext -L$(top_builddir)/ext @JACK_LIBS@ 
+
+bin_PROGRAMS = \
+	test-fft \
+	test-mfft \
+	test-hist \
+	test-scale \
+	test-sample \
+	test-window \
+	test-filter \
+	test-biquad \
+	test-resample \
+	test-peakpick \
+	test-phasevoc \
+	test-phasevoc-jack \
+	test-onsetdetection \
+	test-pitchyin \
+	test-pitchyinfft \
+	test-pitchschmitt \
+	test-pitchfcomb \
+	test-pitchmcomb \
+	test-pitchdetection \
+	test-beattracking \
+	test-onset \
+	test-tempo \
+	test-tss
+
+run-tests: $(bin_PROGRAMS)
+	@for i in $(bin_PROGRAMS); do echo $$i; ((time ./$$i 2>&1 > /dev/null) 2>&1; echo $$?); done
+
+run-valgrind-tests: $(bin_PROGRAMS)
+	@for i in $(bin_PROGRAMS); do echo $$i; valgrind .libs/lt-$$i 2>&1 | grep ERROR\ SUMMARY -A4; echo $$?; done
Index: tests/src/test-beattracking.c
===================================================================
--- tests/src/test-beattracking.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-beattracking.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,39 @@
+#include <aubio.h>
+
+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 */
+  
+        /* allocate fft and other memory space */
+        aubio_beattracking_t * tempo  = new_aubio_beattracking(win_s, channels);
+
+        uint_t i = 0;
+
+        smpl_t curtempo, curtempoconf;
+
+        while (i < 10) {
+          aubio_beattracking_do(tempo,in,out);
+          curtempo = aubio_beattracking_get_bpm(tempo);
+          if (curtempo != 0.) {
+            fprintf(stdout,"%f\n",curtempo);
+            return 1;
+          }
+          curtempoconf = aubio_beattracking_get_confidence(tempo);
+          if (curtempoconf != 0.) {
+            fprintf(stdout,"%f\n",curtempo);
+            return 1;
+          }
+          i++;
+        };
+
+        del_aubio_beattracking(tempo);
+        del_fvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
+
Index: tests/src/test-biquad.c
===================================================================
--- tests/src/test-biquad.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-biquad.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,16 @@
+#include <aubio.h>
+
+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_biquad_t * o = new_aubio_biquad(0.3,0.2,0.1,0.2,0.3);
+
+        aubio_biquad_do_filtfilt(o,in,in);
+        aubio_biquad_do(o,in);
+
+        del_aubio_biquad(o);
+        del_fvec(in);
+        return 0;
+}
Index: tests/src/test-fft.c
===================================================================
--- tests/src/test-fft.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-fft.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,58 @@
+#include <stdlib.h>
+#include <math.h>
+#include <complex.h>
+#include <aubio.h>
+
+#define NEW_ARRAY(_t,_n)		(_t*)malloc((_n)*sizeof(_t))
+
+
+int main(){
+        uint_t i,j;
+        /* 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 */
+        cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
+        fvec_t * out      = new_fvec (win_s, channels); /* output buffer */
+  
+        /* allocate fft and other memory space */
+        aubio_fft_t * fft      = new_aubio_fft(win_s);      /* fft interface */
+        smpl_t * w             = NEW_ARRAY(smpl_t,win_s); /* window */
+        /* complex spectral data */
+        fft_data_t ** spec     = NEW_ARRAY(fft_data_t*,channels); 
+        for (i=0; i < channels; i++)
+                spec[i] = NEW_ARRAY(fft_data_t,win_s);
+        /* initialize the window (see mathutils.c) */
+        aubio_window(w,win_s,aubio_win_hanningz);
+  
+        /* fill input with some data */
+        in->data[0][win_s/2] = 1;
+  
+        /* execute stft */
+        for (i=0; i < channels; i++) {
+                aubio_fft_do (fft,in->data[i],spec[i],win_s);
+                /* put norm and phase into fftgrain */
+                aubio_fft_getnorm(fftgrain->norm[i], spec[i], win_s/2+1);
+                aubio_fft_getphas(fftgrain->phas[i], spec[i], win_s/2+1);
+        }
+  
+        /* execute inverse fourier transform */
+        for (i=0; i < channels; i++) {
+                for (j=0; j<win_s/2+1; j++) {
+                        spec[i][j]  = cexp(I*aubio_unwrap2pi(fftgrain->phas[i][j]));
+                        spec[i][j] *= fftgrain->norm[i][j];
+                }
+                aubio_fft_rdo(fft,spec[i],out->data[i],win_s);
+        }
+
+        del_fvec(in);
+        del_fvec(out);
+        del_cvec(fftgrain);
+        free(w);
+        del_aubio_fft(fft);
+        for (i=0; i < channels; i++)
+                free(spec[i]);
+        free(spec); 
+        aubio_cleanup();
+        return 0;
+}
Index: tests/src/test-filter.c
===================================================================
--- tests/src/test-filter.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-filter.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,23 @@
+#include <aubio.h>
+
+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, channels);     /* input buffer */
+  
+        /* allocate fft and other memory space */
+        aubio_filter_t * o = new_aubio_cdsgn_filter(44100);
+
+        aubio_filter_do(o,in);
+        aubio_filter_do_outplace(o,in,out);
+        aubio_filter_do_filtfilt(o,in,out);
+
+        del_aubio_filter(o);
+        del_fvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/test-hist.c
===================================================================
--- tests/src/test-hist.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-hist.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,38 @@
+#include <aubio.h>
+#include <stdlib.h>
+
+void print_array(fvec_t *f);
+void print_array(fvec_t *f){
+  uint i,j;
+  for (i=0;i<f->channels;i++){
+    for (j=0;j<f->length;j++){
+      printf("%f, ", f->data[i][j]); 
+    }
+    printf(";\n"); 
+  }
+}
+
+int main( int argc, char** argv )
+{
+  uint_t length;
+  for (length = 1; length < 10; length ++ ) {
+    fvec_t *t = new_fvec(length,5);
+    aubio_hist_t *o = new_aubio_hist(0, 1, length, 5);
+    aubio_window(t->data[0],t->length,aubio_win_hanning);
+    aubio_window(t->data[1],t->length,aubio_win_hanningz);
+    aubio_window(t->data[2],t->length,aubio_win_blackman);
+    aubio_window(t->data[3],t->length,aubio_win_blackman_harris);
+    aubio_window(t->data[4],t->length,aubio_win_hamming);
+    print_array(t);
+    aubio_hist_do(o,t);
+    print_array(t);
+    aubio_hist_do_notnull(o,t);
+    print_array(t);
+    aubio_hist_dyn_notnull(o,t);
+    print_array(t);
+    del_aubio_hist(o);
+    del_fvec(t);
+  }
+  return 0;
+}
+
Index: tests/src/test-mfft.c
===================================================================
--- tests/src/test-mfft.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-mfft.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,28 @@
+
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 4096;                       /* window size        */
+        uint_t channels   = 100;                        /* 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      */
+        /* allocate fft and other memory space */
+        aubio_mfft_t * fft = new_aubio_mfft(win_s,channels);
+        /* fill input with some data */
+        //printf("initialised\n");
+        /* execute stft */
+        aubio_mfft_do (fft,in,fftgrain);
+        //printf("computed forward\n");
+        /* execute inverse fourier transform */
+        aubio_mfft_rdo(fft,fftgrain,out);
+        //printf("computed backard\n");
+        del_aubio_mfft(fft);
+        del_fvec(in);
+        del_cvec(fftgrain);
+        del_fvec(out);
+        //printf("memory freed\n");
+        aubio_cleanup();
+        return 0;
+}
Index: tests/src/test-onset.c
===================================================================
--- tests/src/test-onset.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-onset.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,23 @@
+#include <aubio.h>
+
+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(aubio_onset_complex, win_s, win_s/4, channels);
+        uint_t i = 0;
+
+        while (i < 10) {
+          aubio_onset(onset,in,out);
+          i++;
+        };
+
+        del_aubio_onset(onset);
+        del_fvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/test-onsetdetection.c
===================================================================
--- tests/src/test-onsetdetection.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-onsetdetection.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,54 @@
+
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        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 */
+  
+        /* allocate fft and other memory space */
+        aubio_onsetdetection_t * o = 
+          new_aubio_onsetdetection(aubio_onset_energy, win_s, channels);
+        aubio_onsetdetection(o,in,out);
+        aubio_onsetdetection_energy(o,in,out);
+        del_aubio_onsetdetection(o);
+
+        o = new_aubio_onsetdetection(aubio_onset_specdiff, win_s, channels);
+        aubio_onsetdetection(o,in,out);
+        aubio_onsetdetection_specdiff(o,in,out);
+        del_aubio_onsetdetection(o);
+
+        o = new_aubio_onsetdetection(aubio_onset_hfc, win_s, channels);
+        aubio_onsetdetection(o,in,out);
+        aubio_onsetdetection_hfc(o,in,out);
+        del_aubio_onsetdetection(o);
+
+        o = new_aubio_onsetdetection(aubio_onset_complex, win_s, channels);
+        aubio_onsetdetection(o,in,out);
+        aubio_onsetdetection_complex(o,in,out);
+        del_aubio_onsetdetection(o);
+
+        o = new_aubio_onsetdetection(aubio_onset_phase, win_s, channels);
+        aubio_onsetdetection(o,in,out);
+        aubio_onsetdetection_phase(o,in,out);
+        del_aubio_onsetdetection(o);
+
+        o = new_aubio_onsetdetection(aubio_onset_kl, win_s, channels);
+        aubio_onsetdetection(o,in,out);
+        aubio_onsetdetection_kl(o,in,out);
+        del_aubio_onsetdetection(o);
+
+        o = new_aubio_onsetdetection(aubio_onset_mkl, win_s, channels);
+        aubio_onsetdetection(o,in,out);
+        aubio_onsetdetection_mkl(o,in,out);
+        del_aubio_onsetdetection(o);
+
+        del_cvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
+
Index: tests/src/test-peakpick.c
===================================================================
--- tests/src/test-peakpick.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-peakpick.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,19 @@
+#include <aubio.h>
+
+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_pickpeak_t * o = new_aubio_peakpicker(0.3);
+
+        aubio_peakpick_pimrt(in,o);
+        aubio_peakpick_pimrt(in,o);
+        aubio_peakpick_pimrt(in,o);
+        aubio_peakpick_pimrt(in,o);
+
+        del_aubio_peakpicker(o);
+        del_fvec(in);
+        return 0;
+}
+
Index: tests/src/test-phasevoc-jack.c
===================================================================
--- tests/src/test-phasevoc-jack.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-phasevoc-jack.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,84 @@
+/* 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 <unistd.h>  /* pause() or sleep() */
+#include <aubio.h>
+#include <aubioext.h>
+
+uint_t win_s    = 32; /* window size                       */
+uint_t hop_s    = 8;  /* hop size                          */
+uint_t channels = 4;  /* number of channels                */
+uint_t pos      = 0;  /* frames%dspblocksize for jack loop */
+
+fvec_t * in;
+cvec_t * fftgrain;
+fvec_t * out;
+
+aubio_pvoc_t * pv;
+
+#ifdef JACK_SUPPORT
+aubio_jack_t * jack_setup;
+#endif
+
+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      */
+        /* allocate fft and other memory space */
+        pv = new_aubio_pvoc(win_s,hop_s,channels);
+        /* 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");
+
+#ifdef JACK_SUPPORT
+        jack_setup  = new_aubio_jack(channels, channels,
+                        (aubio_process_func_t)aubio_process);
+        aubio_jack_activate(jack_setup);
+        sleep(10); //pause(); /* enter main jack loop */
+        aubio_jack_close(jack_setup);
+#endif
+        
+        del_aubio_pvoc(pv);
+        del_cvec(fftgrain);
+        del_fvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+        printf("memory freed\n");
+        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, input[i][j], i, pos);
+      /* put synthnew in output */
+      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<fftgrain->length;i++) fftgrain->phas[0][i] *= 2.; 
+      //for (i=0;i<fftgrain->length;i++) fftgrain->phas[0][i] = 0.; 
+      aubio_pvoc_rdo(pv,fftgrain,out);
+      pos = -1;
+    }
+    pos++;
+  }
+  return 0;
+}
Index: tests/src/test-phasevoc.c
===================================================================
--- tests/src/test-phasevoc.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-phasevoc.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,30 @@
+/* test sample for phase vocoder */
+
+#include <aubio.h>
+
+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      */
+        /* allocate fft and other memory space */
+        aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s,channels);
+        /* 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/test-pitchdetection.c
===================================================================
--- tests/src/test-pitchdetection.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-pitchdetection.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,27 @@
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        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 */
+        aubio_pitchdetection_mode mode = aubio_pitchm_freq;
+        aubio_pitchdetection_type type = aubio_pitch_yinfft;
+        fvec_t * in       = new_fvec (hop_s, channels); /* input buffer */
+        aubio_pitchdetection_t * o  = new_aubio_pitchdetection(
+          win_s, hop_s, channels, samplerate, type, mode
+          );
+        uint_t i = 0;
+
+        while (i < 1000) {
+          aubio_pitchdetection(o,in);
+          i++;
+        };
+
+        del_aubio_pitchdetection(o);
+        del_fvec(in);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/test-pitchfcomb.c
===================================================================
--- tests/src/test-pitchfcomb.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-pitchfcomb.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,25 @@
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        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 */
+        aubio_pitchfcomb_t * o  = new_aubio_pitchfcomb (
+          win_s, hop_s, samplerate
+          );
+        uint_t i = 0;
+
+        while (i < 1000) {
+          aubio_pitchfcomb_detect(o,in);
+          i++;
+        };
+
+        del_aubio_pitchfcomb(o);
+        del_fvec(in);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/test-pitchmcomb.c
===================================================================
--- tests/src/test-pitchmcomb.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-pitchmcomb.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,24 @@
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        uint_t hop_s      = win_s/4;                    /* hop size */
+        uint_t samplerate = 44100;
+        uint_t channels   = 1;                          /* number of channel */
+        cvec_t * in       = new_cvec (win_s, channels); /* input buffer */
+        aubio_pitchmcomb_t * o  = new_aubio_pitchmcomb(
+          win_s, hop_s, channels, samplerate );
+        uint_t i = 0;
+
+        while (i < 1000) {
+          aubio_pitchmcomb_detect (o,in);
+          i++;
+        };
+
+        del_aubio_pitchmcomb(o);
+        del_cvec(in);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/test-pitchschmitt.c
===================================================================
--- tests/src/test-pitchschmitt.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-pitchschmitt.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,23 @@
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        uint_t samplerate = 44100;                          /* number of channel */
+        fvec_t * in       = new_fvec (win_s, 1); /* input buffer */
+        aubio_pitchschmitt_t * o  = new_aubio_pitchschmitt(
+          win_s, samplerate );
+        uint_t i = 0;
+
+        while (i < 1000) {
+          aubio_pitchschmitt_detect (o,in);
+          i++;
+        };
+
+        del_aubio_pitchschmitt(o);
+        del_fvec(in);
+        aubio_cleanup();
+
+        return 0;
+}
+
Index: tests/src/test-pitchyin.c
===================================================================
--- tests/src/test-pitchyin.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-pitchyin.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,24 @@
+#include <aubio.h>
+
+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 */
+        uint_t i = 0;
+
+        while (i < 10) {
+          aubio_pitchyin_diff   (in,out);
+          aubio_pitchyin_getcum (out);
+          aubio_pitchyin_getpitch (out);
+          aubio_pitchyin_getpitchfast (in,out,0.2);
+          i++;
+        };
+
+        del_fvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/test-pitchyinfft.c
===================================================================
--- tests/src/test-pitchyinfft.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-pitchyinfft.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,22 @@
+#include <aubio.h>
+
+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_pitchyinfft_t * o  = new_aubio_pitchyinfft(win_s);
+        uint_t i = 0;
+
+        while (i < 10) {
+          aubio_pitchyinfft_detect (o,in,0.2);
+          i++;
+        };
+
+        del_aubio_pitchyinfft(o);
+        del_fvec(in);
+        aubio_cleanup();
+
+        return 0;
+}
+
Index: tests/src/test-resample.c
===================================================================
--- tests/src/test-resample.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-resample.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,23 @@
+#include <aubio.h>
+
+int main(){
+        /* 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 */
+        aubio_resampler_t * o  = new_aubio_resampler(0.5, 0);
+        uint_t i = 0;
+
+        while (i < 100) {
+          aubio_resampler_process(o,in,out);
+          i++;
+        };
+
+        del_aubio_resampler(o);
+        del_fvec(in);
+        del_fvec(out);
+
+        return 0;
+}
Index: tests/src/test-sample.c
===================================================================
--- tests/src/test-sample.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-sample.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,14 @@
+#include <aubio.h>
+
+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 */
+        cvec_t * sp       = new_cvec (win_s, channels); /* input buffer */
+        del_fvec(in);
+        del_cvec(sp);
+
+        return 0;
+}
+
Index: tests/src/test-scale.c
===================================================================
--- tests/src/test-scale.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-scale.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,21 @@
+#include <aubio.h>
+
+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_scale_t * o = new_aubio_scale(0,1,2,3);
+        aubio_scale_set(o,0,1,2,3);
+        uint_t i = 0;
+
+        while (i < 1000) {
+          aubio_scale_do(o,in);
+          i++;
+        };
+
+        del_aubio_scale(o);
+        del_fvec(in);
+
+        return 0;
+}
Index: tests/src/test-tempo.c
===================================================================
--- tests/src/test-tempo.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-tempo.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,35 @@
+#include <aubio.h>
+
+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(aubio_onset_complex, win_s, win_s/4, channels);
+        uint_t i = 0;
+
+        smpl_t curtempo, curtempoconf;
+
+        while (i < 1000) {
+          aubio_tempo(o,in,out);
+          curtempo = aubio_tempo_get_bpm(o);
+          if (curtempo != 0.) {
+            fprintf(stdout,"%f\n",curtempo);
+            return 1;
+          }
+          curtempoconf = aubio_beattracking_get_confidence(o);
+          if (curtempoconf != 0.) {
+            fprintf(stdout,"%f\n",curtempo);
+            return 1;
+          }
+          i++;
+        };
+
+        del_aubio_tempo(o);
+        del_fvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/test-tss.c
===================================================================
--- tests/src/test-tss.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-tss.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,47 @@
+/* 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 <aubio.h>
+
+int main(){
+	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      */
+        /* 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_tss_t *  tss = new_aubio_tss(0.01,3.,4.,win_s,hop_s,channels);
+        /* 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;
+}
Index: tests/src/test-window.c
===================================================================
--- tests/src/test-window.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
+++ tests/src/test-window.c	(revision de2a8af8ce5caf1a774185841fcdf7870039881a)
@@ -0,0 +1,37 @@
+#include <aubio.h>
+#include <stdlib.h>
+
+void print_array(fvec_t *f);
+void print_array(fvec_t *f){
+  uint i,j;
+  for (i=0;i<f->channels;i++)
+  {
+    for (j=0;j<f->length;j++)
+    {
+      printf("%1.3e, ", f->data[i][j]); 
+    }
+    printf(";\n"); 
+  }
+}
+
+int main( int argc, char** argv )
+{
+  uint_t length;
+  for (length = 2; length <= 5; length++)
+  {
+    fvec_t *t = new_fvec(length,9);
+    aubio_window(t->data[0],t->length,aubio_win_rectangle);
+    aubio_window(t->data[1],t->length,aubio_win_hamming);
+    aubio_window(t->data[2],t->length,aubio_win_hanning);
+    aubio_window(t->data[3],t->length,aubio_win_hanningz);
+    aubio_window(t->data[4],t->length,aubio_win_blackman);
+    aubio_window(t->data[5],t->length,aubio_win_blackman_harris);
+    aubio_window(t->data[6],t->length,aubio_win_gaussian);
+    aubio_window(t->data[7],t->length,aubio_win_welch);
+    aubio_window(t->data[8],t->length,aubio_win_parzen);
+    print_array(t);
+    del_fvec(t);
+  }
+  return 0;
+}
+
