Index: tests/python/src/onset/peakpick.py
===================================================================
--- tests/python/src/onset/peakpick.py	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,77 +1,0 @@
-from template import aubio_unit_template
-from localaubio import *
-
-buf_size = 7 
-channels = 1
-
-class peakpick_unit(aubio_unit_template):
-
-  def setUp(self):
-    self.o = new_aubio_peakpicker(1)
-    aubio_peakpicker_set_threshold (0.1)
-    pass
-
-  def tearDown(self):
-    del_aubio_peakpicker(self.o)
-    pass
-
-  def test_peakpick(self):
-    """ create and delete peakpick """
-    pass
-
-  def test_peakpick_zeroes(self):
-    """ check peakpick run on a vector full of zero returns no peak. """
-    self.assertEqual(0., aubio_peakpicker_get_thresholded_input(self.o))
-
-  def test_peakpick_impulse(self):
-    """ check peakpick detects a single impulse as a peak. """
-    """ check two consecutive peaks are detected as one. """
-    #print 
-    for index in range(0,buf_size-1):
-      input = new_fvec(buf_size, channels)
-      fvec_write_sample(input, 1000., 0, index)
-      fvec_write_sample(input, 1000./2, 0, index+1)
-      #print "%2s" % index, aubio_peakpicker_do(self.o, input), "|",
-      #for i in range(buf_size): print fvec_read_sample(input, 0, i),
-      #print
-      del_fvec(input)
-
-  def test_peakpick_consecutive_peaks(self):
-    """ check two consecutive peaks are detected as one. """
-    #print 
-    for index in range(0,buf_size-4):
-      input = new_fvec(buf_size, channels)
-      fvec_write_sample(input, 1000./2, 0, index)
-      fvec_write_sample(input, 1000., 0, index+1)
-      fvec_write_sample(input, 1000., 0, index+3)
-      fvec_write_sample(input, 1000./2, 0, index+4)
-      peak_pick_result = aubio_peakpicker_do(self.o, input)
-      if index == 2:
-        # we are at the peak. check the result is after current sample,
-        # and not after next one
-        self.failIf( 1. >= peak_pick_result )
-        self.failIf( 2. < peak_pick_result )
-      else: self.assertEqual(0., peak_pick_result)
-      del_fvec(input)
-    for index in range(buf_size-4,buf_size-1):
-      input = new_fvec(buf_size, channels)
-      fvec_write_sample(input, 1000./2, 0, index)
-      fvec_write_sample(input, 1000., 0, index+1)
-      peak_pick_result = aubio_peakpicker_do(self.o, input)
-      self.assertEqual(0., peak_pick_result)
-      del_fvec(input)
-
-  def test_peakpick_set_threshold(self):
-    """ test aubio_peakpicker_set_threshold """
-    new_threshold = 0.1
-    aubio_peakpicker_set_threshold(self.o, new_threshold)
-    self.assertCloseEnough(new_threshold, aubio_peakpicker_get_threshold(self.o))
-
-  def test_peakpick_get_threshold(self):
-    """ test aubio_peakpicker_get_threshold """
-    new_threshold = aubio_peakpicker_get_threshold(self.o) 
-    aubio_peakpicker_set_threshold(self.o, new_threshold)
-    self.assertCloseEnough(new_threshold, aubio_peakpicker_get_threshold(self.o))
-
-if __name__ == '__main__':
-  unittest.main()
Index: tests/python/src/onset/peakpicker.py
===================================================================
--- tests/python/src/onset/peakpicker.py	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/python/src/onset/peakpicker.py	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,77 @@
+from template import aubio_unit_template
+from localaubio import *
+
+buf_size = 7 
+channels = 1
+
+class peakpick_unit(aubio_unit_template):
+
+  def setUp(self):
+    self.o = new_aubio_peakpicker(1)
+    aubio_peakpicker_set_threshold (0.1)
+    pass
+
+  def tearDown(self):
+    del_aubio_peakpicker(self.o)
+    pass
+
+  def test_peakpick(self):
+    """ create and delete peakpick """
+    pass
+
+  def test_peakpick_zeroes(self):
+    """ check peakpick run on a vector full of zero returns no peak. """
+    self.assertEqual(0., aubio_peakpicker_get_thresholded_input(self.o))
+
+  def test_peakpick_impulse(self):
+    """ check peakpick detects a single impulse as a peak. """
+    """ check two consecutive peaks are detected as one. """
+    #print 
+    for index in range(0,buf_size-1):
+      input = new_fvec(buf_size, channels)
+      fvec_write_sample(input, 1000., 0, index)
+      fvec_write_sample(input, 1000./2, 0, index+1)
+      #print "%2s" % index, aubio_peakpicker_do(self.o, input), "|",
+      #for i in range(buf_size): print fvec_read_sample(input, 0, i),
+      #print
+      del_fvec(input)
+
+  def test_peakpick_consecutive_peaks(self):
+    """ check two consecutive peaks are detected as one. """
+    #print 
+    for index in range(0,buf_size-4):
+      input = new_fvec(buf_size, channels)
+      fvec_write_sample(input, 1000./2, 0, index)
+      fvec_write_sample(input, 1000., 0, index+1)
+      fvec_write_sample(input, 1000., 0, index+3)
+      fvec_write_sample(input, 1000./2, 0, index+4)
+      peak_pick_result = aubio_peakpicker_do(self.o, input)
+      if index == 2:
+        # we are at the peak. check the result is after current sample,
+        # and not after next one
+        self.failIf( 1. >= peak_pick_result )
+        self.failIf( 2. < peak_pick_result )
+      else: self.assertEqual(0., peak_pick_result)
+      del_fvec(input)
+    for index in range(buf_size-4,buf_size-1):
+      input = new_fvec(buf_size, channels)
+      fvec_write_sample(input, 1000./2, 0, index)
+      fvec_write_sample(input, 1000., 0, index+1)
+      peak_pick_result = aubio_peakpicker_do(self.o, input)
+      self.assertEqual(0., peak_pick_result)
+      del_fvec(input)
+
+  def test_peakpick_set_threshold(self):
+    """ test aubio_peakpicker_set_threshold """
+    new_threshold = 0.1
+    aubio_peakpicker_set_threshold(self.o, new_threshold)
+    self.assertCloseEnough(new_threshold, aubio_peakpicker_get_threshold(self.o))
+
+  def test_peakpick_get_threshold(self):
+    """ test aubio_peakpicker_get_threshold """
+    new_threshold = aubio_peakpicker_get_threshold(self.o) 
+    aubio_peakpicker_set_threshold(self.o, new_threshold)
+    self.assertCloseEnough(new_threshold, aubio_peakpicker_get_threshold(self.o))
+
+if __name__ == '__main__':
+  unittest.main()
Index: tests/src/Makefile.am
===================================================================
--- tests/src/Makefile.am	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ tests/src/Makefile.am	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -2,36 +2,41 @@
 AM_LDFLAGS = -L$(top_builddir)/src -laubio @FFTWLIB_LIBS@
 
-test_phasevoc_jack_CFLAGS = $(AM_CFLAGS) @JACK_CFLAGS@
-test_phasevoc_jack_LDADD  = $(AM_LDFLAGS) @JACK_LIBS@ 
+spectral_test_phasevoc_jack_CFLAGS = $(AM_CFLAGS) @JACK_CFLAGS@
+spectral_test_phasevoc_jack_LDADD  = $(AM_LDFLAGS) @JACK_LIBS@ 
 
-bin_PROGRAMS = \
-	test-hist \
-	test-scale \
-	test-cvec \
-	test-fvec \
-	test-window \
-	test-filter \
-	test-biquad \
-	test-resample \
-	test-peakpick \
-	test-phasevoc \
-	test-filterbank \
-	test-filterbank_mel \
-	test-mfcc \
-	test-phasevoc-jack \
-	test-onsetdetection \
-	test-pitchyin \
-	test-pitchyinfft \
-	test-pitchschmitt \
-	test-pitchfcomb \
-	test-pitchmcomb \
-	test-pitch \
-	test-onset \
-	test-mathutils \
-	test-tss
+noinst_PROGRAMS = \
+  test-fvec \
+  test-cvec \
+  test-mathutils \
+  test-mathutils-window \
+  pitch/test-pitchyin \
+  pitch/test-pitchyinfft \
+  pitch/test-pitch \
+  pitch/test-pitchmcomb \
+  pitch/test-pitchfcomb \
+  pitch/test-pitchschmitt \
+  temporal/test-cweighting \
+  temporal/test-resampler \
+  temporal/test-filter \
+  temporal/test-biquad \
+  temporal/test-aweighting \
+  onset/test-peakpicker \
+  onset/test-onset \
+  tempo/test-tempo \
+  tempo/test-beattracking \
+  spectral/test-fft \
+  spectral/test-specdesc \
+  spectral/test-phasevoc \
+  spectral/test-phasevoc-jack \
+  spectral/test-tss \
+  spectral/test-filterbank \
+  spectral/test-filterbank_mel \
+  spectral/test-mfcc \
+  utils/test-scale \
+  utils/test-hist
 
-run-tests: $(bin_PROGRAMS)
-	@for i in $(bin_PROGRAMS); do echo -n $$i\ ; ./$$i > /dev/null && echo OK || echo FAILED: $$?; done
+run-tests: $(noinst_PROGRAMS)
+	@for i in $(noinst_PROGRAMS); do echo -n $$i\ ; ./$$i > /dev/null && echo OK || echo FAILED: $$?; 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
+run-valgrind-tests: $(noinst_PROGRAMS)
+	@for i in $(noinst_PROGRAMS); do echo $$i; valgrind .libs/lt-$$i 2>&1 | grep ERROR\ SUMMARY -A4; echo $$?; done
Index: tests/src/onset/test-onset.c
===================================================================
--- tests/src/onset/test-onset.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/onset/test-onset.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,22 @@
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        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) {
+          aubio_onset_do (onset,in,out);
+          i++;
+        };
+
+        del_aubio_onset(onset);
+        del_fvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/onset/test-peakpicker.c
===================================================================
--- tests/src/onset/test-peakpicker.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/onset/test-peakpicker.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,22 @@
+#define AUBIO_UNSTABLE 1
+
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        fvec_t * in       = new_fvec (win_s); /* input buffer */
+        fvec_t * out      = new_fvec (1); /* input buffer */
+        aubio_peakpicker_t * o = new_aubio_peakpicker();
+        aubio_peakpicker_set_threshold (o, 0.3);
+
+        aubio_peakpicker_do(o, in, out);
+        aubio_peakpicker_do(o, in, out);
+        aubio_peakpicker_do(o, in, out);
+        aubio_peakpicker_do(o, in, out);
+
+        del_aubio_peakpicker(o);
+        del_fvec(in);
+        return 0;
+}
+
Index: tests/src/pitch/test-pitch.c
===================================================================
--- tests/src/pitch/test-pitch.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/pitch/test-pitch.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,26 @@
+#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 */
+  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, samplerate);
+  uint_t i = 0;
+
+  while (i < 100) {
+    aubio_pitch_do (o, in, out);
+    i++;
+  };
+
+  del_aubio_pitch (o);
+  del_fvec (in);
+  aubio_cleanup ();
+
+  return 0;
+}
Index: tests/src/pitch/test-pitchfcomb.c
===================================================================
--- tests/src/pitch/test-pitchfcomb.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/pitch/test-pitchfcomb.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,25 @@
+#define AUBIO_UNSTABLE 1
+
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        uint_t hop_s      = win_s/4;                    /* hop size */
+        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);
+        uint_t i = 0;
+
+        while (i < 2) {
+          aubio_pitchfcomb_do (o,in, out);
+          i++;
+        };
+
+        del_aubio_pitchfcomb(o);
+        del_fvec(in);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/pitch/test-pitchmcomb.c
===================================================================
--- tests/src/pitch/test-pitchmcomb.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/pitch/test-pitchmcomb.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,26 @@
+#define AUBIO_UNSTABLE 1
+
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        uint_t hop_s      = win_s/4;                    /* hop size */
+        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);
+        uint_t i = 0;
+
+        while (i < 1000) {
+          aubio_pitchmcomb_do (o,in, out);
+          i++;
+        };
+
+        del_aubio_pitchmcomb(o);
+        del_cvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/pitch/test-pitchschmitt.c
===================================================================
--- tests/src/pitch/test-pitchschmitt.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/pitch/test-pitchschmitt.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,25 @@
+#define AUBIO_UNSTABLE 1
+
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        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;
+
+        while (i < 1000) {
+          aubio_pitchschmitt_do (o,in, out);
+          i++;
+        };
+
+        del_aubio_pitchschmitt(o);
+        del_fvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
+
Index: tests/src/pitch/test-pitchyin.c
===================================================================
--- tests/src/pitch/test-pitchyin.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/pitch/test-pitchyin.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,24 @@
+#define AUBIO_UNSTABLE 1
+
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        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;
+
+        while (i < 10) {
+          aubio_pitchyin_do (p, in,out);
+          i++;
+        };
+
+        del_fvec(in);
+        del_fvec(out);
+        del_aubio_pitchyin(p);
+        aubio_cleanup();
+
+        return 0;
+}
Index: tests/src/pitch/test-pitchyinfft.c
===================================================================
--- tests/src/pitch/test-pitchyinfft.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/pitch/test-pitchyinfft.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,26 @@
+#define AUBIO_UNSTABLE 1
+
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        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;
+
+        while (i < 10) {
+          aubio_pitchyinfft_do (o,in,out);
+          i++;
+        };
+
+        del_aubio_pitchyinfft(o);
+        del_fvec(in);
+        del_fvec(out);
+        aubio_cleanup();
+
+        return 0;
+}
+
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;
+}
Index: tests/src/temporal/test-a_weighting.c
===================================================================
--- tests/src/temporal/test-a_weighting.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/temporal/test-a_weighting.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,36 @@
+#include <aubio.h>
+
+int main(){
+  
+  aubio_filter_t * f;
+
+  uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000};
+  uint_t nrates = 6;
+  uint_t samplerate, i = 0;
+
+  for ( samplerate = rates[i]; i < nrates ; i++ ) {
+    f = new_aubio_filter_a_weighting (samplerate);
+    del_aubio_filter (f);
+
+    f = new_aubio_filter (7);
+    aubio_filter_set_a_weighting (f, samplerate);
+    del_aubio_filter (f);
+  }
+
+  // samplerate unknown
+  f = new_aubio_filter_a_weighting (4200);
+  del_aubio_filter (f);
+
+  // order to small
+  f = new_aubio_filter (2);
+  aubio_filter_set_a_weighting (f, samplerate);
+  del_aubio_filter (f);
+
+  // order to big
+  f = new_aubio_filter (12);
+  aubio_filter_set_a_weighting (f, samplerate);
+  del_aubio_filter (f);
+
+  return 0;
+}
+
Index: tests/src/temporal/test-aweighting.c
===================================================================
--- tests/src/temporal/test-aweighting.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#include <aubio.h>
-
-int main(){
-  
-  aubio_filter_t * f;
-
-  uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000};
-  uint_t nrates = 6;
-  uint_t samplerate, i = 0;
-
-  for ( samplerate = rates[i]; i < nrates ; i++ ) {
-    f = new_aubio_filter_a_weighting (samplerate);
-    del_aubio_filter (f);
-
-    f = new_aubio_filter (7);
-    aubio_filter_set_a_weighting (f, samplerate);
-    del_aubio_filter (f);
-  }
-
-  // samplerate unknown
-  f = new_aubio_filter_a_weighting (4200);
-  del_aubio_filter (f);
-
-  // order to small
-  f = new_aubio_filter (2);
-  aubio_filter_set_a_weighting (f, samplerate);
-  del_aubio_filter (f);
-
-  // order to big
-  f = new_aubio_filter (12);
-  aubio_filter_set_a_weighting (f, samplerate);
-  del_aubio_filter (f);
-
-  return 0;
-}
-
Index: tests/src/temporal/test-biquad.c
===================================================================
--- tests/src/temporal/test-biquad.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/temporal/test-biquad.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,15 @@
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        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);
+
+        del_aubio_filter(o);
+        del_fvec(in);
+        return 0;
+}
Index: tests/src/temporal/test-c_weighting.c
===================================================================
--- tests/src/temporal/test-c_weighting.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/temporal/test-c_weighting.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,36 @@
+#include <aubio.h>
+
+int main(){
+  
+  aubio_filter_t * f;
+
+  uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000};
+  uint_t nrates = 6;
+  uint_t samplerate, i = 0;
+
+  for ( samplerate = rates[i]; i < nrates ; i++ ) {
+    f = new_aubio_filter_c_weighting (samplerate);
+    del_aubio_filter (f);
+
+    f = new_aubio_filter (5);
+    aubio_filter_set_c_weighting (f, samplerate);
+    del_aubio_filter (f);
+  }
+
+  // samplerate unknown
+  f = new_aubio_filter_c_weighting (4200);
+  del_aubio_filter (f);
+
+  // order to small
+  f = new_aubio_filter (2);
+  aubio_filter_set_c_weighting (f, samplerate);
+  del_aubio_filter (f);
+
+  // order to big
+  f = new_aubio_filter (12);
+  aubio_filter_set_c_weighting (f, samplerate);
+  del_aubio_filter (f);
+
+  return 0;
+}
+
Index: tests/src/temporal/test-cweighting.c
===================================================================
--- tests/src/temporal/test-cweighting.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#include <aubio.h>
-
-int main(){
-  
-  aubio_filter_t * f;
-
-  uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000};
-  uint_t nrates = 6;
-  uint_t samplerate, i = 0;
-
-  for ( samplerate = rates[i]; i < nrates ; i++ ) {
-    f = new_aubio_filter_c_weighting (samplerate);
-    del_aubio_filter (f);
-
-    f = new_aubio_filter (5);
-    aubio_filter_set_c_weighting (f, samplerate);
-    del_aubio_filter (f);
-  }
-
-  // samplerate unknown
-  f = new_aubio_filter_c_weighting (4200);
-  del_aubio_filter (f);
-
-  // order to small
-  f = new_aubio_filter (2);
-  aubio_filter_set_c_weighting (f, samplerate);
-  del_aubio_filter (f);
-
-  // order to big
-  f = new_aubio_filter (12);
-  aubio_filter_set_c_weighting (f, samplerate);
-  del_aubio_filter (f);
-
-  return 0;
-}
-
Index: tests/src/temporal/test-filter.c
===================================================================
--- tests/src/temporal/test-filter.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/temporal/test-filter.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,38 @@
+#include <aubio.h>
+
+int
+main (void)
+{
+  /* allocate some memory */
+  uint_t win_s = 32;            /* window size */
+  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 (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 (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 (44100);
+  in->data[12] = 0.5;
+  fvec_print (in);
+  aubio_filter_do_filtfilt (o, in, out);
+  fvec_print (out);
+  del_aubio_filter (o);
+
+  del_fvec (in);
+  del_fvec (out);
+  aubio_cleanup ();
+
+  return 0;
+}
Index: tests/src/temporal/test-resampler.c
===================================================================
--- tests/src/temporal/test-resampler.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/temporal/test-resampler.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,25 @@
+#include <stdio.h>
+#include <aubio.h>
+
+int
+main ()
+{
+  /* allocate some memory */
+  uint_t win_s = 1024;          /* window size */
+  smpl_t ratio = 0.5;
+  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;
+
+  while (i < 10) {
+    aubio_resampler_do (o, in, out);
+    i++;
+  };
+
+  del_aubio_resampler (o);
+  del_fvec (in);
+  del_fvec (out);
+
+  return 0;
+}
Index: tests/src/test-biquad.c
===================================================================
--- tests/src/test-biquad.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        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);
-
-        del_aubio_filter(o);
-        del_fvec(in);
-        return 0;
-}
Index: tests/src/test-filter.c
===================================================================
--- tests/src/test-filter.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#include <aubio.h>
-
-int
-main (void)
-{
-  /* allocate some memory */
-  uint_t win_s = 32;            /* window size */
-  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 (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 (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 (44100);
-  in->data[12] = 0.5;
-  fvec_print (in);
-  aubio_filter_do_filtfilt (o, in, out);
-  fvec_print (out);
-  del_aubio_filter (o);
-
-  del_fvec (in);
-  del_fvec (out);
-  aubio_cleanup ();
-
-  return 0;
-}
Index: tests/src/test-filterbank.c
===================================================================
--- tests/src/test-filterbank.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#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/test-filterbank_mel.c
===================================================================
--- tests/src/test-filterbank_mel.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#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/test-hist.c
===================================================================
--- tests/src/test-hist.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#define AUBIO_UNSTABLE 1
-
-#include <aubio.h>
-#include <stdlib.h>
-
-int main( )
-{
-  uint_t length;
-  for (length = 1; length < 10; length ++ ) {
-    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);
-    aubio_hist_do_notnull(o,t);
-    fvec_print(t);
-    aubio_hist_dyn_notnull(o,t);
-    fvec_print(t);
-    del_fvec(t);
-    t = new_aubio_window("hanningz", length);
-    aubio_hist_do(o,t);
-    fvec_print(t);
-    aubio_hist_do_notnull(o,t);
-    fvec_print(t);
-    aubio_hist_dyn_notnull(o,t);
-    fvec_print(t);
-    del_aubio_hist(o);
-    del_fvec(t);
-  }
-  return 0;
-}
-
Index: tests/src/test-mathutils-window.c
===================================================================
--- tests/src/test-mathutils-window.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/test-mathutils-window.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,41 @@
+#include <aubio.h>
+#include <stdlib.h>
+
+int main( )
+{
+  uint_t length;
+  for (length = 2; length <= 5; length++)
+  {
+    fvec_t *t = new_aubio_window("rectangle", length);
+    del_fvec(t);
+    t = new_aubio_window("hamming", length);
+    fvec_print(t);
+    del_fvec(t);
+    t = new_aubio_window("hanning", length);
+    fvec_print(t);
+    del_fvec(t);
+    t = new_aubio_window("hanningz", length);
+    fvec_print(t);
+    del_fvec(t);
+    t = new_aubio_window("blackman", length);
+    fvec_print(t);
+    del_fvec(t);
+    t = new_aubio_window("blackman_harris", length);
+    fvec_print(t);
+    del_fvec(t);
+    t = new_aubio_window("gaussian", length);
+    fvec_print(t);
+    del_fvec(t);
+    t = new_aubio_window("welch", length);
+    fvec_print(t);
+    del_fvec(t);
+    t = new_aubio_window("parzen", length);
+    fvec_print(t);
+    del_fvec(t);
+    t = new_aubio_window("default", length);
+    fvec_print(t);
+    del_fvec(t);
+  }
+  return 0;
+}
+
Index: tests/src/test-mfcc.c
===================================================================
--- tests/src/test-mfcc.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#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/test-onset.c
===================================================================
--- tests/src/test-onset.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        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) {
-          aubio_onset_do (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 ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,48 +1,0 @@
-
-#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/test-peakpick.c
===================================================================
--- tests/src/test-peakpick.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#define AUBIO_UNSTABLE 1
-
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        fvec_t * in       = new_fvec (win_s); /* input buffer */
-        fvec_t * out      = new_fvec (1); /* input buffer */
-        aubio_peakpicker_t * o = new_aubio_peakpicker();
-        aubio_peakpicker_set_threshold (o, 0.3);
-
-        aubio_peakpicker_do(o, in, out);
-        aubio_peakpicker_do(o, in, out);
-        aubio_peakpicker_do(o, in, out);
-        aubio_peakpicker_do(o, in, out);
-
-        del_aubio_peakpicker(o);
-        del_fvec(in);
-        return 0;
-}
-
Index: tests/src/test-phasevoc-jack.c
===================================================================
--- tests/src/test-phasevoc-jack.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/** 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/test-phasevoc.c
===================================================================
--- tests/src/test-phasevoc.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/* 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/test-pitch.c
===================================================================
--- tests/src/test-pitch.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024; /* window size */
-        fvec_t * in       = new_fvec (win_s); /* input buffer */
-        fvec_t * out      = new_fvec (1); /* input buffer */
-        aubio_pitch_t *p = new_aubio_pitch ("default", win_s, win_s / 2, 44100);
-        uint_t i = 0;
-
-        while (i < 10) {
-          aubio_pitch_do (p, in, out);
-          i++;
-        };
-
-        del_fvec(in);
-        del_fvec(out);
-        aubio_cleanup();
-
-        return 0;
-}
-
Index: tests/src/test-pitchdetection.c
===================================================================
--- tests/src/test-pitchdetection.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#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 */
-  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, samplerate);
-  uint_t i = 0;
-
-  while (i < 100) {
-    aubio_pitch_do (o, in, out);
-    i++;
-  };
-
-  del_aubio_pitch (o);
-  del_fvec (in);
-  aubio_cleanup ();
-
-  return 0;
-}
Index: tests/src/test-pitchfcomb.c
===================================================================
--- tests/src/test-pitchfcomb.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#define AUBIO_UNSTABLE 1
-
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        uint_t hop_s      = win_s/4;                    /* hop size */
-        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);
-        uint_t i = 0;
-
-        while (i < 2) {
-          aubio_pitchfcomb_do (o,in, out);
-          i++;
-        };
-
-        del_aubio_pitchfcomb(o);
-        del_fvec(in);
-        aubio_cleanup();
-
-        return 0;
-}
Index: tests/src/test-pitchmcomb.c
===================================================================
--- tests/src/test-pitchmcomb.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#define AUBIO_UNSTABLE 1
-
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        uint_t hop_s      = win_s/4;                    /* hop size */
-        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);
-        uint_t i = 0;
-
-        while (i < 1000) {
-          aubio_pitchmcomb_do (o,in, out);
-          i++;
-        };
-
-        del_aubio_pitchmcomb(o);
-        del_cvec(in);
-        del_fvec(out);
-        aubio_cleanup();
-
-        return 0;
-}
Index: tests/src/test-pitchschmitt.c
===================================================================
--- tests/src/test-pitchschmitt.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#define AUBIO_UNSTABLE 1
-
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        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;
-
-        while (i < 1000) {
-          aubio_pitchschmitt_do (o,in, out);
-          i++;
-        };
-
-        del_aubio_pitchschmitt(o);
-        del_fvec(in);
-        del_fvec(out);
-        aubio_cleanup();
-
-        return 0;
-}
-
Index: tests/src/test-pitchyin.c
===================================================================
--- tests/src/test-pitchyin.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,24 +1,0 @@
-#define AUBIO_UNSTABLE 1
-
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        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;
-
-        while (i < 10) {
-          aubio_pitchyin_do (p, in,out);
-          i++;
-        };
-
-        del_fvec(in);
-        del_fvec(out);
-        del_aubio_pitchyin(p);
-        aubio_cleanup();
-
-        return 0;
-}
Index: tests/src/test-pitchyinfft.c
===================================================================
--- tests/src/test-pitchyinfft.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#define AUBIO_UNSTABLE 1
-
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        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;
-
-        while (i < 10) {
-          aubio_pitchyinfft_do (o,in,out);
-          i++;
-        };
-
-        del_aubio_pitchyinfft(o);
-        del_fvec(in);
-        del_fvec(out);
-        aubio_cleanup();
-
-        return 0;
-}
-
Index: tests/src/test-resample.c
===================================================================
--- tests/src/test-resample.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#include <stdio.h>
-#include <aubio.h>
-
-int
-main ()
-{
-  /* allocate some memory */
-  uint_t win_s = 1024;          /* window size */
-  smpl_t ratio = 0.5;
-  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;
-
-  while (i < 10) {
-    aubio_resampler_do (o, in, out);
-    i++;
-  };
-
-  del_aubio_resampler (o);
-  del_fvec (in);
-  del_fvec (out);
-
-  return 0;
-}
Index: tests/src/test-scale.c
===================================================================
--- tests/src/test-scale.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#define AUBIO_UNSTABLE 1
-
-#include <aubio.h>
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        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;
-
-        while (i < 1000) {
-          aubio_scale_do(o,in);
-          i++;
-        };
-
-        del_aubio_scale(o);
-        del_fvec(in);
-
-        return 0;
-}
Index: tests/src/test-tss.c
===================================================================
--- tests/src/test-tss.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/* 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;
-}
Index: tests/src/test-window.c
===================================================================
--- tests/src/test-window.c	(revision ed766c7e98fc5f54bc62f2d07fef472284c9c0ea)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#include <aubio.h>
-#include <stdlib.h>
-
-int main( )
-{
-  uint_t length;
-  for (length = 2; length <= 5; length++)
-  {
-    fvec_t *t = new_aubio_window("rectangle", length);
-    del_fvec(t);
-    t = new_aubio_window("hamming", length);
-    fvec_print(t);
-    del_fvec(t);
-    t = new_aubio_window("hanning", length);
-    fvec_print(t);
-    del_fvec(t);
-    t = new_aubio_window("hanningz", length);
-    fvec_print(t);
-    del_fvec(t);
-    t = new_aubio_window("blackman", length);
-    fvec_print(t);
-    del_fvec(t);
-    t = new_aubio_window("blackman_harris", length);
-    fvec_print(t);
-    del_fvec(t);
-    t = new_aubio_window("gaussian", length);
-    fvec_print(t);
-    del_fvec(t);
-    t = new_aubio_window("welch", length);
-    fvec_print(t);
-    del_fvec(t);
-    t = new_aubio_window("parzen", length);
-    fvec_print(t);
-    del_fvec(t);
-    t = new_aubio_window("default", length);
-    fvec_print(t);
-    del_fvec(t);
-  }
-  return 0;
-}
-
Index: tests/src/utils/test-hist.c
===================================================================
--- tests/src/utils/test-hist.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/utils/test-hist.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,31 @@
+#define AUBIO_UNSTABLE 1
+
+#include <aubio.h>
+#include <stdlib.h>
+
+int main( )
+{
+  uint_t length;
+  for (length = 1; length < 10; length ++ ) {
+    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);
+    aubio_hist_do_notnull(o,t);
+    fvec_print(t);
+    aubio_hist_dyn_notnull(o,t);
+    fvec_print(t);
+    del_fvec(t);
+    t = new_aubio_window("hanningz", length);
+    aubio_hist_do(o,t);
+    fvec_print(t);
+    aubio_hist_do_notnull(o,t);
+    fvec_print(t);
+    aubio_hist_dyn_notnull(o,t);
+    fvec_print(t);
+    del_aubio_hist(o);
+    del_fvec(t);
+  }
+  return 0;
+}
+
Index: tests/src/utils/test-scale.c
===================================================================
--- tests/src/utils/test-scale.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
+++ tests/src/utils/test-scale.c	(revision 02418f6a5f935cfe38de8c5ed40ede2afb4a1a17)
@@ -0,0 +1,22 @@
+#define AUBIO_UNSTABLE 1
+
+#include <aubio.h>
+
+int main(){
+        /* allocate some memory */
+        uint_t win_s      = 1024;                       /* window size */
+        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;
+
+        while (i < 1000) {
+          aubio_scale_do(o,in);
+          i++;
+        };
+
+        del_aubio_scale(o);
+        del_fvec(in);
+
+        return 0;
+}
