Changeset 357f81e


Ignore:
Timestamp:
Oct 30, 2018, 12:56:50 PM (6 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
Children:
4bc10e2
Parents:
929d76c
Message:

[cmd] add --silence and --release-drop to notes subcommand

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/aubio/cmd.py

    r929d76c r357f81e  
    102102    subparser.add_input()
    103103    subparser.add_buf_hop_size()
     104    subparser.add_silence()
     105    subparser.add_release_drop()
    104106    subparser.add_time_format()
    105107    subparser.add_verbose_help()
     
    207209                action="store", dest="silence", default=-70,
    208210                help="silence threshold")
     211
     212    def add_release_drop(self):
     213        self.add_argument("-d", "--release-drop",
     214                metavar = "<value>", type=float,
     215                action="store", dest="release_drop", default=10,
     216                help="release drop threshold")
    209217
    210218    def add_minioi(self, default="12ms"):
     
    380388        self.parse_options(args, self.valid_opts)
    381389        self.notes = aubio.notes(**self.options)
     390        if args.silence is not None:
     391            self.notes.set_silence(args.silence)
     392        if args.release_drop is not None:
     393            self.notes.set_release_drop(args.release_drop)
    382394        super(process_notes, self).__init__(args)
    383395    def __call__(self, block):
Note: See TracChangeset for help on using the changeset viewer.