- Timestamp:
- Feb 23, 2014, 9:42:00 PM (11 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:
- 584016f
- Parents:
- 060a3135
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/aubio/slicing.py
r060a3135 r2a49114 45 45 while True: 46 46 # get hopsize new samples from source 47 vec, read = s ()47 vec, read = s.do_multi() 48 48 # if the total number of frames read will exceed the next region start 49 49 if len(regions) and total_frames + read >= regions[0][0]: … … 54 54 new_sink_path = new_sink_name(source_base_name, start_stamp, samplerate) 55 55 # create its sink 56 g = sink(new_sink_path, samplerate )56 g = sink(new_sink_path, samplerate, s.channels) 57 57 # create a dictionary containing all this 58 58 new_slice = {'start_stamp': start_stamp, 'end_stamp': end_stamp, 'sink': g} … … 73 73 if remaining > start: 74 74 # write remaining samples from current region 75 g (vec[start:remaining], remaining - start)75 g.do_multi(vec[:,start:remaining], remaining - start) 76 76 #print "closing region", "remaining", remaining 77 77 # close this file … … 79 79 elif read > start: 80 80 # write all the samples 81 g (vec[start:read], read - start)81 g.do_multi(vec[:,start:read], read - start) 82 82 total_frames += read 83 83 if read < hopsize: break
Note: See TracChangeset
for help on using the changeset viewer.