Ignore:
Timestamp:
Jun 22, 2016, 1:00:10 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
4b9443c4
Parents:
60fc05b (diff), 6769586 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into notes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/demos/demo_simple_spectral_weighting.py

    r60fc05b rf264b17  
    1414if __name__ == '__main__':
    1515    if len(sys.argv) < 2:
    16         print 'usage: %s <inputfile> <outputfile>' % sys.argv[0]
     16        print('usage: %s <inputfile> <outputfile>' % sys.argv[0])
    1717        sys.exit(1)
    1818    samplerate = 0
     
    2323
    2424    win_s = 512 # fft size
    25     hop_s = win_s / 2 # hop size
     25    hop_s = win_s // 2 # hop size
    2626    pv = pvoc(win_s, hop_s) # phase vocoder
    2727
     
    3131        zeros( 50 ),
    3232        1.3 * hanningz(100),
    33         zeros (win_s / 2 + 1 - 40 - 50 - 100),
     33        zeros (win_s // 2 + 1 - 40 - 50 - 100),
    3434        ] )
    3535
     
    5353        total_frames += read
    5454
    55     print "read", total_frames / float(samplerate), "seconds from", f.uri
     55    duration = total_frames / float(samplerate)
     56    print("read {:.3f}s from {:s}".format(duration, f.uri))
Note: See TracChangeset for help on using the changeset viewer.