Changeset ca1abdd for python/aubio
- Timestamp:
- Oct 19, 2009, 10:51:59 AM (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:
- b14107f
- Parents:
- 9f07d52
- Location:
- python/aubio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubio/aubioclass.py
r9f07d52 rca1abdd 127 127 return isonset, dval 128 128 129 class pitch detection:129 class pitch: 130 130 def __init__(self,mode="mcomb",bufsize=2048,hopsize=1024, 131 131 channels=1,samplerate=44100.,omode="freq",tolerance=0.1): 132 self.pitchp = new_aubio_pitch detection(mode,bufsize,hopsize,channels,132 self.pitchp = new_aubio_pitch(mode,bufsize,hopsize,channels, 133 133 samplerate) 134 134 self.mypitch = fvec(1, channels) 135 aubio_pitch detection_set_unit(self.pitchp,omode)136 aubio_pitch detection_set_tolerance(self.pitchp,tolerance)135 aubio_pitch_set_unit(self.pitchp,omode) 136 aubio_pitch_set_tolerance(self.pitchp,tolerance) 137 137 #self.filt = filter(srate,"adsgn") 138 138 def __del__(self): 139 del_aubio_pitch detection(self.pitchp)139 del_aubio_pitch(self.pitchp) 140 140 def __call__(self,myvec): 141 aubio_pitch detection_do(self.pitchp,myvec(), self.mypitch())141 aubio_pitch_do(self.pitchp,myvec(), self.mypitch()) 142 142 return self.mypitch.get(0,0) 143 143 -
python/aubio/task/notes.py
r9f07d52 rca1abdd 14 14 dcthreshold=self.params.dcthreshold, 15 15 derivate=self.params.derivate) 16 self.pitchdet = pitch detection(mode=self.params.pitchmode,16 self.pitchdet = pitch(mode=self.params.pitchmode, 17 17 bufsize=self.params.pbufsize, 18 18 hopsize=self.params.phopsize, -
python/aubio/task/pitch.py
r9f07d52 rca1abdd 13 13 else: 14 14 tolerance = 0. 15 self.pitchdet = pitch detection(mode=self.params.pitchmode,15 self.pitchdet = pitch(mode=self.params.pitchmode, 16 16 bufsize=self.params.bufsize, 17 17 hopsize=self.params.hopsize,
Note: See TracChangeset
for help on using the changeset viewer.