History

python/demos/demo_tss.py: improve default parameters, exit before plotting

Paul Brossier committed 10 years ago

Commit 773a7f31 parent 1bd83341 file · +5 −3Browse files

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

Unified · Split

python/demos/demo_tss.py+5−3
@@ -10,8 +10,7 @@ if __name__ == '__main__': · 9 unmodified lines
10 10
11 samplerate = 4410011 samplerate = 44100
12 win_s = 1024 # fft size12 win_s = 1024 # fft size
13 hop_s = win_s // 4 # block size13 hop_s = win_s // 8 # block size
14 threshold = 0.5
15 14
16 f = source(sys.argv[1], samplerate, hop_s)15 f = source(sys.argv[1], samplerate, hop_s)
17 g = sink(sys.argv[2], samplerate)16 g = sink(sys.argv[2], samplerate)
@@ -21,7 +20,9 @@ if __name__ == '__main__': · 3 unmodified lines
21 pvb = pvoc(win_s, hop_s) # another phase vocoder20 pvb = pvoc(win_s, hop_s) # another phase vocoder
22 t = tss(win_s, hop_s) # transient steady state separation21 t = tss(win_s, hop_s) # transient steady state separation
23 22
24 t.set_threshold(threshold)23 t.set_threshold(0.01)
24 t.set_alpha(3.)
25 t.set_beta(4.)
25 26
26 read = hop_s27 read = hop_s
27 28
@@ -35,6 +36,7 @@ if __name__ == '__main__': · 7 unmodified lines
35 h(steadstate, read) # write steady states to output36 h(steadstate, read) # write steady states to output
36 37
37 del f, g, h # finish writing the files now38 del f, g, h # finish writing the files now
39 sys.exit(0)
38 40
39 from demo_spectrogram import get_spectrogram41 from demo_spectrogram import get_spectrogram
40 from pylab import subplot, show42 from pylab import subplot, show

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