Changeset 382c42e for python


Ignore:
Timestamp:
May 29, 2005, 12:11:38 AM (20 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:
e83a11e
Parents:
6b384f3
Message:

really fix buffer size settings in new aubiocut

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubiocut

    r6b384f3 r382c42e  
    9494filename   = options.filename
    9595samplerate = float(sndfile(filename).samplerate())
    96 hopsize    = float(options.hopsize)
    97 bufsize    = float(options.bufsize)
     96hopsize    = int(options.hopsize)
     97bufsize    = int(options.bufsize)
     98step       = float(samplerate)/float(hopsize)
    9899threshold  = float(options.threshold)
    99100silence    = float(options.silence)
    100 mintol     = float(options.mintol)*samplerate/hopsize
     101mintol     = float(options.mintol)*step
    101102delay      = float(options.delay)
    102103
     
    112113if delay != 0:
    113114        for i in range(len(onsets)):
    114                 onsets[i] -= delay*samplerate/hopsize
     115                onsets[i] -= delay*step
    115116
    116117# prune doubled
     
    126127# print times in second
    127128if options.verbose:
    128         for i in onsets: print "%f" % (i*hopsize/samplerate)
     129        for i in onsets: print "%f" % (i/step)
    129130
    130131if options.cut:
Note: See TracChangeset for help on using the changeset viewer.