Changeset 9f07d52


Ignore:
Timestamp:
Oct 18, 2009, 3:20:00 PM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
ca1abdd
Parents:
247ce7d
Message:

python/aubio/aubioclass.py: update peakpicker usage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubio/aubioclass.py

    r247ce7d r9f07d52  
    8080    """ class for aubio_peakpicker """
    8181    def __init__(self,threshold=0.1):
    82         self.pp = new_aubio_peakpicker(threshold)
     82        self.pp = new_aubio_peakpicker(1)
     83        self.out = new_fvec(1, 1)
     84        aubio_peakpicker_set_threshold (self.pp, threshold)
    8385    def do(self,fv):
    84         return aubio_peakpicker_do(self.pp, fv())
     86        aubio_peakpicker_do(self.pp, fv(), self.out)
     87        return fvec_read_sample(self.out, 0, 0)
    8588    def getval(self):
    8689        return aubio_peakpicker_get_adaptive_threshold(self.pp)
Note: See TracChangeset for help on using the changeset viewer.