- Timestamp:
- Jan 11, 2014, 5:45:18 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:
- 3f9e8e5
- Parents:
- c7d8cb1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/scripts/aubiocut
rc7d8cb1 r9d1606d 174 174 total_frames = 0 175 175 # get next region 176 next_ onset= int(timestamps.pop(0))176 next_stamp = int(timestamps.pop(0)) 177 177 while True: 178 178 vec, read = s() 179 remaining = next_ onset- total_frames179 remaining = next_stamp - total_frames 180 180 if remaining <= read: 181 181 # write remaining samples from current region … … 184 184 del g 185 185 # create a new file for the new region 186 g = sink(new_sink_name(source_base_name, next_ onset/ float(samplerate)), samplerate)186 g = sink(new_sink_name(source_base_name, next_stamp / float(samplerate)), samplerate) 187 187 # write the remaining samples in the new file 188 188 g(vec[remaining:read], read - remaining) 189 189 #print "new slice", total_frames_written, "+", remaining, "=", start_of_next_region 190 190 if len(timestamps): 191 next_ onset= int(timestamps.pop(0))191 next_stamp = int(timestamps.pop(0)) 192 192 else: 193 next_ onset= 1e120193 next_stamp = 1e120 194 194 else: 195 195 g(vec[0:read], read)
Note: See TracChangeset
for help on using the changeset viewer.