Changeset f264b17 for python/demos/demo_simple_spectral_weighting.py
- Timestamp:
- Jun 22, 2016, 1:00:10 PM (8 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:
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_simple_spectral_weighting.py
r60fc05b rf264b17 14 14 if __name__ == '__main__': 15 15 if len(sys.argv) < 2: 16 print 'usage: %s <inputfile> <outputfile>' % sys.argv[0]16 print('usage: %s <inputfile> <outputfile>' % sys.argv[0]) 17 17 sys.exit(1) 18 18 samplerate = 0 … … 23 23 24 24 win_s = 512 # fft size 25 hop_s = win_s / 2 # hop size25 hop_s = win_s // 2 # hop size 26 26 pv = pvoc(win_s, hop_s) # phase vocoder 27 27 … … 31 31 zeros( 50 ), 32 32 1.3 * hanningz(100), 33 zeros (win_s / 2 + 1 - 40 - 50 - 100),33 zeros (win_s // 2 + 1 - 40 - 50 - 100), 34 34 ] ) 35 35 … … 53 53 total_frames += read 54 54 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.