History

really fix buffer size settings in new aubiocut

Paul Brossier committed 21 years ago

Commit 382c42e1 parent 6b384f31 file · +6 −5Browse files

Showing the changes to python/aubiocut (1 of 1 file). Show all

Unified · Split

python/aubiocut+6−5
@@ -93,11 +93,12 @@ options, args = parse_args() · 92 unmodified lines
93 93
94filename = options.filename94filename = options.filename
95samplerate = float(sndfile(filename).samplerate())95samplerate = float(sndfile(filename).samplerate())
96hopsize = float(options.hopsize)96hopsize = int(options.hopsize)
97bufsize = float(options.bufsize)97bufsize = int(options.bufsize)
98step = float(samplerate)/float(hopsize)
98threshold = float(options.threshold)99threshold = float(options.threshold)
99silence = float(options.silence)100silence = float(options.silence)
100mintol = float(options.mintol)*samplerate/hopsize101mintol = float(options.mintol)*step
101delay = float(options.delay)102delay = float(options.delay)
102 103
103if options.beat:104if options.beat:
@@ -111,7 +112,7 @@ else: · 7 unmodified lines
111# take back system delay112# take back system delay
112if delay != 0:113if delay != 0:
113 for i in range(len(onsets)):114 for i in range(len(onsets)):
114 onsets[i] -= delay*samplerate/hopsize115 onsets[i] -= delay*step
115 116
116# prune doubled 117# prune doubled
117if mintol > 0:118if mintol > 0:
@@ -125,7 +126,7 @@ if mintol > 0: · 7 unmodified lines
125 126
126# print times in second127# print times in second
127if options.verbose:128if options.verbose:
128 for i in onsets: print "%f" % (i*hopsize/samplerate)129 for i in onsets: print "%f" % (i/step)
129 130
130if options.cut:131if options.cut:
131 cutfile(filename,onsets,bufsize=bufsize,hopsize=hopsize)132 cutfile(filename,onsets,bufsize=bufsize,hopsize=hopsize)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t