Changeset aa17581 for python/aubiopitch
- Timestamp:
- Aug 22, 2005, 9:52:17 PM (19 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:
- c29dae2
- Parents:
- f97445c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubiopitch
rf97445c raa17581 23 23 help="pitch detection mode [default=mcomb] \ 24 24 mcomb|yin|fcomb|schmitt") 25 parser.add_option("-u","--units", action="callback", 26 callback=check_pitchm_mode, dest="omode", 27 default=aubio_pitchm_freq, 28 help="output pitch in units [default=Hz] \ 29 freq|midi|cent|bin") 25 30 parser.add_option("-B","--bufsize", 26 action="store", dest="bufsize", default= 1024,31 action="store", dest="bufsize", default=None, 27 32 help="buffer size [default=1024]") 28 33 parser.add_option("-H","--hopsize", 29 action="store", dest="hopsize", default= 512,34 action="store", dest="hopsize", default=None, 30 35 help="overlap size [default=512]") 31 36 parser.add_option("-t","--threshold", … … 64 69 help="be quiet") 65 70 (options, args) = parser.parse_args() 71 if not options.bufsize: 72 if options.mode == aubio_pitch_yin: options.bufsize = 1024 73 if options.mode == aubio_pitch_schmitt: options.bufsize = 2048 74 if options.mode == aubio_pitch_mcomb: options.bufsize = 4096 75 if options.mode == aubio_pitch_fcomb: options.bufsize = 4096 76 if not options.hopsize: 77 options.hopsize = float(options.bufsize) / 2 66 78 if not options.filename: 67 68 79 print "no file name given\n", usage 80 sys.exit(1) 69 81 return options, args 70 82 71 83 options, args = parse_args() 84 85 #print options.bufsize, options.hopsize 72 86 73 87 filename = options.filename … … 86 100 exit("not implemented yet") 87 101 else: 88 pitch = getpitch(filename, #threshold, silence,102 pitch = getpitch(filename, #threshold, 89 103 mode=options.mode, 90 bufsize=bufsize,hopsize=hopsize) 104 omode=options.omode, 105 bufsize=bufsize,hopsize=hopsize, 106 silence=silence) 91 107 92 108 ## take back system delay
Note: See TracChangeset
for help on using the changeset viewer.