- Timestamp:
- May 5, 2006, 10:16:40 AM (19 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:
- da6d9af
- Parents:
- 80149a1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubio/aubioclass.py
r80149a1 rcadf07b 102 102 self.pp = peakpick(float(threshold)) 103 103 self.derivate = derivate 104 104 self.dcthreshold = dcthreshold 105 105 self.oldval = 0. 106 106 … … 109 109 self.myod.do(self.myfft,self.myonset) 110 110 if self.mode == 'dual': 111 112 111 self.myod2.do(self.myfft,self.myonset2) 112 self.myonset.set(self.myonset.get(0,0)*self.myonset2.get(0,0),0,0) 113 113 if self.derivate: 114 115 116 117 118 119 120 121 122 114 val = self.myonset.get(0,0) 115 dval = val - self.oldval 116 self.oldval = val 117 if dval > 0: self.myonset.set(dval,0,0) 118 else: self.myonset.set(0.,0,0) 119 if self.dcthreshold: 120 dval = self.myonset.get(0,0) - self.dcthreshold 121 if dval > 0: self.myonset.set(dval,0,0) 122 else: self.myonset.set(0.,0,0) 123 123 return self.pp.do(self.myonset),self.myonset.get(0,0) 124 124
Note: See TracChangeset
for help on using the changeset viewer.