Changeset 3027c6e for python/aubio/aubioclass.py
- Timestamp:
- Oct 8, 2009, 8:59:23 PM (15 years ago)
- 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:
- 8802f92
- Parents:
- 61316a6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubio/aubioclass.py
r61316a6 r3027c6e 126 126 class pitchdetection: 127 127 def __init__(self,mode=aubio_pitch_mcomb,bufsize=2048,hopsize=1024, 128 channels=1,samplerate=44100.,omode=aubio_pitchm_freq, yinthresh=0.1):128 channels=1,samplerate=44100.,omode=aubio_pitchm_freq,tolerance=0.1): 129 129 self.pitchp = new_aubio_pitchdetection(bufsize,hopsize,channels, 130 130 samplerate,mode,omode) 131 aubio_pitchdetection_set_yinthresh(self.pitchp,yinthresh) 131 self.mypitch = fvec(1, channels) 132 aubio_pitchdetection_set_tolerance(self.pitchp,tolerance) 132 133 #self.filt = filter(srate,"adsgn") 133 134 def __del__(self): 134 135 del_aubio_pitchdetection(self.pitchp) 135 136 def __call__(self,myvec): 136 #self.filt(myvec)137 return aubio_pitchdetection_do(self.pitchp,myvec())137 aubio_pitchdetection_do(self.pitchp,myvec(), self.mypitch()) 138 return self.mypitch.get(0,0) 138 139 139 140 class filter:
Note: See TracChangeset
for help on using the changeset viewer.