Changeset 5e491b3b for python/aubiopitch
- Timestamp:
- Aug 28, 2005, 7:58:31 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:
- 3c86eb1
- Parents:
- 4cc9fe5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubiopitch
r4cc9fe5 r5e491b3b 5 5 """ 6 6 7 8 7 import sys 9 from aubio. aubioclass import *8 from aubio.tasks import * 10 9 11 10 usage = "usage: %s [options] -i soundfile" % sys.argv[0] … … 74 73 if options.mode == aubio_pitch_mcomb: options.bufsize = 4096 75 74 if options.mode == aubio_pitch_fcomb: options.bufsize = 4096 75 else: options.bufsize = 2048 76 76 if not options.hopsize: 77 77 options.hopsize = float(options.bufsize) / 2 … … 92 92 threshold = float(options.threshold) 93 93 silence = float(options.silence) 94 mode = options.mode 94 95 #mintol = float(options.mintol)*step 95 96 # default take back system delay … … 100 101 exit("not implemented yet") 101 102 else: 102 pitch = getpitch(filename, #threshold, 103 mode=options.mode, 104 omode=options.omode, 105 bufsize=bufsize,hopsize=hopsize, 106 silence=silence) 103 pitch = [] 104 for i in range(len(mode)): 105 pitch.append(getpitch(filename, #threshold, 106 mode=mode[i], 107 omode=options.omode, 108 bufsize=bufsize,hopsize=hopsize, 109 silence=silence)) 107 110 108 111 ## take back system delay … … 123 126 # print times in second 124 127 if options.verbose: 125 for i in range(len(pitch)): 126 print "%f\t%f" % (i/step,pitch[i]) 128 for j in range(len(pitch[0])): 129 print "%f\t" % (j/step), 130 for i in range(len(pitch)): 131 print "%f\t" % pitch[i][j], 132 print 127 133 128 134 if options.plot: … … 130 136 plot_pitch(filename, pitch, 131 137 samplerate=samplerate, hopsize=hopsize, outplot=options.outplot) 132
Note: See TracChangeset
for help on using the changeset viewer.