Changeset 3184468


Ignore:
Timestamp:
Mar 6, 2013, 10:36:01 PM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
d5e846c
Parents:
6d3777a
Message:

python/demos/demo_tss.py: improve default parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/demos/demo_tss.py

    r6d3777a r3184468  
    1010
    1111  samplerate = 44100
    12   win_s = 512                 # fft size
    13   hop_s = win_s / 2          # block size
    14   threshold = 0.26
     12  win_s = 1024      # fft size
     13  hop_s = win_s / 4 # block size
     14  threshold = 0.5
    1515
    1616  f = source(sys.argv[1], samplerate, hop_s)
     
    1818  h = sink(sys.argv[3], samplerate)
    1919
    20   pv = pvoc(win_s, hop_s)     # phase vocoder
    21   pw = pvoc(win_s, hop_s)     # another phase vocoder
     20  pva = pvoc(win_s, hop_s)    # a phase vocoder
     21  pvb = pvoc(win_s, hop_s)    # another phase vocoder
    2222  t = tss(win_s, hop_s)       # transient steady state separation
    2323
     
    2828  while read:
    2929    samples, read = f()               # read file
    30     spec = pv(samples)                # compute spectrum
     30    spec = pva(samples)                # compute spectrum
    3131    trans_spec, stead_spec = t(spec)  # transient steady-state separation
    32     transients = pv.rdo(trans_spec)   # overlap-add synthesis of transients
    33     steadstate = pw.rdo(stead_spec)   # overlap-add synthesis of steady states
     32    transients = pva.rdo(trans_spec)   # overlap-add synthesis of transients
     33    steadstate = pvb.rdo(stead_spec)   # overlap-add synthesis of steady states
    3434    g(transients, read)               # write transients to output
    3535    h(steadstate, read)               # write steady states to output
Note: See TracChangeset for help on using the changeset viewer.