Changeset 4c0a1db


Ignore:
Timestamp:
Feb 22, 2014, 7:38:12 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
8a5148e
Parents:
467122d
Message:

python/scripts/aubiocut: add minioi option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/scripts/aubiocut

    r467122d r4c0a1db  
    5555            help="cut input sound file at detected labels \
    5656                    best used with option -L")
     57
     58    # minioi
     59    parser.add_option("-M","--minioi",
     60            metavar = "<value>", type='string',
     61            action="store", dest="minioi", default="12ms",
     62            help="minimum inter onset interval [default=12ms]")
     63
    5764    """
    5865    parser.add_option("-D","--delay",
     
    6572            action="store", dest="dcthreshold", default=1.,
    6673            help="onset peak picking DC component [default=1.]")
    67     parser.add_option("-M","--mintol",
    68             metavar = "<value>",
    69             action="store", dest="mintol", default=0.048,
    70             help="minimum inter onset interval [default=0.048]")
    7174    parser.add_option("-L","--localmin",
    7275            action="store_true", dest="localmin", default=False,
     
    153156    else:
    154157        o = onset(options.onset_method, bufsize, hopsize)
     158        if options.minioi:
     159            if options.minioi.endswith('ms'):
     160                o.set_minioi_ms(int(options.minioi[:-2]))
     161            elif options.minioi.endswith('s'):
     162                o.set_minioi_s(int(options.minioi[:-1]))
     163            else:
     164                o.set_minioi(int(options.minioi))
    155165    o.set_threshold(options.threshold)
    156166
Note: See TracChangeset for help on using the changeset viewer.