Changeset c9c012e
- Timestamp:
- Oct 29, 2018, 3:32:24 PM (6 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
- Children:
- d194d8c
- Parents:
- a88594d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/aubio/slicing.py
ra88594d rc9c012e 7 7 8 8 def slice_source_at_stamps(source_file, timestamps, timestamps_end=None, 9 output_dir=None, samplerate=0, hopsize=256): 9 output_dir=None, samplerate=0, hopsize=256, 10 create_first=False): 10 11 """ slice a sound file at given timestamps """ 11 12 … … 13 14 raise ValueError("no timestamps given") 14 15 15 if timestamps[0] != 0 :16 if timestamps[0] != 0 and create_first: 16 17 timestamps = [0] + timestamps 17 18 if timestamps_end is not None: … … 78 79 # write remaining samples from current region 79 80 _sink.do_multi(vec[:, start:remaining], remaining - start) 80 #print "closing region", "remaining", remaining81 #print("closing region", "remaining", remaining) 81 82 # close this file 82 83 _sink.close()
Note: See TracChangeset
for help on using the changeset viewer.