shithub: aubio

Download patch

ref: cadf07b1bc992f39f64664655cec7e71defa2295
parent: 80149a1ca3779ce4177cbb449139062cdd2b0c46
author: Paul Brossier <piem@altern.org>
date: Fri May 5 04:16:40 EDT 2006

update indentation
update indentation


--- a/python/aubio/aubioclass.py
+++ b/python/aubio/aubioclass.py
@@ -101,7 +101,7 @@
         self.mode     = mode
         self.pp       = peakpick(float(threshold))
         self.derivate = derivate
-	self.dcthreshold = dcthreshold 
+        self.dcthreshold = dcthreshold 
         self.oldval   = 0.
 
     def do(self,myvec): 
@@ -108,18 +108,18 @@
         self.pv.do(myvec,self.myfft)
         self.myod.do(self.myfft,self.myonset)
         if self.mode == 'dual':
-                self.myod2.do(self.myfft,self.myonset2)
-                self.myonset.set(self.myonset.get(0,0)*self.myonset2.get(0,0),0,0)
+           self.myod2.do(self.myfft,self.myonset2)
+           self.myonset.set(self.myonset.get(0,0)*self.myonset2.get(0,0),0,0)
         if self.derivate:
-                val         = self.myonset.get(0,0)
-                dval        = val - self.oldval
-                self.oldval = val
-                if dval > 0: self.myonset.set(dval,0,0)
-                else:  self.myonset.set(0.,0,0)
-	if self.dcthreshold:
-                dval        = self.myonset.get(0,0) - self.dcthreshold
-                if dval > 0: self.myonset.set(dval,0,0)
-                else:  self.myonset.set(0.,0,0)
+           val         = self.myonset.get(0,0)
+           dval        = val - self.oldval
+           self.oldval = val
+           if dval > 0: self.myonset.set(dval,0,0)
+           else:  self.myonset.set(0.,0,0)
+        if self.dcthreshold:
+           dval        = self.myonset.get(0,0) - self.dcthreshold
+           if dval > 0: self.myonset.set(dval,0,0)
+           else:  self.myonset.set(0.,0,0)
         return self.pp.do(self.myonset),self.myonset.get(0,0)
 
 class pitchdetection: