| @@ -126,19 +126,19 @@ class onsetpick: · 125 unmodified lines |
| 126 | 126 | if dval < self.dcthreshold: isonset = 0 |
| 127 | 127 | return isonset, dval |
| 128 | 128 | |
| 129 | | −class pitchdetection: |
| 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_pitchdetection(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_pitchdetection_set_unit(self.pitchp,omode) |
| 136 | | − aubio_pitchdetection_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_pitchdetection(self.pitchp) |
| 139 | + del_aubio_pitch(self.pitchp) |
| 140 | 140 | def __call__(self,myvec): |
| 141 | | − aubio_pitchdetection_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 | |
| 144 | 144 | class filter: |