Changeset 3d9b41b
- Timestamp:
- Apr 12, 2017, 9:49:46 AM (8 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
- Children:
- 8f1b354
- Parents:
- 3d3d74d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/aubio/cmd.py
r3d3d74d r3d9b41b 47 47 parser_add_method(subparser, helpstr=helpstr) 48 48 parser_add_threshold(subparser) 49 parser_add_pitch_unit(subparser) 49 50 parser_add_silence(subparser) 50 51 parser_add_time_format(subparser) … … 150 151 action="store", dest="minioi", default="12ms", 151 152 help="minimum Inter-Onset Interval") 153 154 def parser_add_pitch_unit(parser, default="Hz"): 155 help_str = "frequency unit, should be one of Hz, midi, bin, cent" 156 help_str += " [default=%s]" % default 157 parser.add_argument("-u", "--pitch-unit", 158 metavar = "<value>", type=str, 159 action="store", dest="pitch_unit", default=default, 160 help=help_str) 152 161 153 162 def parser_add_time_format(parser): … … 240 249 self.parse_options(args, self.valid_opts) 241 250 self.pitch = aubio.pitch(**self.options) 251 if args.pitch_unit is not None: 252 self.pitch.set_unit(args.pitch_unit) 242 253 if args.threshold is not None: 243 254 self.pitch.set_tolerance(args.threshold)
Note: See TracChangeset
for help on using the changeset viewer.