Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -10,8 +10,7 @@ if __name__ == '__main__': · 9 unmodified lines | |||
| 10 | 10 | ||
| 11 | samplerate = 44100 | 11 | samplerate = 44100 |
| 12 | win_s = 1024 # fft size | 12 | win_s = 1024 # fft size |
| 13 | hop_s = win_s // 4 # block size | 13 | 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 vocoder | 20 | pvb = pvoc(win_s, hop_s) # another phase vocoder |
| 22 | t = tss(win_s, hop_s) # transient steady state separation | 21 | 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_s | 27 | read = hop_s |
| 27 | 28 | ||
| @@ -35,6 +36,7 @@ if __name__ == '__main__': · 7 unmodified lines | |||
| 35 | h(steadstate, read) # write steady states to output | 36 | h(steadstate, read) # write steady states to output |
| 36 | 37 | ||
| 37 | del f, g, h # finish writing the files now | 38 | del f, g, h # finish writing the files now |
| 39 | sys.exit(0) | ||
| 38 | 40 | ||
| 39 | from demo_spectrogram import get_spectrogram | 41 | from demo_spectrogram import get_spectrogram |
| 40 | from pylab import subplot, show | 42 | from pylab import subplot, show |