Changeset 9d1606d


Ignore:
Timestamp:
Jan 11, 2014, 5:45:18 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
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
Message:

python/scripts/aubiocut: use stamp, not onset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/scripts/aubiocut

    rc7d8cb1 r9d1606d  
    174174        total_frames = 0
    175175        # get next region
    176         next_onset = int(timestamps.pop(0))
     176        next_stamp = int(timestamps.pop(0))
    177177        while True:
    178178            vec, read = s()
    179             remaining = next_onset - total_frames
     179            remaining = next_stamp - total_frames
    180180            if remaining <= read:
    181181                # write remaining samples from current region
     
    184184                del g
    185185                # 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)
    187187                # write the remaining samples in the new file
    188188                g(vec[remaining:read], read - remaining)
    189189                #print "new slice", total_frames_written, "+", remaining, "=", start_of_next_region
    190190                if len(timestamps):
    191                     next_onset = int(timestamps.pop(0))
     191                    next_stamp = int(timestamps.pop(0))
    192192                else:
    193                     next_onset = 1e120
     193                    next_stamp = 1e120
    194194            else:
    195195                g(vec[0:read], read)
Note: See TracChangeset for help on using the changeset viewer.