correct default bufsize, fix function level import
authorPaul Brossier <piem@altern.org>
Wed, 14 Dec 2005 13:42:45 +0000 (13:42 +0000)
committerPaul Brossier <piem@altern.org>
Wed, 14 Dec 2005 13:42:45 +0000 (13:42 +0000)
correct default bufsize, fix function level import

python/aubio/onsetcompare.py
python/aubiocut

index 0eb664325ef516b7d30bf02105b7ff0f30f00680..0e98c9a19f9340605c20dce47bf7dd460f60efb8 100644 (file)
@@ -72,17 +72,17 @@ def onset_diffs(ltru, lexp, eps):
     return l 
 
 def notes_roc (la, lb, eps):
-    from numarray import *
+    from numarray import transpose, add, resize 
     """ creates a matrix of size len(la)*len(lb) then look for hit and miss
     in it within eps tolerance windows """
     gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0
     m = len(la)
     n = len(lb)
-    x =           resize(la[:,0],(n,m))
-    y = transpose(resize(lb[:,0],(m,n)))
+    x =           resize(la[:][0],(n,m))
+    y = transpose(resize(lb[:][0],(m,n)))
     teps =  (abs(x-y) <= eps[0]) 
-    x =           resize(la[:,1],(n,m))
-    y = transpose(resize(lb[:,1],(m,n)))
+    x =           resize(la[:][1],(n,m))
+    y = transpose(resize(lb[:][1],(m,n)))
     tpitc = (abs(x-y) <= eps[1]) 
     res = teps * tpitc
     res = add.reduce(res,axis=0)
index b4af3c852ee7c8252e1e67ab90669151ce7981d7..8c2fac0ef5a44d95e43902cbda1ec0c71f9d76ac 100755 (executable)
@@ -21,7 +21,7 @@ def parse_args():
                           complexdomain|hfc|phase|specdiff|energy|kl|mkl|dual")
         parser.add_option("-B","--bufsize",
                           action="store", dest="bufsize", default=512, 
-                          help="buffer size [default=1024]")
+                          help="buffer size [default=512]")
         parser.add_option("-H","--hopsize",
                           action="store", dest="hopsize", default=256, 
                           help="overlap size [default=256]")