Index: python/ext/aubio-types.h
===================================================================
--- python/ext/aubio-types.h	(revision d7019c4b9e1f91be81d7fb740b5ba989a570e972)
+++ python/ext/aubio-types.h	(revision d27634db13fcc48b84ec2dd08018af7c105e9cba)
@@ -31,5 +31,5 @@
 #define Py_default_vector_length 1024
 
-#define Py_aubio_default_samplerate 44100
+#define Py_aubio_default_samplerate 0
 
 #if HAVE_AUBIO_DOUBLE
@@ -69,2 +69,4 @@
 extern PyTypeObject Py_pvocType;
 
+extern PyTypeObject Py_sourceType;
+
Index: python/ext/aubiomodule.c
===================================================================
--- python/ext/aubiomodule.c	(revision d7019c4b9e1f91be81d7fb740b5ba989a570e972)
+++ python/ext/aubiomodule.c	(revision d27634db13fcc48b84ec2dd08018af7c105e9cba)
@@ -199,4 +199,5 @@
       || (PyType_Ready (&Py_fftType) < 0)
       || (PyType_Ready (&Py_pvocType) < 0)
+      || (PyType_Ready (&Py_sourceType) < 0)
       // generated objects
       || (generated_types_ready() < 0 )
@@ -227,4 +228,6 @@
   Py_INCREF (&Py_pvocType);
   PyModule_AddObject (m, "pvoc", (PyObject *) & Py_pvocType);
+  Py_INCREF (&Py_sourceType);
+  PyModule_AddObject (m, "source", (PyObject *) & Py_sourceType);
 
   // add generated objects
Index: python/ext/py-source.c
===================================================================
--- python/ext/py-source.c	(revision d27634db13fcc48b84ec2dd08018af7c105e9cba)
+++ python/ext/py-source.c	(revision d27634db13fcc48b84ec2dd08018af7c105e9cba)
@@ -0,0 +1,137 @@
+// WARNING: this file is generated, DO NOT EDIT
+
+// WARNING: if you haven't read the first line yet, please do so
+#include "aubiowraphell.h"
+
+typedef struct
+{
+  PyObject_HEAD
+  aubio_source_t * o;
+  char_t* uri;
+  uint_t samplerate;
+  uint_t hop_size;
+} Py_source;
+
+static char Py_source_doc[] = "source object";
+
+static PyObject *
+Py_source_new (PyTypeObject * pytype, PyObject * args, PyObject * kwds)
+{
+  Py_source *self;
+  char_t* uri = NULL;
+  uint_t samplerate = 0;
+  uint_t hop_size = 0;
+  static char *kwlist[] = { "uri", "samplerate", "hop_size", NULL };
+
+  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|sII", kwlist,
+          &uri, &samplerate, &hop_size)) {
+    return NULL;
+  }
+
+  self = (Py_source *) pytype->tp_alloc (pytype, 0);
+
+  if (self == NULL) {
+    return NULL;
+  }
+
+  self->uri = "none";
+  if (uri != NULL) {
+    self->uri = uri;
+  }
+
+  self->samplerate = Py_aubio_default_samplerate;
+  if (samplerate > 0) {
+    self->samplerate = samplerate;
+  //} else if (samplerate < 0) {
+  //  PyErr_SetString (PyExc_ValueError,
+  //      "can not use negative value for samplerate");
+  //  return NULL;
+  }
+
+  self->hop_size = Py_default_vector_length / 2;
+  if (hop_size > 0) {
+    self->hop_size = hop_size;
+  //} else if (hop_size < 0) {
+  //  PyErr_SetString (PyExc_ValueError,
+  //      "can not use negative value for hop_size");
+  //  return NULL;
+  }
+
+  return (PyObject *) self;
+}
+
+static int
+Py_source_init (Py_source * self, PyObject * args, PyObject * kwds)
+{
+  self->o = new_aubio_source ( self->uri, self->samplerate, self->hop_size );
+  if (self->o == NULL) {
+    PyErr_SetString (PyExc_StandardError, "error creating object");
+    return -1;
+  }
+  self->samplerate = aubio_source_get_samplerate ( self->o );
+
+  return 0;
+}
+
+AUBIO_DEL(source)
+
+/* function Py_source_do */
+static PyObject * 
+Py_source_do(Py_source * self, PyObject * args)
+{
+
+
+  /* output vectors prototypes */
+  fvec_t* read_to;
+  uint_t read;
+
+
+
+
+
+  
+  /* creating output read_to as a new_fvec of length self->hop_size */
+  read_to = new_fvec (self->hop_size);
+  read = 0;
+
+
+  /* compute _do function */
+  aubio_source_do (self->o, read_to, &read);
+
+  PyObject *outputs = PyList_New(0);
+  PyList_Append( outputs, (PyObject *)PyAubio_CFvecToArray (read_to));
+  //del_fvec (read_to);
+  PyList_Append( outputs, (PyObject *)PyInt_FromLong (read));
+  return outputs;
+}
+
+AUBIO_MEMBERS_START(source)
+  {"uri", T_STRING, offsetof (Py_source, uri), READONLY, ""},
+  {"samplerate", T_INT, offsetof (Py_source, samplerate), READONLY, ""},
+  {"hop_size", T_INT, offsetof (Py_source, hop_size), READONLY, ""},
+AUBIO_MEMBERS_STOP(source)
+
+
+static PyObject *
+Pyaubio_source_get_samplerate (Py_source *self, PyObject *unused)
+{
+  uint_t tmp = aubio_source_get_samplerate (self->o);
+  return (PyObject *)PyInt_FromLong (tmp);
+}
+
+static PyObject *
+Pyaubio_source_get_channels (Py_source *self, PyObject *unused)
+{
+  uint_t tmp = aubio_source_get_channels (self->o);
+  return (PyObject *)PyInt_FromLong (tmp);
+}
+
+static PyMethodDef Py_source_methods[] = {
+  {"get_samplerate", (PyCFunction) Pyaubio_source_get_samplerate,
+    METH_NOARGS, ""},
+  {"get_channels", (PyCFunction) Pyaubio_source_get_channels,
+    METH_NOARGS, ""},
+  {NULL} /* sentinel */
+};
+
+AUBIO_TYPEOBJECT(source, "aubio.source")
Index: python/lib/generator.py
===================================================================
--- python/lib/generator.py	(revision d7019c4b9e1f91be81d7fb740b5ba989a570e972)
+++ python/lib/generator.py	(revision d27634db13fcc48b84ec2dd08018af7c105e9cba)
@@ -57,4 +57,5 @@
       'sink_apple_audio',
       'sink_sndfile',
+      'source',
       'source_apple_audio',
       'source_sndfile',
Index: python/setup.py
===================================================================
--- python/setup.py	(revision d7019c4b9e1f91be81d7fb740b5ba989a570e972)
+++ python/setup.py	(revision d27634db13fcc48b84ec2dd08018af7c105e9cba)
@@ -54,4 +54,5 @@
     "ext/py-fft.c",
     "ext/py-phasevoc.c",
+    "ext/py-source.c",
     # generated files
     ] + generated_object_files,
