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
1010
1111 samplerate = 44100
1212 win_s = 1024 # fft size
13− hop_s = win_s // 4 # block size
14− threshold = 0.5
13+ hop_s = win_s // 8 # block size
1514
1615 f = source(sys.argv[1], samplerate, hop_s)
1716 g = sink(sys.argv[2], samplerate)
@@ -21,7 +20,9 @@ if __name__ == '__main__': · 3 unmodified lines
2120 pvb = pvoc(win_s, hop_s) # another phase vocoder
2221 t = tss(win_s, hop_s) # transient steady state separation
2322
24− t.set_threshold(threshold)
23+ t.set_threshold(0.01)
24+ t.set_alpha(3.)
25+ t.set_beta(4.)
2526
2627 read = hop_s
2728
@@ -35,6 +36,7 @@ if __name__ == '__main__': · 7 unmodified lines
3536 h(steadstate, read) # write steady states to output
3637
3738 del f, g, h # finish writing the files now
39+ sys.exit(0)
3840
3941 from demo_spectrogram import get_spectrogram
4042 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