From: Paul Brossier Date: Sun, 18 Oct 2009 13:20:00 +0000 (+0200) Subject: python/aubio/aubioclass.py: update peakpicker usage X-Git-Tag: bzr2git~100 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9f07d52148a0c25c53eabc3521e29464013107b4;p=aubio.git python/aubio/aubioclass.py: update peakpicker usage --- diff --git a/python/aubio/aubioclass.py b/python/aubio/aubioclass.py index 530fa4b8..f9a1022b 100644 --- a/python/aubio/aubioclass.py +++ b/python/aubio/aubioclass.py @@ -79,9 +79,12 @@ class onsetdetection: class peakpick: """ class for aubio_peakpicker """ def __init__(self,threshold=0.1): - self.pp = new_aubio_peakpicker(threshold) + self.pp = new_aubio_peakpicker(1) + self.out = new_fvec(1, 1) + aubio_peakpicker_set_threshold (self.pp, threshold) def do(self,fv): - return aubio_peakpicker_do(self.pp, fv()) + aubio_peakpicker_do(self.pp, fv(), self.out) + return fvec_read_sample(self.out, 0, 0) def getval(self): return aubio_peakpicker_get_adaptive_threshold(self.pp) def __del__(self):