Changeset 9c3b696


Ignore:
Timestamp:
Sep 5, 2006, 6:34:54 PM (18 years ago)
Author:
Paul Brossier <piem@altern.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
b9f5dbf
Parents:
5ce98d8
Message:

fix signal buffer size for demo-tempo-acf
fix signal buffer size for demo-tempo-acf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/test/bench/tempo/demo-tempo-acf

    r5ce98d8 r9c3b696  
    7777#tlong = [i for i in range(hopsize*(btstep-1))]
    7878#tall  = [i for i in range(hopsize*btstep)]
    79 sig    = [0 for i in range(hopsize*btstep)]
     79sig    = [0 for i in range(hopsize*btstep*4)]
    8080dfx = [i for i in range(winlen)]
    8181dfframe = [0 for i in range(winlen)]
     
    104104  task()
    105105  #print task.pos2
    106   sig[:-hopsize] = [i for i in sig[-(btstep-1)*hopsize:]]
     106  sig[:-hopsize] = [i for i in sig[-(btstep*4-1)*hopsize:]]
    107107  sig[-hopsize:] = [task.myvec.get(i,0) for i in t]
    108108
     
    119119    acframe = [acf.get(i,0) for i in range(winlen/2)]
    120120    if printframe == nrframe or printframe == -1:
    121       d  = [[plotdata(range(btstep*hopsize),sig,plottitle="input signal", with='lines')]]
     121      d  = [[plotdata(range(0,btstep*hopsize*4,4),sig[0:-1:4],plottitle="input signal", with='lines')]]
    122122      d  += [[plotdata(range(-winlen,0),dfframe,plottitle="onset detection", with='lines')]]
    123123      d  += [[plotdata(range(winlen/2),acframe,plottitle="autocorrelation", with='lines')]]
     
    134134      f('set size %f,%f' % (1.0*xsize,0.33*ysize) )
    135135      f('set orig %f,%f' % (0.0*xsize,0.66*ysize) )
    136       f('set xrange [%f:%f]' % (0,btstep*hopsize) )
     136      f('set xrange [%f:%f]' % (0,btstep*hopsize*4) )
    137137      f('set yrange [%f:%f]' % (-1.2*max(sig),1.2*max(sig)) )
    138138      f.title('Input signal')
Note: See TracChangeset for help on using the changeset viewer.