Changeset b3f79ca
- Timestamp:
- Sep 20, 2016, 11:24:46 PM (8 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch
- Children:
- a0e0f56
- Parents:
- 46243dd4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_pitchshift.py
r46243dd4 rb3f79ca 6 6 if __name__ == '__main__': 7 7 if len(sys.argv) < 3: 8 print('usage: %s <inputfile> <outputfile> [transpose] [samplerate] [hop_size]' % sys.argv[0]) 8 print('usage: %s <inputfile> <outputfile> [transpose] [samplerate] [hop_size] [mode]' % sys.argv[0]) 9 print('available modes: default, crispness:0, crispness:1, ... crispness:6') 9 10 sys.exit(1) 10 11 if len(sys.argv) > 3: transpose = float(sys.argv[3]) … … 14 15 if len(sys.argv) > 5: hop_size = int(sys.argv[5]) 15 16 else: hop_size = 256 17 if len(sys.argv) > 6: mode = sys.argv[6] 18 else: mode = available_modes[0] 16 19 17 20 source_read = aubio.source(sys.argv[1], samplerate, hop_size) … … 19 22 sink_out = aubio.sink(sys.argv[2], samplerate) 20 23 21 pitchshifter = aubio.pitchshift( "default", 1., hop_size, samplerate)24 pitchshifter = aubio.pitchshift(mode, 1., hop_size, samplerate) 22 25 if transpose: pitchshifter.set_transpose(transpose) 23 26
Note: See TracChangeset
for help on using the changeset viewer.