Changeset 0fe9aab
- Timestamp:
- Mar 1, 2006, 4:18:18 AM (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:
- 1e3089c
- Parents:
- 300adc3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubiopitch
r300adc3 r0fe9aab 86 86 filename = options.filename 87 87 params = taskparams() 88 #params.samplerate = float(sndfile(filename).samplerate())88 params.samplerate = float(sndfile(filename).samplerate()) 89 89 params.hopsize = int(options.hopsize) 90 90 params.bufsize = int(options.bufsize) 91 #params.step = float(samplerate)/float(hopsize)91 params.step = params.samplerate/float(params.hopsize) 92 92 params.threshold = float(options.threshold) 93 93 params.silence = float(options.silence) 94 params.verbose = options.verbose 94 95 #mintol = float(options.mintol)*step 95 96 # default take back system delay … … 101 102 102 103 103 pitch =[]104 wplot,oplots = [],[] 104 105 modes = options.mode.split(',') 105 106 for i in range(len(modes)): 107 pitch = [] 106 108 params.pitchmode = modes[i] 107 dotask = taskpitch 108 #pitch.append(getpitch(filename, #threshold, 109 # mode=mode[i], 110 # omode=options.omode, 111 # bufsize=bufsize,hopsize=hopsize, 112 # silence=silence)) 113 filetask = dotask(filename,params=params) 114 pitch.append(filetask.compute_all()) 115 for j in range(len(pitch[i])): 116 if pitch[i][j] > 10000 or pitch[i][j] < 40: 117 pitch[i][j] = 0.; 109 filetask = taskpitch(filename,params=params) 110 pitch = filetask.compute_all() 111 #print filetask.eval(pitch[i]) 112 filetask.plot(pitch,wplot,oplots) 118 113 119 if options.verbose: 120 for j in range(len(pitch[i])): 121 print "%f\t" % (j/params.step), 122 print "%f\t" % pitch[i][j], 123 print 124 125 if options.plot: 126 filetask.plot(pitch,outplot=options.outplot) 114 filetask.plotplot(wplot,oplots,outplot=options.outplot)
Note: See TracChangeset
for help on using the changeset viewer.