History

python/aubio/aubioclass.py: update peakpicker usage

Paul Brossier committed 17 years ago

Commit 9f07d521 parent 247ce7d1 file · +5 −2Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/aubio/aubioclass.py+5−2
@@ -79,9 +79,12 @@ class onsetdetection: · 78 unmodified lines
79class peakpick:79class peakpick:
80 """ class for aubio_peakpicker """80 """ class for aubio_peakpicker """
81 def __init__(self,threshold=0.1):81 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)
83 def do(self,fv):85 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)
85 def getval(self):88 def getval(self):
86 return aubio_peakpicker_get_adaptive_threshold(self.pp)89 return aubio_peakpicker_get_adaptive_threshold(self.pp)
87 def __del__(self):90 def __del__(self):

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t