ref: 318446885b70cec57eee0f3e78e0e4813446c8d4
parent: 6d3777af5b58c435491b933564a0b55c6b9c9cf3
author: Paul Brossier <piem@piem.org>
date: Wed Mar 6 11:36:01 EST 2013
python/demos/demo_tss.py: improve default parameters
--- a/python/demos/demo_tss.py
+++ b/python/demos/demo_tss.py
@@ -9,16 +9,16 @@
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 @@
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