- Timestamp:
- May 29, 2005, 12:11:38 AM (20 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubiocut
r6b384f3 r382c42e 94 94 filename = options.filename 95 95 samplerate = float(sndfile(filename).samplerate()) 96 hopsize = float(options.hopsize) 97 bufsize = float(options.bufsize) 96 hopsize = int(options.hopsize) 97 bufsize = int(options.bufsize) 98 step = float(samplerate)/float(hopsize) 98 99 threshold = float(options.threshold) 99 100 silence = float(options.silence) 100 mintol = float(options.mintol)*s amplerate/hopsize101 mintol = float(options.mintol)*step 101 102 delay = float(options.delay) 102 103 … … 112 113 if delay != 0: 113 114 for i in range(len(onsets)): 114 onsets[i] -= delay*s amplerate/hopsize115 onsets[i] -= delay*step 115 116 116 117 # prune doubled … … 126 127 # print times in second 127 128 if options.verbose: 128 for i in onsets: print "%f" % (i *hopsize/samplerate)129 for i in onsets: print "%f" % (i/step) 129 130 130 131 if options.cut:
Note: See TracChangeset
for help on using the changeset viewer.