From: Paul Brossier Date: Sun, 14 Aug 2005 03:21:19 +0000 (+0000) Subject: updated default parameters, fixed 0.000.wav creation X-Git-Tag: bzr2git~848 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=855ed0abdc4d1b371747073c9102894cbf1ea666;p=aubio.git updated default parameters, fixed 0.000.wav creation --- diff --git a/python/aubio/aubioclass.py b/python/aubio/aubioclass.py index b39a7a9b..4fdececc 100644 --- a/python/aubio/aubioclass.py +++ b/python/aubio/aubioclass.py @@ -191,7 +191,8 @@ def cutfile(filein,slicetimes,zerothres=0.008,bufsize=1024,hopsize=512): 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) diff --git a/python/aubiocut b/python/aubiocut index 85b7ebe2..11583ef8 100755 --- a/python/aubiocut +++ b/python/aubiocut @@ -20,7 +20,7 @@ def parse_args(): 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 @@ def parse_args(): 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 @@ def parse_args(): 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 @@ hopsize = int(options.hopsize) 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)