Changeset 650e39b for python/aubio/task
- Timestamp:
- Mar 21, 2006, 11:59: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:
- 4798fdf
- Parents:
- 4994ebb
- Location:
- python/aubio/task
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubio/task/pitch.py
r4994ebb r650e39b 8 8 task.__init__(self,input,params=params) 9 9 self.shortlist = [0. for i in range(self.params.pitchsmooth)] 10 if self.params.pitchmode == 'yinfft': 11 yinthresh = self.params.yinfftthresh 12 elif self.params.pitchmode == 'yin': 13 yinthresh = self.params.yinthresh 14 else: 15 yinthresh = 0. 10 16 self.pitchdet = pitchdetection(mode=get_pitch_mode(self.params.pitchmode), 11 17 bufsize=self.params.bufsize, … … 14 20 samplerate=self.srate, 15 21 omode=self.params.omode, 16 yinthresh= self.params.yinthresh)22 yinthresh=yinthresh) 17 23 18 24 def __call__(self): … … 68 74 while(tasksil.readsize==tasksil.params.hopsize): 69 75 tasksil() 70 time.append(tasksil.params.step* tasksil.frameread)76 time.append(tasksil.params.step*(tasksil.frameread)) 71 77 if not tasksil.issilence: 72 78 pitch.append(self.truth) … … 156 162 157 163 158 def plotplot(self,wplot,oplots,outplot=None,multiplot = 1, midi = 1):164 def plotplot(self,wplot,oplots,outplot=None,multiplot = 0, midi = 1): 159 165 from aubio.gnuplot import gnuplot_init, audio_to_array, make_audio_plot 160 166 import re … … 198 204 else: 199 205 g.ylabel('pitch (midi)') 200 g('set yrange [%f:%f]' % ( 40, aubio_freqtomidi(self.params.pitchmax)))206 g('set yrange [%f:%f]' % (aubio_freqtomidi(self.params.pitchmin), aubio_freqtomidi(self.params.pitchmax))) 201 207 g('set key right top') 202 208 g('set noclip one') -
python/aubio/task/utils.py
r4994ebb r650e39b 34 34 elif nvalue == 'schmitt': 35 35 return aubio_pitch_schmitt 36 elif nvalue == 'yinfft': 37 return aubio_pitch_yinfft 36 38 else: 37 39 import sys
Note: See TracChangeset
for help on using the changeset viewer.