Index: src/onset/onset.c
===================================================================
--- src/onset/onset.c	(revision 66fb3eac1f2656782d007d587b28cb62e93566b5)
+++ src/onset/onset.c	(revision 0b9a02a653bc4e9d33b82eb5369ce6a94a637eed)
@@ -48,15 +48,9 @@
   smpl_t isonset = 0;
   smpl_t wasonset = 0;
-  uint_t i;
   aubio_pvoc_do (o->pv,input, o->fftgrain);
   aubio_specdesc_do (o->od,o->fftgrain, o->of);
-  /*if (usedoubled) {
-    aubio_specdesc_do (o2,fftgrain, onset2);
-    onset->data[0][0] *= onset2->data[0][0];
-  }*/
   aubio_peakpicker_do(o->pp, o->of, onset);
-  for (i = 0; i < input->channels; i++) {
-  isonset = onset->data[i][0];
-  wasonset = o->wasonset->data[i][0];
+  isonset = onset->data[0];
+  wasonset = o->wasonset->data[0];
   if (isonset > 0.) {
     if (aubio_silence_detection(input, o->silence)==1) {
@@ -74,7 +68,6 @@
     wasonset++;
   }
-  o->wasonset->data[i][0] = wasonset;
-  onset->data[i][0] = isonset;
-  }
+  o->wasonset->data[0] = wasonset;
+  onset->data[0] = isonset;
   return;
 }
@@ -98,5 +91,5 @@
 /* Allocate memory for an onset detection */
 aubio_onset_t * new_aubio_onset (char_t * onset_mode, 
-    uint_t buf_size, uint_t hop_size, uint_t channels, uint_t samplerate)
+    uint_t buf_size, uint_t hop_size, uint_t samplerate)
 {
   aubio_onset_t * o = AUBIO_NEW(aubio_onset_t);
@@ -105,16 +98,16 @@
   o->minioi    = 4;
   o->silence   = -70;
-  o->wasonset  = new_fvec(1, channels);
+  o->wasonset  = new_fvec(1);
   o->samplerate = samplerate;
   o->hop_size = hop_size;
-  o->pv = new_aubio_pvoc(buf_size, hop_size, channels);
-  o->pp = new_aubio_peakpicker(channels);
+  o->pv = new_aubio_pvoc(buf_size, hop_size);
+  o->pp = new_aubio_peakpicker();
   aubio_peakpicker_set_threshold (o->pp, o->threshold);
-  o->od = new_aubio_specdesc(onset_mode,buf_size,channels);
-  o->fftgrain = new_cvec(buf_size,channels);
-  o->of = new_fvec(1, channels);
+  o->od = new_aubio_specdesc(onset_mode,buf_size);
+  o->fftgrain = new_cvec(buf_size);
+  o->of = new_fvec(1);
   /*if (usedoubled)    {
-    o2 = new_aubio_specdesc(onset_type2,buffer_size,channels);
-    onset2 = new_fvec(1 , channels);
+    o2 = new_aubio_specdesc(onset_type2,buffer_size);
+    onset2 = new_fvec(1);
   }*/
   return o;
Index: src/onset/onset.h
===================================================================
--- src/onset/onset.h	(revision 66fb3eac1f2656782d007d587b28cb62e93566b5)
+++ src/onset/onset.h	(revision 0b9a02a653bc4e9d33b82eb5369ce6a94a637eed)
@@ -50,10 +50,9 @@
   \param buf_size buffer size for phase vocoder
   \param hop_size hop size for phase vocoder
-  \param channels number of channels 
   \param samplerate sampling rate of the input signal 
 
 */
 aubio_onset_t * new_aubio_onset (char_t * method, 
-    uint_t buf_size, uint_t hop_size, uint_t channels, uint_t samplerate);
+    uint_t buf_size, uint_t hop_size, uint_t samplerate);
 
 /** execute onset detection
Index: src/onset/peakpicker.c
===================================================================
--- src/onset/peakpicker.c	(revision 66fb3eac1f2656782d007d587b28cb62e93566b5)
+++ src/onset/peakpicker.c	(revision 0b9a02a653bc4e9d33b82eb5369ce6a94a637eed)
@@ -28,5 +28,5 @@
 
 /** function pointer to thresholding function */
-typedef smpl_t (*aubio_thresholdfn_t)(fvec_t *input, uint_t channel);
+typedef smpl_t (*aubio_thresholdfn_t)(fvec_t *input);
 /** function pointer to peak-picking function */
 typedef uint_t (*aubio_pickerfn_t)(fvec_t *input, uint_t pos);
@@ -69,7 +69,4 @@
   fvec_t *scratch;
 
-  /** number of channels to analyse */
-  uint_t channels;
-
         /** \bug should be used to calculate filter coefficients */
   /* cutoff: low-pass filter cutoff [0.34, 1] */
@@ -97,16 +94,14 @@
   smpl_t mean = 0., median = 0.;
   uint_t length = p->win_post + p->win_pre + 1;
-  uint_t i, j = 0;
-
-  for (i = 0; i < p->channels; i++) {
-    /* store onset in onset_keep */
-    /* shift all elements but last, then write last */
-    for (j = 0; j < length - 1; j++) {
-      onset_keep->data[i][j] = onset_keep->data[i][j + 1];
-      onset_proc->data[i][j] = onset_keep->data[i][j];
-    }
-    onset_keep->data[i][length - 1] = onset->data[i][0];
-    onset_proc->data[i][length - 1] = onset->data[i][0];
+  uint_t j = 0;
+
+  /* store onset in onset_keep */
+  /* shift all elements but last, then write last */
+  for (j = 0; j < length - 1; j++) {
+    onset_keep->data[j] = onset_keep->data[j + 1];
+    onset_proc->data[j] = onset_keep->data[j];
   }
+  onset_keep->data[length - 1] = onset->data[0];
+  onset_proc->data[length - 1] = onset->data[0];
 
   /* filter onset_proc */
@@ -114,23 +109,21 @@
   aubio_filter_do_filtfilt (p->biquad, onset_proc, scratch);
 
-  for (i = 0; i < p->channels; i++) {
-    /* calculate mean and median for onset_proc */
-    mean = fvec_mean_channel (onset_proc, i);
-    /* copy to scratch */
-    for (j = 0; j < length; j++)
-      scratch->data[i][j] = onset_proc->data[i][j];
-    median = p->thresholdfn (scratch, i);
-
-    /* shift peek array */
-    for (j = 0; j < 3 - 1; j++)
-      onset_peek->data[i][j] = onset_peek->data[i][j + 1];
-    /* calculate new tresholded value */
-    thresholded->data[i][0] =
-        onset_proc->data[i][p->win_post] - median - mean * p->threshold;
-    onset_peek->data[i][2] = thresholded->data[i][0];
-    out->data[i][0] = (p->pickerfn) (onset_peek, 1);
-    if (out->data[i][0]) {
-      out->data[i][0] = fvec_quadint (onset_peek, 1, i);
-    }
+  /* calculate mean and median for onset_proc */
+  mean = fvec_mean (onset_proc);
+  /* copy to scratch */
+  for (j = 0; j < length; j++)
+    scratch->data[j] = onset_proc->data[j];
+  median = p->thresholdfn (scratch);
+
+  /* shift peek array */
+  for (j = 0; j < 3 - 1; j++)
+    onset_peek->data[j] = onset_peek->data[j + 1];
+  /* calculate new tresholded value */
+  thresholded->data[0] =
+      onset_proc->data[p->win_post] - median - mean * p->threshold;
+  onset_peek->data[2] = thresholded->data[0];
+  out->data[0] = (p->pickerfn) (onset_peek, 1);
+  if (out->data[0]) {
+    out->data[0] = fvec_quadint (onset_peek, 1);
   }
 }
@@ -173,5 +166,5 @@
 
 aubio_peakpicker_t *
-new_aubio_peakpicker (uint_t channels)
+new_aubio_peakpicker ()
 {
   aubio_peakpicker_t *t = AUBIO_NEW (aubio_peakpicker_t);
@@ -179,15 +172,13 @@
   t->win_post = 5;
   t->win_pre = 1;
-  //channels = 1;
-  t->channels = channels;
-
-  t->thresholdfn = (aubio_thresholdfn_t) (fvec_median_channel); /* (fvec_mean); */
+
+  t->thresholdfn = (aubio_thresholdfn_t) (fvec_median); /* (fvec_mean); */
   t->pickerfn = (aubio_pickerfn_t) (fvec_peakpick);
 
-  t->scratch = new_fvec (t->win_post + t->win_pre + 1, channels);
-  t->onset_keep = new_fvec (t->win_post + t->win_pre + 1, channels);
-  t->onset_proc = new_fvec (t->win_post + t->win_pre + 1, channels);
-  t->onset_peek = new_fvec (3, channels);
-  t->thresholded = new_fvec (1, channels);
+  t->scratch = new_fvec (t->win_post + t->win_pre + 1);
+  t->onset_keep = new_fvec (t->win_post + t->win_pre + 1);
+  t->onset_proc = new_fvec (t->win_post + t->win_pre + 1);
+  t->onset_peek = new_fvec (3);
+  t->thresholded = new_fvec (1);
 
   /* cutoff: low-pass filter with cutoff reduced frequency at 0.34
@@ -195,5 +186,5 @@
    */
   t->biquad = new_aubio_filter_biquad (0.15998789, 0.31997577, 0.15998789,
-      -0.59488894, 0.23484048, channels);
+      -0.59488894, 0.23484048);
 
   return t;
Index: src/onset/peakpicker.h
===================================================================
--- src/onset/peakpicker.h	(revision 66fb3eac1f2656782d007d587b28cb62e93566b5)
+++ src/onset/peakpicker.h	(revision 0b9a02a653bc4e9d33b82eb5369ce6a94a637eed)
@@ -36,5 +36,5 @@
 
 /** peak-picker creation function */
-aubio_peakpicker_t * new_aubio_peakpicker(uint_t channels);
+aubio_peakpicker_t * new_aubio_peakpicker();
 /** real time peak picking function */
 void aubio_peakpicker_do(aubio_peakpicker_t * p, fvec_t * in, fvec_t * out);
