Index: interfaces/python/aubio-types.h
===================================================================
--- interfaces/python/aubio-types.h	(revision 858cfa7b34a9a932edd72c56297ddd19e5a8a6f7)
+++ interfaces/python/aubio-types.h	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -10,8 +10,9 @@
 #define Py_aubio_default_samplerate 44100
 
-#ifdef HAVE_AUBIO_DOUBLE
-#define AUBIO_FLOAT NPY_FLOAT
+#if HAVE_AUBIO_DOUBLE
+#error "Ouch! Python interface for aubio has not been much tested yet."
+#define AUBIO_NPY_SMPL NPY_DOUBLE
 #else
-#define AUBIO_FLOAT NPY_LONG
+#define AUBIO_NPY_SMPL NPY_FLOAT
 #endif
 
@@ -33,10 +34,23 @@
 } Py_fvec;
 extern PyTypeObject Py_fvecType;
+extern PyObject *PyAubio_FvecToArray (Py_fvec * self);
+extern Py_fvec *PyAubio_ArrayToFvec (PyObject * self);
 
+typedef struct
+{
+  PyObject_HEAD
+  cvec_t * o;
+  uint_t length;
+  uint_t channels;
+} Py_cvec;
 extern PyTypeObject Py_cvecType;
+extern PyObject *PyAubio_CvecToArray (Py_cvec * self);
+extern Py_cvec *PyAubio_ArrayToCvec (PyObject * self);
 
 extern PyTypeObject Py_filterType;
 
-extern PyObject *PyAubio_FvecToArray (Py_fvec * self);
+extern PyTypeObject Py_filterbankType;
 
-extern Py_fvec *PyAubio_ArrayToFvec (PyObject * self);
+extern PyTypeObject Py_fftType;
+
+extern PyTypeObject Py_pvocType;
Index: interfaces/python/aubiomodule.c
===================================================================
--- interfaces/python/aubiomodule.c	(revision 858cfa7b34a9a932edd72c56297ddd19e5a8a6f7)
+++ interfaces/python/aubiomodule.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -94,4 +94,5 @@
   // compute the function
   fvec_min_removal (vec->o);
+
   // since this function does not return, we could return None
   //return Py_None;
@@ -119,7 +120,11 @@
   int err;
 
-  if ((PyType_Ready (&Py_fvecType) < 0) ||
-      (PyType_Ready (&Py_cvecType) < 0) ||
-      (PyType_Ready (&Py_filterType) < 0)) {
+  if ((PyType_Ready (&Py_fvecType) < 0) 
+      || (PyType_Ready (&Py_cvecType) < 0) 
+      || (PyType_Ready (&Py_filterType) < 0) 
+      || (PyType_Ready (&Py_filterbankType) < 0) 
+      || (PyType_Ready (&Py_fftType) < 0) 
+      || (PyType_Ready (&Py_pvocType) < 0) 
+  ) {
     return;
   }
@@ -144,3 +149,9 @@
   Py_INCREF (&Py_filterType);
   PyModule_AddObject (m, "digital_filter", (PyObject *) & Py_filterType);
+  Py_INCREF (&Py_filterbankType);
+  PyModule_AddObject (m, "filterbank", (PyObject *) & Py_filterbankType);
+  Py_INCREF (&Py_fftType);
+  PyModule_AddObject (m, "fft", (PyObject *) & Py_fftType);
+  Py_INCREF (&Py_pvocType);
+  PyModule_AddObject (m, "pvoc", (PyObject *) & Py_pvocType);
 }
Index: interfaces/python/py-cvec.c
===================================================================
--- interfaces/python/py-cvec.c	(revision 858cfa7b34a9a932edd72c56297ddd19e5a8a6f7)
+++ interfaces/python/py-cvec.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -9,14 +9,6 @@
         self.norm = array(length, channels)
         self.phas = array(length, channels)
-
 */
 
-typedef struct
-{
-  PyObject_HEAD
-  cvec_t * o;
-  uint_t length;
-  uint_t channels;
-} Py_cvec;
 
 static char Py_cvec_doc[] = "cvec object";
@@ -97,5 +89,5 @@
     goto fail;
   }
-  cvec_print ( self->o );
+  //cvec_print ( self->o );
 
   result = PyString_Format (format, args);
@@ -133,7 +125,7 @@
       goto fail;
 #if AUBIO_DO_CASTING
-    } else if (PyArray_TYPE (input) != AUBIO_FLOAT) {
+    } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
       // input data type is not float32, casting 
-      array = PyArray_Cast ( (PyArrayObject*) input, AUBIO_FLOAT);
+      array = PyArray_Cast ( (PyArrayObject*) input, AUBIO_NPY_SMPL);
       if (array == NULL) {
         PyErr_SetString (PyExc_IndexError, "failed converting to NPY_FLOAT");
@@ -141,5 +133,5 @@
       }
 #else
-    } else if (PyArray_TYPE (input) != AUBIO_FLOAT) {
+    } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
       PyErr_SetString (PyExc_ValueError, "input array should be float32");
       goto fail;
@@ -153,8 +145,12 @@
     vec = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType); 
     if (PyArray_NDIM (array) == 1) {
+      PyErr_SetString (PyExc_ValueError,
+          "input array should be have at least two rows for norm and phas");
+      goto fail;
+    } else if (PyArray_NDIM (array) == 2) {
       vec->channels = 1;
       vec->length = PyArray_SIZE (array);
     } else {
-      vec->channels = PyArray_DIM (array, 0);
+      vec->channels = PyArray_DIM (array, 0) / 2;
       vec->length = PyArray_DIM (array, 1);
     }
@@ -167,6 +163,7 @@
     vec->o->phas = (smpl_t**)malloc(vec->o->channels * sizeof(smpl_t*));
     // hat data[i] point to array line
-    for (i = 0; i < vec->channels; i++) {
+    for (i = 0; i < vec->channels; i+=2) {
       vec->o->norm[i] = (smpl_t *) PyArray_GETPTR1 (array, i);
+      vec->o->phas[i] = (smpl_t *) PyArray_GETPTR1 (array, i+1);
     }
 
@@ -186,20 +183,88 @@
 {
   PyObject *array = NULL;
-  if (self->channels == 1) {
-    npy_intp dims[] = { self->length, 1 };
-    array = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->norm[0]);
-  } else {
-    uint_t i;
-    npy_intp dims[] = { self->length, 1 };
-    PyObject *concat = PyList_New (0), *tmp = NULL;
-    for (i = 0; i < self->channels; i++) {
-      tmp = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->norm[i]);
-      PyList_Append (concat, tmp);
-      Py_DECREF (tmp);
-    }
-    array = PyArray_FromObject (concat, NPY_FLOAT, 2, 2);
-    Py_DECREF (concat);
-  }
+  uint_t i;
+  npy_intp dims[] = { self->o->length, 1 };
+  PyObject *concat = PyList_New (0), *tmp = NULL;
+  for (i = 0; i < self->channels; i++) {
+    tmp = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->norm[i]);
+    PyList_Append (concat, tmp);
+    Py_DECREF (tmp);
+    tmp = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->phas[i]);
+    PyList_Append (concat, tmp);
+    Py_DECREF (tmp);
+  }
+  array = PyArray_FromObject (concat, NPY_FLOAT, 2, 2);
+  Py_DECREF (concat);
   return array;
+}
+
+PyObject *
+PyAubio_CvecNormToArray (Py_cvec * self)
+{
+  PyObject *array = NULL;
+  uint_t i;
+  npy_intp dims[] = { self->o->length, 1 };
+  PyObject *concat = PyList_New (0), *tmp = NULL;
+  for (i = 0; i < self->channels; i++) {
+    tmp = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->norm[i]);
+    PyList_Append (concat, tmp);
+    Py_DECREF (tmp);
+  }
+  array = PyArray_FromObject (concat, NPY_FLOAT, 2, 2);
+  Py_DECREF (concat);
+  return array;
+}
+
+PyObject *
+PyAubio_ArrayToCvecNorm (PyObject * self)
+{
+  return NULL;
+}
+
+PyObject *
+PyAubio_CvecPhasToArray (Py_cvec * self)
+{
+  PyObject *array = NULL;
+  uint_t i;
+  npy_intp dims[] = { self->o->length, 1 };
+  PyObject *concat = PyList_New (0), *tmp = NULL;
+  for (i = 0; i < self->channels; i++) {
+    tmp = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->phas[i]);
+    PyList_Append (concat, tmp);
+    Py_DECREF (tmp);
+  }
+  array = PyArray_FromObject (concat, NPY_FLOAT, 2, 2);
+  Py_DECREF (concat);
+  return array;
+}
+
+PyObject *
+PyAubio_ArrayToCvecPhas (PyObject * self)
+{
+  return NULL;
+}
+
+PyObject *
+Py_cvec_get_norm (Py_cvec * self, void *closure)
+{
+  return PyAubio_CvecNormToArray(self);
+}
+
+PyObject *
+Py_cvec_get_phas (Py_cvec * self, void *closure)
+{
+  return PyAubio_CvecPhasToArray(self);
+}
+
+static int
+Py_cvec_set_norm (Py_cvec * self, PyObject *value, void * closure)
+{
+  return 0;
+}
+
+static int
+Py_cvec_set_phas (Py_cvec * self, PyObject *value, void * closure)
+{
+  return 0;
 }
 
@@ -270,7 +335,23 @@
 
 static PyMethodDef Py_cvec_methods[] = {
-  {"__array__", (PyCFunction) PyAubio_FvecToArray, METH_NOARGS,
-      "Returns the first channel as a numpy array."},
+  {"__array__", (PyCFunction) PyAubio_CvecToArray, METH_NOARGS,
+      "Returns the content of this cvec as a numpy array"},
+/*
+  {"norm", (PyCFunction) PyAubio_CvecNormToArray, METH_NOARGS,
+      "Returns the content of the magnitude of this cvec as a numpy array."},
+  {"phas", (PyCFunction) PyAubio_CvecPhasToArray, METH_NOARGS,
+      "Returns the content of the phase of this cvec as a numpy array."},
+*/
   {NULL}
+};
+
+static PyGetSetDef Py_cvec_getseters[] = {
+  {"norm", (getter)Py_cvec_get_norm, (setter)Py_cvec_set_norm, 
+      "Content of the magnitude of this cvec",
+      NULL},
+  {"phas", (getter)Py_cvec_get_phas, (setter)Py_cvec_set_phas, 
+      "Content of the magnitude of this cvec",
+      NULL},
+  {NULL} /* sentinel */
 };
 
@@ -320,5 +401,5 @@
   Py_cvec_methods,              /* tp_methods        */
   Py_cvec_members,              /* tp_members        */
-  0,                            /* tp_getset         */
+  Py_cvec_getseters,            /* tp_getset         */
   0,                            /* tp_base           */
   0,                            /* tp_dict           */
Index: interfaces/python/py-fft.c
===================================================================
--- interfaces/python/py-fft.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
+++ interfaces/python/py-fft.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -0,0 +1,126 @@
+#include "aubiowraphell.h"
+
+static char Py_fft_doc[] = "fft object";
+
+AUBIO_DECLARE(fft, uint_t win_s; uint_t channels)
+
+//AUBIO_NEW(fft)
+static PyObject *
+Py_fft_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
+{
+  int win_s = 0, channels = 0;
+  Py_fft *self;
+  static char *kwlist[] = { "win_s", "channels", NULL };
+
+  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|II", kwlist,
+          &win_s, &channels)) {
+    return NULL;
+  }
+
+  self = (Py_fft *) type->tp_alloc (type, 0);
+
+  if (self == NULL) {
+    return NULL;
+  }
+
+  self->win_s = Py_default_vector_length;
+  self->channels = Py_default_vector_channels;
+
+  if (self == NULL) {
+    return NULL;
+  }
+
+  if (win_s > 0) {
+    self->win_s = win_s;
+  } else if (win_s < 0) {
+    PyErr_SetString (PyExc_ValueError,
+        "can not use negative window size");
+    return NULL;
+  }
+
+  if (channels > 0) {
+    self->channels = channels;
+  } else if (channels < 0) {
+    PyErr_SetString (PyExc_ValueError,
+        "can not use negative number of filters");
+    return NULL;
+  }
+
+  return (PyObject *) self;
+}
+
+
+AUBIO_INIT(fft, self->win_s, self->channels)
+
+AUBIO_DEL(fft)
+
+static PyObject * 
+Py_fft_do(PyObject * self, PyObject * args)
+{
+  PyObject *input;
+  Py_fvec *vec;
+  Py_cvec *output;
+
+  if (!PyArg_ParseTuple (args, "O", &input)) {
+    return NULL;
+  }
+
+  vec = PyAubio_ArrayToFvec (input);
+
+  if (vec == NULL) {
+    return NULL;
+  }
+
+  output = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);
+  output->channels = vec->channels;
+  output->length = ((Py_fft *) self)->win_s;
+  output->o = new_cvec(((Py_fft *) self)->win_s, vec->channels);
+
+  // compute the function
+  aubio_fft_do (((Py_fft *)self)->o, vec->o, output->o);
+  Py_INCREF(output);
+  return (PyObject *)output;
+  //return (PyObject *)PyAubio_CvecToArray(output);
+}
+
+AUBIO_MEMBERS_START(fft) 
+  {"win_s", T_INT, offsetof (Py_fft, win_s), READONLY,
+    "size of the window"},
+  {"channels", T_INT, offsetof (Py_fft, channels), READONLY,
+    "number of channels"},
+AUBIO_MEMBERS_STOP(fft)
+
+static PyObject * 
+Py_fft_rdo(PyObject * self, PyObject * args)
+{
+  PyObject *input;
+  Py_cvec *vec;
+  Py_fvec *output;
+
+  if (!PyArg_ParseTuple (args, "O", &input)) {
+    return NULL;
+  }
+
+  vec = PyAubio_ArrayToCvec (input);
+
+  if (vec == NULL) {
+    return NULL;
+  }
+
+  output = (Py_fvec*) PyObject_New (Py_fvec, &Py_fvecType);
+  output->channels = vec->channels;
+  output->length = ((Py_fft *) self)->win_s;
+  output->o = new_fvec(output->length, output->channels);
+
+  // compute the function
+  aubio_fft_rdo (((Py_fft *)self)->o, vec->o, output->o);
+  return (PyObject *)PyAubio_FvecToArray(output);
+}
+
+static PyMethodDef Py_fft_methods[] = {
+  {"rdo", (PyCFunction) Py_fft_rdo, METH_VARARGS,
+    "synthesis of spectral grain"},
+  {NULL}
+};
+
+AUBIO_TYPEOBJECT(fft, "aubio.fft")
Index: interfaces/python/py-filter.c
===================================================================
--- interfaces/python/py-filter.c	(revision 858cfa7b34a9a932edd72c56297ddd19e5a8a6f7)
+++ interfaces/python/py-filter.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -5,5 +5,4 @@
   PyObject_HEAD
   aubio_filter_t * o;
-  uint_t samplerate;
   uint_t order;
   uint_t channels;
@@ -15,10 +14,10 @@
 Py_filter_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
 {
-  int samplerate= 0, order= 0, channels = 0;
+  int order= 0, channels = 0;
   Py_filter *self;
-  static char *kwlist[] = { "samplerate", "order", "channels", NULL };
+  static char *kwlist[] = { "order", "channels", NULL };
 
-  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|III", kwlist,
-          &samplerate, &order, &channels)) {
+  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|II", kwlist,
+          &order, &channels)) {
     return NULL;
   }
@@ -26,19 +25,10 @@
   self = (Py_filter *) type->tp_alloc (type, 0);
 
-  self->samplerate = Py_aubio_default_samplerate;
-  self->order = 7;
-  self->channels = Py_default_vector_channels;
-
   if (self == NULL) {
     return NULL;
   }
 
-  if (samplerate > 0) {
-    self->samplerate = samplerate;
-  } else if (samplerate < 0) {
-    PyErr_SetString (PyExc_ValueError,
-        "can not use negative samplerate");
-    return NULL;
-  }
+  self->order = 7;
+  self->channels = Py_default_vector_channels;
 
   if (order > 0) {
@@ -64,5 +54,5 @@
 Py_filter_init (Py_filter * self, PyObject * args, PyObject * kwds)
 {
-  self->o = new_aubio_filter (self->samplerate, self->order, self->channels);
+  self->o = new_aubio_filter (self->order, self->channels);
   if (self->o == NULL) {
     return -1;
@@ -113,10 +103,16 @@
 
 static PyObject * 
-Py_filter_set_c_weighting (Py_filter * self, PyObject *unused)
+Py_filter_set_c_weighting (Py_filter * self, PyObject *args)
 {
-  uint_t err = aubio_filter_set_c_weighting (((Py_filter *)self)->o);
+  uint_t err = 0;
+  uint_t samplerate;
+  if (!PyArg_ParseTuple (args, "I", &samplerate)) {
+    return NULL;
+  }
+
+  err = aubio_filter_set_c_weighting (self->o, samplerate);
   if (err > 0) {
     PyErr_SetString (PyExc_ValueError,
-        "error when setting filter to C-weighting");
+        "error when setting filter to A-weighting");
     return NULL;
   }
@@ -125,7 +121,13 @@
 
 static PyObject * 
-Py_filter_set_a_weighting (Py_filter * self, PyObject *unused)
+Py_filter_set_a_weighting (Py_filter * self, PyObject *args)
 {
-  uint_t err = aubio_filter_set_a_weighting (((Py_filter *)self)->o);
+  uint_t err = 0;
+  uint_t samplerate;
+  if (!PyArg_ParseTuple (args, "I", &samplerate)) {
+    return NULL;
+  }
+
+  err = aubio_filter_set_a_weighting (self->o, samplerate);
   if (err > 0) {
     PyErr_SetString (PyExc_ValueError,
@@ -138,6 +140,4 @@
 static PyMemberDef Py_filter_members[] = {
   // TODO remove READONLY flag and define getter/setter
-  {"samplerate", T_INT, offsetof (Py_filter, samplerate), READONLY,
-      "sampling rate"},
   {"order", T_INT, offsetof (Py_filter, order), READONLY,
       "order of the filter"},
@@ -148,6 +148,4 @@
 
 static PyMethodDef Py_filter_methods[] = {
-  {"do", (PyCFunction) Py_filter_do, METH_VARARGS,
-      "filter input vector"},
   {"set_c_weighting", (PyCFunction) Py_filter_set_c_weighting, METH_NOARGS,
       "set filter coefficients to C-weighting"},
Index: interfaces/python/py-filterbank.c
===================================================================
--- interfaces/python/py-filterbank.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
+++ interfaces/python/py-filterbank.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -0,0 +1,157 @@
+#include "aubiowraphell.h"
+
+static char Py_filterbank_doc[] = "filterbank object";
+
+AUBIO_DECLARE(filterbank, uint_t n_filters; uint_t win_s)
+
+//AUBIO_NEW(filterbank)
+static PyObject *
+Py_filterbank_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
+{
+  int win_s = 0, n_filters = 0;
+  Py_filterbank *self;
+  static char *kwlist[] = { "n_filters", "win_s", NULL };
+
+  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|II", kwlist,
+          &n_filters, &win_s)) {
+    return NULL;
+  }
+
+  self = (Py_filterbank *) type->tp_alloc (type, 0);
+
+  if (self == NULL) {
+    return NULL;
+  }
+
+  self->win_s = Py_default_vector_length;
+  if (win_s > 0) {
+    self->win_s = win_s;
+  } else if (win_s < 0) {
+    PyErr_SetString (PyExc_ValueError,
+        "can not use negative window size");
+    return NULL;
+  }
+
+  self->n_filters = 40;
+  if (n_filters > 0) {
+    self->n_filters = n_filters;
+  } else if (n_filters < 0) {
+    PyErr_SetString (PyExc_ValueError,
+        "can not use negative number of filters");
+    return NULL;
+  }
+
+  return (PyObject *) self;
+}
+
+
+AUBIO_INIT(filterbank, self->n_filters, self->win_s)
+
+AUBIO_DEL(filterbank)
+
+static PyObject * 
+Py_filterbank_do(Py_filterbank * self, PyObject * args)
+{
+  PyObject *input;
+  Py_cvec *vec;
+  Py_fvec *output;
+
+  if (!PyArg_ParseTuple (args, "O", &input)) {
+    return NULL;
+  }
+
+  vec = PyAubio_ArrayToCvec (input);
+
+  if (vec == NULL) {
+    return NULL;
+  }
+
+  output = (Py_fvec*) PyObject_New (Py_fvec, &Py_fvecType);
+  output->channels = vec->channels;
+  output->length = self->n_filters;
+  output->o = new_fvec(self->n_filters, vec->channels);
+
+  // compute the function
+  aubio_filterbank_do (self->o, vec->o, output->o);
+  return (PyObject *)PyAubio_FvecToArray(output);
+}
+
+AUBIO_MEMBERS_START(filterbank) 
+  {"win_s", T_INT, offsetof (Py_filterbank, win_s), READONLY,
+    "size of the window"},
+  {"n_filters", T_INT, offsetof (Py_filterbank, n_filters), READONLY,
+    "number of filters"},
+AUBIO_MEMBERS_STOP(filterbank)
+
+static PyObject * 
+Py_filterbank_set_triangle_bands (Py_filterbank * self, PyObject *args)
+{
+  uint_t err = 0;
+
+  PyObject *input;
+  uint_t samplerate;
+  Py_fvec *freqs;
+  if (!PyArg_ParseTuple (args, "OI", &input, &samplerate)) {
+    return NULL;
+  }
+
+  if (input == NULL) {
+    return NULL;
+  }
+
+  freqs = PyAubio_ArrayToFvec (input);
+
+  if (freqs == NULL) {
+    return NULL;
+  }
+
+  err = aubio_filterbank_set_triangle_bands (self->o,
+      freqs->o, samplerate);
+  if (err > 0) {
+    PyErr_SetString (PyExc_ValueError,
+        "error when setting filter to A-weighting");
+    return NULL;
+  }
+  return Py_None;
+}
+
+static PyObject * 
+Py_filterbank_set_mel_coeffs_slaney (Py_filterbank * self, PyObject *args)
+{
+  uint_t err = 0;
+
+  uint_t samplerate;
+  if (!PyArg_ParseTuple (args, "I", &samplerate)) {
+    return NULL;
+  }
+
+  err = aubio_filterbank_set_mel_coeffs_slaney (self->o, samplerate);
+  if (err > 0) {
+    PyErr_SetString (PyExc_ValueError,
+        "error when setting filter to A-weighting");
+    return NULL;
+  }
+  return Py_None;
+}
+
+static PyObject * 
+Py_filterbank_get_coeffs (Py_filterbank * self, PyObject *unused)
+{
+  Py_fvec *output = (Py_fvec *) PyObject_New (Py_fvec, &Py_fvecType);
+  output->channels = self->n_filters;
+  output->length = self->win_s / 2 + 1;
+  output->o = aubio_filterbank_get_coeffs (self->o);
+  return (PyObject *)PyAubio_FvecToArray(output);
+}
+
+static PyMethodDef Py_filterbank_methods[] = {
+  {"set_triangle_bands", (PyCFunction) Py_filterbank_set_triangle_bands,
+    METH_VARARGS, "set coefficients of filterbanks"},
+  {"set_mel_coeffs_slaney", (PyCFunction) Py_filterbank_set_mel_coeffs_slaney,
+    METH_VARARGS, "set coefficients of filterbank as in Auditory Toolbox"},
+  {"get_coeffs", (PyCFunction) Py_filterbank_get_coeffs,
+    METH_NOARGS, "get coefficients of filterbank"},
+  {NULL}
+};
+
+AUBIO_TYPEOBJECT(filterbank, "aubio.filterbank")
Index: interfaces/python/py-fvec.c
===================================================================
--- interfaces/python/py-fvec.c	(revision 858cfa7b34a9a932edd72c56297ddd19e5a8a6f7)
+++ interfaces/python/py-fvec.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -128,13 +128,13 @@
       goto fail;
 #if AUBIO_DO_CASTING
-    } else if (PyArray_TYPE (input) != AUBIO_FLOAT) {
+    } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
       // input data type is not float32, casting 
-      array = PyArray_Cast ( (PyArrayObject*) input, AUBIO_FLOAT);
+      array = PyArray_Cast ( (PyArrayObject*) input, AUBIO_NPY_SMPL);
       if (array == NULL) {
-        PyErr_SetString (PyExc_IndexError, "failed converting to NPY_FLOAT");
+        PyErr_SetString (PyExc_IndexError, "failed converting to AUBIO_NPY_SMPL");
         goto fail;
       }
 #else
-    } else if (PyArray_TYPE (input) != AUBIO_FLOAT) {
+    } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
       PyErr_SetString (PyExc_ValueError, "input array should be float32");
       goto fail;
@@ -182,5 +182,5 @@
   if (self->channels == 1) {
     npy_intp dims[] = { self->length, 1 };
-    array = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->data[0]);
+    array = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, self->o->data[0]);
   } else {
     uint_t i;
@@ -188,9 +188,9 @@
     PyObject *concat = PyList_New (0), *tmp = NULL;
     for (i = 0; i < self->channels; i++) {
-      tmp = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->data[i]);
+      tmp = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, self->o->data[i]);
       PyList_Append (concat, tmp);
       Py_DECREF (tmp);
     }
-    array = PyArray_FromObject (concat, NPY_FLOAT, 2, 2);
+    array = PyArray_FromObject (concat, AUBIO_NPY_SMPL, 2, 2);
     Py_DECREF (concat);
   }
@@ -215,5 +215,5 @@
 
   npy_intp dims[] = { self->length, 1 };
-  array = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->data[index]);
+  array = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, self->o->data[index]);
   return array;
 }
@@ -229,5 +229,5 @@
   }
 
-  array = PyArray_FROM_OT (o, NPY_FLOAT);
+  array = PyArray_FROM_OT (o, AUBIO_NPY_SMPL);
   if (array == NULL) {
     PyErr_SetString (PyExc_ValueError, "should be an array of float");
Index: interfaces/python/py-phasevoc.c
===================================================================
--- interfaces/python/py-phasevoc.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
+++ interfaces/python/py-phasevoc.c	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -0,0 +1,137 @@
+#include "aubiowraphell.h"
+
+static char Py_pvoc_doc[] = "pvoc object";
+
+AUBIO_DECLARE(pvoc, uint_t win_s; uint_t hop_s; uint_t channels)
+
+//AUBIO_NEW(pvoc)
+static PyObject *
+Py_pvoc_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
+{
+  int win_s = 0, hop_s = 0, channels = 0;
+  Py_pvoc *self;
+  static char *kwlist[] = { "win_s", "hop_s", "channels", NULL };
+
+  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|III", kwlist,
+          &win_s, &hop_s, &channels)) {
+    return NULL;
+  }
+
+  self = (Py_pvoc *) type->tp_alloc (type, 0);
+
+  if (self == NULL) {
+    return NULL;
+  }
+
+  self->win_s = Py_default_vector_length;
+  self->hop_s = Py_default_vector_length/2;
+  self->channels = Py_default_vector_channels;
+
+  if (self == NULL) {
+    return NULL;
+  }
+
+  if (win_s > 0) {
+    self->win_s = win_s;
+  } else if (win_s < 0) {
+    PyErr_SetString (PyExc_ValueError,
+        "can not use negative window size");
+    return NULL;
+  }
+
+  if (hop_s > 0) {
+    self->hop_s = hop_s;
+  } else if (hop_s < 0) {
+    PyErr_SetString (PyExc_ValueError,
+        "can not use negative hop size");
+    return NULL;
+  }
+
+  if (channels > 0) {
+    self->channels = channels;
+  } else if (channels < 0) {
+    PyErr_SetString (PyExc_ValueError,
+        "can not use negative number of filters");
+    return NULL;
+  }
+
+  return (PyObject *) self;
+}
+
+
+AUBIO_INIT(pvoc, self->win_s, self->hop_s, self->channels)
+
+AUBIO_DEL(pvoc)
+
+static PyObject * 
+Py_pvoc_do(PyObject * self, PyObject * args)
+{
+  PyObject *input;
+  Py_fvec *vec;
+  Py_cvec *output;
+
+  if (!PyArg_ParseTuple (args, "O", &input)) {
+    return NULL;
+  }
+
+  vec = PyAubio_ArrayToFvec (input);
+
+  if (vec == NULL) {
+    return NULL;
+  }
+
+  output = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);
+  output->channels = vec->channels;
+  output->length = ((Py_pvoc *) self)->win_s;
+  output->o = new_cvec(((Py_pvoc *) self)->win_s, vec->channels);
+
+  // compute the function
+  aubio_pvoc_do (((Py_pvoc *)self)->o, vec->o, output->o);
+  Py_INCREF(output);
+  return (PyObject *)output;
+  //return (PyObject *)PyAubio_CvecToArray(output);
+}
+
+AUBIO_MEMBERS_START(pvoc) 
+  {"win_s", T_INT, offsetof (Py_pvoc, win_s), READONLY,
+    "size of the window"},
+  {"hop_s", T_INT, offsetof (Py_pvoc, hop_s), READONLY,
+    "size of the hop"},
+  {"channels", T_INT, offsetof (Py_pvoc, channels), READONLY,
+    "number of channels"},
+AUBIO_MEMBERS_STOP(pvoc)
+
+static PyObject * 
+Py_pvoc_rdo(PyObject * self, PyObject * args)
+{
+  PyObject *input;
+  Py_cvec *vec;
+  Py_fvec *output;
+
+  if (!PyArg_ParseTuple (args, "O", &input)) {
+    return NULL;
+  }
+
+  vec = PyAubio_ArrayToCvec (input);
+
+  if (vec == NULL) {
+    return NULL;
+  }
+
+  output = (Py_fvec*) PyObject_New (Py_fvec, &Py_fvecType);
+  output->channels = vec->channels;
+  output->length = ((Py_pvoc *) self)->hop_s;
+  output->o = new_fvec(output->length, output->channels);
+
+  // compute the function
+  aubio_pvoc_rdo (((Py_pvoc *)self)->o, vec->o, output->o);
+  return (PyObject *)PyAubio_FvecToArray(output);
+}
+
+static PyMethodDef Py_pvoc_methods[] = {
+  {"rdo", (PyCFunction) Py_pvoc_rdo, METH_VARARGS,
+    "synthesis of spectral grain"},
+  {NULL}
+};
+
+AUBIO_TYPEOBJECT(pvoc, "aubio.pvoc")
Index: interfaces/python/setup.py
===================================================================
--- interfaces/python/setup.py	(revision 858cfa7b34a9a932edd72c56297ddd19e5a8a6f7)
+++ interfaces/python/setup.py	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -1,9 +1,22 @@
 from distutils.core import setup, Extension
+
+from os import listdir
+generated_files = listdir('generated')
+generated_files = ['generated/'+f for f in generated_files]
 
 setup(name="_aubio", version="1.0",
       ext_modules = [ 
         Extension("_aubio",
-            ["aubiomodule.c", "py-fvec.c", "py-cvec.c", "py-filter.c"],
-            include_dirs=['../../build/default/src', '../../src' ],
+            ["aubiomodule.c",
+            "py-fvec.c",
+            "py-cvec.c",
+            "py-filter.c",
+            # macroised 
+            "py-filterbank.c",
+            "py-fft.c",
+            "py-phasevoc.c",
+            # generated files
+            ] + generated_files,
+            include_dirs=['../../build/default/src', '../../src', '.' ],
             library_dirs=['../../build/default/src', '../../src/.libs' ],
             libraries=['aubio'])])
Index: interfaces/python/test_filter.py
===================================================================
--- interfaces/python/test_filter.py	(revision 858cfa7b34a9a932edd72c56297ddd19e5a8a6f7)
+++ interfaces/python/test_filter.py	(revision 615ac7dde5b64cec5df54025d9efe96273d00a17)
@@ -12,7 +12,7 @@
   def test_members(self):
     f = digital_filter()
-    assert_equal ([f.channels, f.order, f.samplerate], [1, 7, 44100])
-    f = digital_filter(48000, 5, 2)
-    assert_equal ([f.channels, f.order, f.samplerate], [2, 5, 48000])
+    assert_equal ([f.channels, f.order], [1, 7])
+    f = digital_filter(5, 2)
+    assert_equal ([f.channels, f.order], [2, 5])
     f(fvec())
   
@@ -33,6 +33,6 @@
   def test_c_weighting(self):
     expected = array_from_text_file('c_weighting_test_simple.expected')
-    f = digital_filter(44100, 5, 1)
-    f.set_c_weighting()
+    f = digital_filter(5, 1)
+    f.set_c_weighting(44100)
     v = fvec(32)
     v[0][12] = .5
@@ -42,6 +42,6 @@
   def test_a_weighting(self):
     expected = array_from_text_file('a_weighting_test_simple.expected')
-    f = digital_filter(44100, 7, 1)
-    f.set_a_weighting()
+    f = digital_filter(7, 1)
+    f.set_a_weighting(44100)
     v = fvec(32)
     v[0][12] = .5
@@ -51,6 +51,6 @@
   def test_a_weighting_parted(self):
     expected = array_from_text_file('a_weighting_test_simple.expected')
-    f = digital_filter(44100, 7, 1)
-    f.set_a_weighting()
+    f = digital_filter(7, 1)
+    f.set_a_weighting(44100)
     v = fvec(16)
     v[0][12] = .5
