aubioclass: yinthres support
authorPaul Brossier <piem@altern.org>
Thu, 16 Mar 2006 15:57:24 +0000 (15:57 +0000)
committerPaul Brossier <piem@altern.org>
Thu, 16 Mar 2006 15:57:24 +0000 (15:57 +0000)
aubioclass: yinthres support

python/aubio/aubioclass.py

index 20c161c0646fd1ee83905db441f6622765c694dc..6ce3b65b0b09775317a852567704620c0d7b5962 100644 (file)
@@ -124,9 +124,10 @@ class onsetpick:
 
 class pitchdetection:
     def __init__(self,mode=aubio_pitch_mcomb,bufsize=2048,hopsize=1024,
-        channels=1,samplerate=44100.,omode=aubio_pitchm_freq):
+        channels=1,samplerate=44100.,omode=aubio_pitchm_freq,yinthresh=0.1):
         self.pitchp = new_aubio_pitchdetection(bufsize,hopsize,channels,
                 samplerate,mode,omode)
+       aubio_pitchdetection_set_yinthresh(self.pitchp,yinthresh)
         #self.filt     = filter(srate,"adsgn")
     def __del__(self):
         del_aubio_pitchdetection(self.pitchp)