Changeset e79acd9


Ignore:
Timestamp:
Mar 8, 2017, 7:30:00 AM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler
Children:
2470240
Parents:
dcecaec
Message:

python/scripts/aubiocut: add --cut_every_nslices option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/scripts/aubiocut

    rdcecaec re79acd9  
    117117            action = "store", dest = "cut_until_nsamples", default = None,
    118118            help="how many extra samples should be added at the end of each slice")
     119    parser.add_option("--cut-every-nslices", type = int,
     120            metavar = "<samples>",
     121            action = "store", dest = "cut_every_nslices", default = None,
     122            help="how many slices should be groupped together at each cut")
    119123    parser.add_option("--cut-until-nslices", type = int,
    120124            metavar = "<slices>",
     
    187191        from aubio.slicing import slice_source_at_stamps
    188192        timestamps_end = None
     193        if options.cut_every_nslices:
     194            timestamps = timestamps[::options.cut_every_nslices]
     195            nstamps = len(timestamps)
    189196        if options.cut_until_nslices and options.cut_until_nsamples:
    190197            print ("warning: using cut_until_nslices, but cut_until_nsamples is set")
Note: See TracChangeset for help on using the changeset viewer.