ref: 855ed0abdc4d1b371747073c9102894cbf1ea666
parent: a3e24ec490673845170052007673b3956cff651b
author: Paul Brossier <piem@altern.org>
date: Sat Aug 13 23:21:19 EDT 2005
updated default parameters, fixed 0.000.wav creation
--- a/python/aubio/aubioclass.py
+++ b/python/aubio/aubioclass.py
@@ -191,7 +191,8 @@
filei = sndfile(filein)
framestep = hopsize/(filei.samplerate()+0.)
channels = filei.channels()
- newname = "%s%f%s" % ("/tmp/",0.0000000,filein[-4:])
+ newname = "%s%s%f%s%s" % (filein.split(".")[0].split("/")[-1],".",
+ frameread*framestep,".",filein.split(".")[-1])
fileo = sndfile(newname,model=filei)
myvec = fvec(hopsize,channels)
mycopy = fvec(hopsize,channels)
--- a/python/aubiocut
+++ b/python/aubiocut
@@ -20,7 +20,7 @@
help="onset detection mode [default=dual] \
complexdomain|hfc|phase|specdiff|energy|kl|mkl|dual")
parser.add_option("-B","--bufsize",
- action="store", dest="bufsize", default=1024,
+ action="store", dest="bufsize", default=512,
help="buffer size [default=1024]")
parser.add_option("-H","--hopsize",
action="store", dest="hopsize", default=256,
@@ -37,7 +37,7 @@
parser.add_option("-D","--delay",
action="store", dest="delay",
help="number of seconds to take back [default=system]\
- default system delay is 2*hopsize/samplerate")
+ default system delay is 3*hopsize/samplerate")
parser.add_option("-L","--localmin",
action="store_true", dest="localmin", default=False,
help="use local minima after peak detection")
@@ -53,7 +53,7 @@
help="outputs silence locations")
parser.add_option("-z","--zerocross",
action="store", dest="zerothres", default=0.008,
- help="zero-crossing threshold for slicing [default=0.008]")
+ help="zero-crossing threshold for slicing [default=0.00008]")
# plotting functions
parser.add_option("-p","--plot",
action="store_true", dest="plot", default=False,
@@ -85,11 +85,12 @@
bufsize = int(options.bufsize)
step = float(samplerate)/float(hopsize)
threshold = float(options.threshold)
+zerothres = float(options.zerothres)
silence = float(options.silence)
mintol = float(options.mintol)*step
# default take back system delay
if options.delay: delay = float(options.delay)
-else: delay = 2./step
+else: delay = 3./step
if options.beat:
#onsets = getbeats(filename,threshold,silence,mode=options.mode)