From: Paul Brossier Date: Wed, 6 Mar 2013 21:36:01 +0000 (-0500) Subject: python/demos/demo_tss.py: improve default parameters X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=318446885b70cec57eee0f3e78e0e4813446c8d4;p=aubio.git python/demos/demo_tss.py: improve default parameters --- diff --git a/python/demos/demo_tss.py b/python/demos/demo_tss.py index 0d670ce1..884dc9b5 100755 --- a/python/demos/demo_tss.py +++ b/python/demos/demo_tss.py @@ -9,16 +9,16 @@ if __name__ == '__main__': sys.exit(1) samplerate = 44100 - win_s = 512 # fft size - hop_s = win_s / 2 # block size - threshold = 0.26 + win_s = 1024 # fft size + hop_s = win_s / 4 # block size + threshold = 0.5 f = source(sys.argv[1], samplerate, hop_s) g = sink(sys.argv[2], samplerate) h = sink(sys.argv[3], samplerate) - pv = pvoc(win_s, hop_s) # phase vocoder - pw = pvoc(win_s, hop_s) # another phase vocoder + pva = pvoc(win_s, hop_s) # a phase vocoder + pvb = pvoc(win_s, hop_s) # another phase vocoder t = tss(win_s, hop_s) # transient steady state separation t.set_threshold(threshold) @@ -27,10 +27,10 @@ if __name__ == '__main__': while read: samples, read = f() # read file - spec = pv(samples) # compute spectrum + spec = pva(samples) # compute spectrum trans_spec, stead_spec = t(spec) # transient steady-state separation - transients = pv.rdo(trans_spec) # overlap-add synthesis of transients - steadstate = pw.rdo(stead_spec) # overlap-add synthesis of steady states + transients = pva.rdo(trans_spec) # overlap-add synthesis of transients + steadstate = pvb.rdo(stead_spec) # overlap-add synthesis of steady states g(transients, read) # write transients to output h(steadstate, read) # write steady states to output