Changeset 5cf415f for python/aubiopitch
- Timestamp:
- Aug 9, 2005, 8:35:14 PM (20 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, pitchshift, sampler, timestretch, yinfft+
- Children:
- b1f723d
- Parents:
- a29ad46
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubiopitch
ra29ad46 r5cf415f 11 11 usage = "usage: %s [options] -i soundfile" % sys.argv[0] 12 12 13 def check_mode(option, opt, value, parser):14 nvalue = parser.rargs[0]15 if nvalue == 'mcomb' :16 setattr(parser.values, option.dest, aubio_pitch_mcomb)17 elif nvalue == 'yin' :18 setattr(parser.values, option.dest, aubio_pitch_yin)19 elif nvalue == 'fcomb' :20 setattr(parser.values, option.dest, aubio_pitch_fcomb)21 elif nvalue == 'schmitt' :22 setattr(parser.values, option.dest, aubio_pitch_schmitt)23 24 13 25 14 def parse_args(): … … 30 19 help="input sound file") 31 20 parser.add_option("-m","--mode", action="callback", 32 callback=check_mode, dest="mode", default=aubio_pitch_mcomb, 21 callback=check_pitch_mode, dest="mode", 22 default=aubio_pitch_mcomb, 33 23 help="pitch detection mode [default=mcomb] \ 34 24 mcomb|yin|fcomb|schmitt")
Note: See TracChangeset
for help on using the changeset viewer.