From: Paul Brossier Date: Tue, 5 Sep 2006 16:34:54 +0000 (+0000) Subject: fix signal buffer size for demo-tempo-acf X-Git-Tag: bzr2git~565 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9c3b696dc4f2dbe9540a8630758b015f3c4da52d;p=aubio.git fix signal buffer size for demo-tempo-acf fix signal buffer size for demo-tempo-acf --- diff --git a/python/test/bench/tempo/demo-tempo-acf b/python/test/bench/tempo/demo-tempo-acf index 7784d6a2..e099b81c 100755 --- a/python/test/bench/tempo/demo-tempo-acf +++ b/python/test/bench/tempo/demo-tempo-acf @@ -76,7 +76,7 @@ rayparam = 48/512.*winlen t = [i for i in range(hopsize)] #tlong = [i for i in range(hopsize*(btstep-1))] #tall = [i for i in range(hopsize*btstep)] -sig = [0 for i in range(hopsize*btstep)] +sig = [0 for i in range(hopsize*btstep*4)] dfx = [i for i in range(winlen)] dfframe = [0 for i in range(winlen)] dfrev = [0 for i in range(winlen)] @@ -103,7 +103,7 @@ nrframe = 0 while (task.readsize == params.hopsize): task() #print task.pos2 - sig[:-hopsize] = [i for i in sig[-(btstep-1)*hopsize:]] + sig[:-hopsize] = [i for i in sig[-(btstep*4-1)*hopsize:]] sig[-hopsize:] = [task.myvec.get(i,0) for i in t] #g('set xrange [%f:%f]' % (t[0],t[-1])) @@ -118,7 +118,7 @@ while (task.readsize == params.hopsize): aubio_autocorr(task.dfframe(),acf()); acframe = [acf.get(i,0) for i in range(winlen/2)] if printframe == nrframe or printframe == -1: - d = [[plotdata(range(btstep*hopsize),sig,plottitle="input signal", with='lines')]] + d = [[plotdata(range(0,btstep*hopsize*4,4),sig[0:-1:4],plottitle="input signal", with='lines')]] d += [[plotdata(range(-winlen,0),dfframe,plottitle="onset detection", with='lines')]] d += [[plotdata(range(winlen/2),acframe,plottitle="autocorrelation", with='lines')]] @@ -133,7 +133,7 @@ while (task.readsize == params.hopsize): f('set size %f,%f' % (1.0*xsize,0.33*ysize) ) f('set orig %f,%f' % (0.0*xsize,0.66*ysize) ) - f('set xrange [%f:%f]' % (0,btstep*hopsize) ) + f('set xrange [%f:%f]' % (0,btstep*hopsize*4) ) f('set yrange [%f:%f]' % (-1.2*max(sig),1.2*max(sig)) ) f.title('Input signal') f.xlabel('time (samples)')