Index: interfaces/python/py-cvec.c
===================================================================
--- interfaces/python/py-cvec.c	(revision 75be65117e99a6e09663b0db6e6ab55c5f86732c)
+++ interfaces/python/py-cvec.c	(revision 7a7b00f3a3d6681b34287a8e94d5314cd6ae2c0e)
@@ -4,11 +4,10 @@
 
 class cvec():
-    def __init__(self, length = 1024, channels = 1):
+    def __init__(self, length = 1024):
         self.length = length 
-        self.channels = channels 
-        self.norm = array(length, channels)
-        self.phas = array(length, channels)
+        self.norm = array(length)
+        self.phas = array(length)
+
 */
-
 
 static char Py_cvec_doc[] = "cvec object";
@@ -17,10 +16,10 @@
 Py_cvec_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
 {
-  int length= 0, channels = 0;
+  int length= 0;
   Py_cvec *self;
-  static char *kwlist[] = { "length", "channels", NULL };
-
-  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|II", kwlist,
-          &length, &channels)) {
+  static char *kwlist[] = { "length", NULL };
+
+  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|I", kwlist,
+          &length)) {
     return NULL;
   }
@@ -30,5 +29,4 @@
 
   self->length = Py_default_vector_length / 2 + 1;
-  self->channels = Py_default_vector_channels;
 
   if (self == NULL) {
@@ -44,12 +42,4 @@
   }
 
-  if (channels > 0) {
-    self->channels = channels;
-  } else if (channels < 0) {
-    PyErr_SetString (PyExc_ValueError,
-        "can not use negative number of channels");
-    return NULL;
-  }
-
   return (PyObject *) self;
 }
@@ -58,5 +48,5 @@
 Py_cvec_init (Py_cvec * self, PyObject * args, PyObject * kwds)
 {
-  self->o = new_cvec ((self->length - 1) * 2, self->channels);
+  self->o = new_cvec ((self->length - 1) * 2);
   if (self->o == NULL) {
     return -1;
@@ -80,14 +70,14 @@
   PyObject *result = NULL;
 
-  format = PyString_FromString ("aubio cvec of %d elements with %d channels");
+  format = PyString_FromString ("aubio cvec of %d elements");
   if (format == NULL) {
     goto fail;
   }
 
-  args = Py_BuildValue ("II", self->length, self->channels);
+  args = Py_BuildValue ("I", self->length);
   if (args == NULL) {
     goto fail;
   }
-  //cvec_print ( self->o );
+  cvec_print ( self->o );
 
   result = PyString_Format (format, args);
@@ -104,5 +94,8 @@
   PyObject *array;
   Py_cvec *vec;
-  uint_t i;
+  if (input == NULL) {
+    PyErr_SetString (PyExc_ValueError, "input array is not a python object");
+    goto fail;
+  }
   // parsing input object into a Py_cvec
   if (PyObject_TypeCheck (input, &Py_cvecType)) {
@@ -115,4 +108,114 @@
       PyErr_SetString (PyExc_ValueError, "input array is a scalar");
       goto fail;
+    } else if (PyArray_NDIM (input) > 1) {
+      PyErr_SetString (PyExc_ValueError,
+          "input array has more than one dimensions");
+      goto fail;
+    }
+
+    if (!PyArray_ISFLOAT (input)) {
+      PyErr_SetString (PyExc_ValueError, "input array should be float");
+      goto fail;
+    } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
+      PyErr_SetString (PyExc_ValueError, "input array should be float32");
+      goto fail;
+    } else {
+      // input data type is float32, nothing else to do
+      array = input;
+    }
+
+    // create a new cvec object
+    vec = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType); 
+    if (PyArray_NDIM (array) != 2) {
+      PyErr_SetString (PyExc_ValueError,
+          "input array should be have exactly two rows for norm and phas");
+      goto fail;
+    } else {
+      vec->length = PyArray_SIZE (array);
+    }
+
+    // no need to really allocate cvec, just its struct member 
+    // vec->o = new_cvec (vec->length);
+    vec->o = (cvec_t *)malloc(sizeof(cvec_t));
+    vec->o->length = vec->length;
+    // have norm and phas point to array rows 
+    vec->o->norm = (smpl_t *) PyArray_GETPTR1 (array, 0);
+    vec->o->phas = (smpl_t *) PyArray_GETPTR1 (array, 1);
+
+  } else {
+    PyErr_SetString (PyExc_ValueError, "can only accept array or cvec as input");
+    return NULL;
+  }
+
+  return vec;
+
+fail:
+  return NULL;
+}
+
+PyObject *
+PyAubio_CvecToArray (Py_cvec * self)
+{
+  PyObject *array = NULL;
+  npy_intp dims[] = { self->o->length, 1 };
+  PyObject *concat = PyList_New (0), *tmp = NULL;
+  tmp = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->norm);
+  PyList_Append (concat, tmp);
+  Py_DECREF (tmp);
+  tmp = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->phas);
+  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)
+{
+  npy_intp dims[] = { self->o->length, 1 };
+  return PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->norm);
+}
+
+
+PyObject *
+PyAubio_CvecPhasToArray (Py_cvec * self)
+{
+  npy_intp dims[] = { self->o->length, 1 };
+  return PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->phas);
+}
+
+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 * vec, PyObject *input, void * closure)
+{
+  PyObject * array;
+  if (input == NULL) {
+    PyErr_SetString (PyExc_ValueError, "input array is not a python object");
+    goto fail;
+  }
+  if (PyArray_Check(input)) {
+
+    // we got an array, convert it to a cvec.norm 
+    if (PyArray_NDIM (input) == 0) {
+      PyErr_SetString (PyExc_ValueError, "input array is a scalar");
+      goto fail;
     } else if (PyArray_NDIM (input) > 2) {
       PyErr_SetString (PyExc_ValueError,
@@ -124,169 +227,17 @@
       PyErr_SetString (PyExc_ValueError, "input array should be float");
       goto fail;
-#if AUBIO_DO_CASTING
-    } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
-      // input data type is not float32, casting 
-      array = PyArray_Cast ( (PyArrayObject*) input, AUBIO_NPY_SMPL);
-      if (array == NULL) {
-        PyErr_SetString (PyExc_IndexError, "failed converting to NPY_FLOAT");
-        goto fail;
-      }
-#else
     } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
       PyErr_SetString (PyExc_ValueError, "input array should be float32");
       goto fail;
-#endif
+    }
+    array = input;
+
+    // check input array dimensions
+    if (PyArray_NDIM (array) != 1) {
+      PyErr_Format (PyExc_ValueError,
+          "input array has %d dimensions, not 1",
+          PyArray_NDIM (array));
+      goto fail;
     } else {
-      // input data type is float32, nothing else to do
-      array = input;
-    }
-
-    // create a new cvec object
-    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) / 2;
-      vec->length = PyArray_DIM (array, 1);
-    }
-
-    // no need to really allocate cvec, just its struct member 
-    // vec->o = new_cvec (vec->length, vec->channels);
-    vec->o = (cvec_t *)malloc(sizeof(cvec_t));
-    vec->o->length = vec->length; vec->o->channels = vec->channels;
-    vec->o->norm = (smpl_t**)malloc(vec->o->channels * sizeof(smpl_t*));
-    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+=2) {
-      vec->o->norm[i] = (smpl_t *) PyArray_GETPTR1 (array, i);
-      vec->o->phas[i] = (smpl_t *) PyArray_GETPTR1 (array, i+1);
-    }
-
-  } else {
-    PyErr_SetString (PyExc_ValueError, "can only accept array or cvec as input");
-    return NULL;
-  }
-
-  return vec;
-
-fail:
-  return NULL;
-}
-
-PyObject *
-PyAubio_CvecToArray (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);
-    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_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 * vec, PyObject *input, void * closure)
-{
-  uint_t i;
-  PyObject * array;
-  if (input == NULL) {
-    PyErr_SetString (PyExc_ValueError, "input array is not a python object");
-    goto fail;
-  }
-  if (PyArray_Check(input)) {
-
-    // we got an array, convert it to a cvec.norm 
-    if (PyArray_NDIM (input) == 0) {
-      PyErr_SetString (PyExc_ValueError, "input array is a scalar");
-      goto fail;
-    } else if (PyArray_NDIM (input) > 2) {
-      PyErr_SetString (PyExc_ValueError,
-          "input array has more than two dimensions");
-      goto fail;
-    }
-
-    if (!PyArray_ISFLOAT (input)) {
-      PyErr_SetString (PyExc_ValueError, "input array should be float");
-      goto fail;
-    } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
-      PyErr_SetString (PyExc_ValueError, "input array should be float32");
-      goto fail;
-    }
-    array = input;
-
-    // check input array dimensions
-    if (PyArray_NDIM (array) == 1) {
-      if (vec->channels != 1) {
-          PyErr_SetString (PyExc_ValueError,
-                  "input array should have more than one channel");
-          goto fail;
-      }
       if (vec->o->length != PyArray_SIZE (array)) {
           PyErr_Format (PyExc_ValueError,
@@ -295,22 +246,7 @@
           goto fail;
       }
-    } else {
-      if (vec->channels != PyArray_DIM (array, 0)) {
-          PyErr_Format (PyExc_ValueError,
-                  "input array has %d channels, but vector has %d channels",
-                  PyArray_DIM (array, 0), vec->channels);
-          goto fail;
-      }
-      if (vec->o->length != PyArray_DIM (array, 1)) {
-          PyErr_Format (PyExc_ValueError,
-                  "input array has length %d, but vector has length %d",
-                  PyArray_DIM (array, 1), vec->o->length);
-          goto fail;
-      }
-    }
-
-    for (i = 0; i < vec->channels; i++) {
-      vec->o->norm[i] = (smpl_t *) PyArray_GETPTR1 (array, i);
-    }
+    }
+
+    vec->o->norm = (smpl_t *) PyArray_GETPTR1 (array, 0);
 
   } else {
@@ -329,5 +265,4 @@
 Py_cvec_set_phas (Py_cvec * vec, PyObject *input, void * closure)
 {
-  uint_t i;
   PyObject * array;
   if (input == NULL) {
@@ -357,10 +292,10 @@
 
     // check input array dimensions
-    if (PyArray_NDIM (array) == 1) {
-      if (vec->channels != 1) {
-          PyErr_SetString (PyExc_ValueError,
-                  "input array should have more than one channel");
-          goto fail;
-      }
+    if (PyArray_NDIM (array) != 1) {
+      PyErr_Format (PyExc_ValueError,
+          "input array has %d dimensions, not 1",
+          PyArray_NDIM (array));
+      goto fail;
+    } else {
       if (vec->o->length != PyArray_SIZE (array)) {
           PyErr_Format (PyExc_ValueError,
@@ -369,22 +304,7 @@
           goto fail;
       }
-    } else {
-      if (vec->channels != PyArray_DIM (array, 0)) {
-          PyErr_Format (PyExc_ValueError,
-                  "input array has %d channels, but vector has %d channels",
-                  PyArray_DIM (array, 0), vec->channels);
-          goto fail;
-      }
-      if (vec->o->length != PyArray_DIM (array, 1)) {
-          PyErr_Format (PyExc_ValueError,
-                  "input array has length %d, but vector has length %d",
-                  PyArray_DIM (array, 1), vec->o->length);
-          goto fail;
-      }
-    }
-
-    for (i = 0; i < vec->channels; i++) {
-      vec->o->phas[i] = (smpl_t *) PyArray_GETPTR1 (array, i);
-    }
+    }
+
+    vec->o->phas = (smpl_t *) PyArray_GETPTR1 (array, 0);
 
   } else {
@@ -398,60 +318,4 @@
 fail:
   return 1;
-}
-
-static Py_ssize_t
-Py_cvec_getchannels (Py_cvec * self)
-{
-  return self->channels;
-}
-
-static PyObject *
-Py_cvec_getitem (Py_cvec * self, Py_ssize_t index)
-{
-  PyObject *array;
-
-  if (index < 0 || index >= self->channels) {
-    PyErr_SetString (PyExc_IndexError, "no such channel");
-    return NULL;
-  }
-
-  npy_intp dims[] = { self->length, 1 };
-  array = PyArray_SimpleNewFromData (1, dims, NPY_FLOAT, self->o->norm[index]);
-  return array;
-}
-
-static int
-Py_cvec_setitem (Py_cvec * self, Py_ssize_t index, PyObject * o)
-{
-  PyObject *array;
-
-  if (index < 0 || index >= self->channels) {
-    PyErr_SetString (PyExc_IndexError, "no such channel");
-    return -1;
-  }
-
-  array = PyArray_FROM_OT (o, NPY_FLOAT);
-  if (array == NULL) {
-    PyErr_SetString (PyExc_ValueError, "should be an array of float");
-    goto fail;
-  }
-
-  if (PyArray_NDIM (array) != 1) {
-    PyErr_SetString (PyExc_ValueError, "should be a one-dimensional array");
-    goto fail;
-  }
-
-  if (PyArray_SIZE (array) != self->length) {
-    PyErr_SetString (PyExc_ValueError,
-        "should be an array of same length as target cvec");
-    goto fail;
-  }
-
-  self->o->norm[index] = (smpl_t *) PyArray_GETPTR1 (array, 0);
-
-  return 0;
-
-fail:
-  return -1;
 }
 
@@ -460,6 +324,4 @@
   {"length", T_INT, offsetof (Py_cvec, length), READONLY,
       "length attribute"},
-  {"channels", T_INT, offsetof (Py_cvec, channels), READONLY,
-      "channels attribute"},
   {NULL}                        /* Sentinel */
 };
@@ -480,18 +342,4 @@
   {NULL} /* sentinel */
 };
-
-static PySequenceMethods Py_cvec_tp_as_sequence = {
-  (lenfunc) Py_cvec_getchannels,        /* sq_length         */
-  0,                                    /* sq_concat         */
-  0,                                    /* sq_repeat         */
-  (ssizeargfunc) Py_cvec_getitem,       /* sq_item           */
-  0,                                    /* sq_slice          */
-  (ssizeobjargproc) Py_cvec_setitem,    /* sq_ass_item       */
-  0,                                    /* sq_ass_slice      */
-  0,                                    /* sq_contains       */
-  0,                                    /* sq_inplace_concat */
-  0,                                    /* sq_inplace_repeat */
-};
-
 
 PyTypeObject Py_cvecType = {
@@ -508,5 +356,5 @@
   (reprfunc) Py_cvec_repr,      /* tp_repr           */
   0,                            /* tp_as_number      */
-  &Py_cvec_tp_as_sequence,      /* tp_as_sequence    */
+  0, //&Py_cvec_tp_as_sequence,      /* tp_as_sequence    */
   0,                            /* tp_as_mapping     */
   0,                            /* tp_hash           */
Index: interfaces/python/py-fvec.c
===================================================================
--- interfaces/python/py-fvec.c	(revision 75be65117e99a6e09663b0db6e6ab55c5f86732c)
+++ interfaces/python/py-fvec.c	(revision 7a7b00f3a3d6681b34287a8e94d5314cd6ae2c0e)
@@ -4,8 +4,7 @@
 
 class fvec():
-    def __init__(self, length = 1024, channels = 1):
+    def __init__(self, length = 1024):
         self.length = length 
-        self.channels = channels 
-        self.data = array(length, channels)
+        self.data = array(length)
 
 */
@@ -16,18 +15,16 @@
 Py_fvec_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
 {
-  int length= 0, channels = 0;
+  int length= 0;
   Py_fvec *self;
-  static char *kwlist[] = { "length", "channels", NULL };
-
-  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|II", kwlist,
-          &length, &channels)) {
-    return NULL;
-  }
-
+  static char *kwlist[] = { "length", NULL };
+
+  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|I", kwlist,
+          &length)) {
+    return NULL;
+  }
 
   self = (Py_fvec *) type->tp_alloc (type, 0);
 
   self->length = Py_default_vector_length;
-  self->channels = Py_default_vector_channels;
 
   if (self == NULL) {
@@ -43,12 +40,4 @@
   }
 
-  if (channels > 0) {
-    self->channels = channels;
-  } else if (channels < 0) {
-    PyErr_SetString (PyExc_ValueError,
-        "can not use negative number of channels");
-    return NULL;
-  }
-
   return (PyObject *) self;
 }
@@ -57,5 +46,5 @@
 Py_fvec_init (Py_fvec * self, PyObject * args, PyObject * kwds)
 {
-  self->o = new_fvec (self->length, self->channels);
+  self->o = new_fvec (self->length);
   if (self->o == NULL) {
     return -1;
@@ -75,14 +64,15 @@
 Py_fvec_repr (Py_fvec * self, PyObject * unused)
 {
+#if 0
   PyObject *format = NULL;
   PyObject *args = NULL;
   PyObject *result = NULL;
 
-  format = PyString_FromString ("aubio fvec of %d elements with %d channels");
+  format = PyString_FromString ("aubio fvec of %d elements");
   if (format == NULL) {
     goto fail;
   }
 
-  args = Py_BuildValue ("II", self->length, self->channels);
+  args = Py_BuildValue ("I", self->length);
   if (args == NULL) {
     goto fail;
@@ -92,4 +82,25 @@
   result = PyString_Format (format, args);
 
+fail:
+  Py_XDECREF (format);
+  Py_XDECREF (args);
+
+  return result;
+#endif
+  PyObject *format = NULL;
+  PyObject *args = NULL;
+  PyObject *result = NULL;
+
+  format = PyString_FromString ("%s");
+  if (format == NULL) {
+    goto fail;
+  }
+
+  args = Py_BuildValue ("O", PyAubio_FvecToArray (self));
+  if (args == NULL) {
+    goto fail;
+  }
+
+  result = PyString_Format (format, args);
 fail:
   Py_XDECREF (format);
@@ -103,5 +114,4 @@
   PyObject *array;
   Py_fvec *vec;
-  uint_t i;
   if (input == NULL) {
     PyErr_SetString (PyExc_ValueError, "input array is not a python object");
@@ -118,7 +128,7 @@
       PyErr_SetString (PyExc_ValueError, "input array is a scalar");
       goto fail;
-    } else if (PyArray_NDIM (input) > 2) {
+    } else if (PyArray_NDIM (input) > 1) {
       PyErr_SetString (PyExc_ValueError,
-          "input array has more than two dimensions");
+          "input array has more than one dimensions");
       goto fail;
     }
@@ -127,17 +137,7 @@
       PyErr_SetString (PyExc_ValueError, "input array should be float");
       goto fail;
-#if AUBIO_DO_CASTING
-    } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
-      // input data type is not float32, casting 
-      array = PyArray_Cast ( (PyArrayObject*) input, AUBIO_NPY_SMPL);
-      if (array == NULL) {
-        PyErr_SetString (PyExc_IndexError, "failed converting to AUBIO_NPY_SMPL");
-        goto fail;
-      }
-#else
     } else if (PyArray_TYPE (input) != AUBIO_NPY_SMPL) {
       PyErr_SetString (PyExc_ValueError, "input array should be float32");
       goto fail;
-#endif
     } else {
       // input data type is float32, nothing else to do
@@ -147,24 +147,17 @@
     // create a new fvec object
     vec = (Py_fvec*) PyObject_New (Py_fvec, &Py_fvecType); 
-    if (PyArray_NDIM (array) == 1) {
-      vec->channels = 1;
-      vec->length = PyArray_SIZE (array);
-    } else {
-      vec->channels = PyArray_DIM (array, 0);
-      vec->length = PyArray_DIM (array, 1);
-    }
+    vec->length = PyArray_SIZE (array);
 
     // no need to really allocate fvec, just its struct member 
-    // vec->o = new_fvec (vec->length, vec->channels);
+    // vec->o = new_fvec (vec->length);
     vec->o = (fvec_t *)malloc(sizeof(fvec_t));
-    vec->o->length = vec->length; vec->o->channels = vec->channels;
-    vec->o->data = (smpl_t**)malloc(vec->o->channels * sizeof(smpl_t*));
-    // hat data[i] point to array line
-    for (i = 0; i < vec->channels; i++) {
-      vec->o->data[i] = (smpl_t *) PyArray_GETPTR1 (array, i);
-    }
-
+    vec->o->length = vec->length;
+    vec->o->data = (smpl_t *) PyArray_GETPTR1 (array, 0);
+
+  } else if (PyObject_TypeCheck (input, &PyList_Type)) {
+    PyErr_SetString (PyExc_ValueError, "does not convert from list yet");
+    return NULL;
   } else {
-    PyErr_SetString (PyExc_ValueError, "can only accept array or fvec as input");
+    PyErr_SetString (PyExc_ValueError, "can only accept vector or fvec as input");
     return NULL;
   }
@@ -179,16 +172,6 @@
 PyAubio_CFvecToArray (fvec_t * self)
 {
-  PyObject *array = NULL;
-  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, AUBIO_NPY_SMPL, self->data[i]);
-    PyList_Append (concat, tmp);
-    Py_DECREF (tmp);
-  }
-  array = PyArray_FromObject (concat, AUBIO_NPY_SMPL, 2, 2);
-  Py_DECREF (concat);
-  return array;
+  return  PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, self->data);
 }
 
@@ -197,26 +180,7 @@
 {
   PyObject *array = NULL;
-  if (self->channels == 1) {
-    npy_intp dims[] = { self->length, 1 };
-    array = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, self->o->data[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, AUBIO_NPY_SMPL, self->o->data[i]);
-      PyList_Append (concat, tmp);
-      Py_DECREF (tmp);
-    }
-    array = PyArray_FromObject (concat, AUBIO_NPY_SMPL, 2, 2);
-    Py_DECREF (concat);
-  }
+  npy_intp dims[] = { self->length, 1 };
+  array = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, self->o->data);
   return array;
-}
-
-static Py_ssize_t
-Py_fvec_getchannels (Py_fvec * self)
-{
-  return self->channels;
 }
 
@@ -224,14 +188,10 @@
 Py_fvec_getitem (Py_fvec * self, Py_ssize_t index)
 {
-  PyObject *array;
-
-  if (index < 0 || index >= self->channels) {
-    PyErr_SetString (PyExc_IndexError, "no such channel");
-    return NULL;
-  }
-
-  npy_intp dims[] = { self->length, 1 };
-  array = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, self->o->data[index]);
-  return array;
+  if (index < 0 || index >= self->length) {
+    PyErr_SetString (PyExc_IndexError, "no such element");
+    return NULL;
+  }
+
+  return PyFloat_FromDouble (self->o->data[index]);
 }
 
@@ -239,29 +199,16 @@
 Py_fvec_setitem (Py_fvec * self, Py_ssize_t index, PyObject * o)
 {
-  PyObject *array;
-
-  if (index < 0 || index >= self->channels) {
-    PyErr_SetString (PyExc_IndexError, "no such channel");
-    return -1;
-  }
-
-  array = PyArray_FROM_OT (o, AUBIO_NPY_SMPL);
-  if (array == NULL) {
-    PyErr_SetString (PyExc_ValueError, "should be an array of float");
-    goto fail;
-  }
-
-  if (PyArray_NDIM (array) != 1) {
-    PyErr_SetString (PyExc_ValueError, "should be a one-dimensional array");
-    goto fail;
-  }
-
-  if (PyArray_SIZE (array) != self->length) {
-    PyErr_SetString (PyExc_ValueError,
-        "should be an array of same length as target fvec");
-    goto fail;
-  }
-
-  self->o->data[index] = (smpl_t *) PyArray_GETPTR1 (array, 0);
+
+  if (index < 0 || index >= self->length) {
+    PyErr_SetString (PyExc_IndexError, "no such element");
+    goto fail;
+  }
+
+  if (PyFloat_Check (o)) {
+    PyErr_SetString (PyExc_ValueError, "should be a float");
+    goto fail;
+  }
+
+  self->o->data[index] = (smpl_t) PyFloat_AsDouble(o);
 
   return 0;
@@ -269,4 +216,10 @@
 fail:
   return -1;
+}
+
+int
+Py_fvec_get_length (Py_fvec * self)                                                                                                                                     
+{                                                                                                                                                                        
+  return self->length;                                                                                                                                                 
 }
 
@@ -275,6 +228,4 @@
   {"length", T_INT, offsetof (Py_fvec, length), READONLY,
       "length attribute"},
-  {"channels", T_INT, offsetof (Py_fvec, channels), READONLY,
-      "channels attribute"},
   {NULL}                        /* Sentinel */
 };
@@ -287,5 +238,5 @@
 
 static PySequenceMethods Py_fvec_tp_as_sequence = {
-  (lenfunc) Py_fvec_getchannels,        /* sq_length         */
+  (lenfunc) Py_fvec_get_length,        /* sq_length         */
   0,                                    /* sq_concat         */
   0,                                    /* sq_repeat         */
