- Timestamp:
- Mar 6, 2013, 10:36:01 PM (12 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- d5e846c
- Parents:
- 6d3777a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_tss.py
r6d3777a r3184468 10 10 11 11 samplerate = 44100 12 win_s = 512# fft size13 hop_s = win_s / 2# block size14 threshold = 0. 2612 win_s = 1024 # fft size 13 hop_s = win_s / 4 # block size 14 threshold = 0.5 15 15 16 16 f = source(sys.argv[1], samplerate, hop_s) … … 18 18 h = sink(sys.argv[3], samplerate) 19 19 20 pv = pvoc(win_s, hop_s) #phase vocoder21 p w = pvoc(win_s, hop_s)# another phase vocoder20 pva = pvoc(win_s, hop_s) # a phase vocoder 21 pvb = pvoc(win_s, hop_s) # another phase vocoder 22 22 t = tss(win_s, hop_s) # transient steady state separation 23 23 … … 28 28 while read: 29 29 samples, read = f() # read file 30 spec = pv (samples) # compute spectrum30 spec = pva(samples) # compute spectrum 31 31 trans_spec, stead_spec = t(spec) # transient steady-state separation 32 transients = pv .rdo(trans_spec) # overlap-add synthesis of transients33 steadstate = p w.rdo(stead_spec) # overlap-add synthesis of steady states32 transients = pva.rdo(trans_spec) # overlap-add synthesis of transients 33 steadstate = pvb.rdo(stead_spec) # overlap-add synthesis of steady states 34 34 g(transients, read) # write transients to output 35 35 h(steadstate, read) # write steady states to output
Note: See TracChangeset
for help on using the changeset viewer.