Changeset 4120fbc for python/demos/demo_sink.py
- Timestamp:
- May 16, 2016, 3:16:00 AM (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:
- dc654f8
- Parents:
- 416ddd1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_sink.py
r416ddd1 r4120fbc 6 6 if __name__ == '__main__': 7 7 if len(sys.argv) < 3: 8 print 'usage: %s <inputfile> <outputfile> [samplerate] [hop_size]' % sys.argv[0]8 print('usage: %s <inputfile> <outputfile> [samplerate] [hop_size]' % sys.argv[0]) 9 9 sys.exit(1) 10 10 … … 23 23 g(vec, read) 24 24 total_frames += read 25 print "wrote", "%.2fs" % (total_frames / float(samplerate) ), 26 print "(", total_frames, "frames", "in", 27 print total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")", 28 print "from", f.uri, 29 print "to", g.uri 25 outstr = "wrote %.2fs" % (total_frames / float(samplerate)) 26 outstr += " (%d frames in" % total_frames 27 outstr += " %d blocks" % (total_frames // f.hop_size) 28 outstr += " at %dHz)" % f.samplerate 29 outstr += " from " + f.uri 30 outstr += " to " + g.uri 31 print(outstr)
Note: See TracChangeset
for help on using the changeset viewer.