Changeset b965fb1 for python/test/bench/pitch/bench-pitch-isolated
- Timestamp:
- Apr 20, 2006, 2:51:40 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:
- 4c67dc8
- Parents:
- e31ac284
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
python/test/bench/pitch/bench-pitch-isolated
re31ac284 rb965fb1 48 48 #print input, results, results - float(input.split('.')[-2]) 49 49 50 def run_bench(self,modes=['schmitt'] ):50 def run_bench(self,modes=['schmitt'],multiplot=0): 51 51 from os.path import basename 52 52 self.modes = modes … … 91 91 plottitle="%s %s" % (self.v['mode'],self.params.bufsize), 92 92 plotmode='lines') 93 """ 93 94 self.plotpitchtessiture(plot, 94 95 truth, … … 96 97 plottitle="%s %s" % (self.v['mode'],"%12"), 97 98 plotmode='lines') 98 """99 99 self.plotpitchtessiture(plot, 100 100 truth, … … 104 104 """ 105 105 title = basename(self.datadir) 106 d.append(plot) 106 if multiplot: 107 d.append(plot) 108 else: 109 d += plot 107 110 outplot = "_-_".join(('pitchtessiture',title)) 108 self.xmin = 20. #min(self.v['truth'])109 self.xmax = 110. #max(self.v['truth'])110 for ext in ('ps','png','svg' ,''):111 self.xmin = min(self.v['truth']) #20. 112 self.xmax = max(self.v['truth']) 113 for ext in ('ps','png','svg'): #,''): 111 114 self.plotplotpitchtessiture(d, 112 115 plottitle="".join(['Performance against MIDI Note number (', … … 114 117 ", %s" % len(self.sndlist), " samples)"]), 115 118 outplot=outplot, 116 extension=ext )119 extension=ext,multiplot=multiplot) 117 120 #d.append('beta = .25,orig(x) title \"-2 octave\"') 118 121 #d.append('beta = .50,orig(x) title \"-1 octave\"') … … 133 136 #g.title(plottitle) 134 137 #g('orig(x) = beta*x') 135 #g.xlabel('original pitch (Hz)') 136 #g.ylabel('detected pitch (Hz)') 137 #g('set key left top') 138 #g('set log xy') 139 #g('set xrange [50:2000]') 140 g('set yrange [0:100]') 138 g.title(plottitle) 139 g('set yrange [50:100]') 140 # erase axis 141 g('set xrange [%f:%f]' % (self.xmin,self.xmax)) #(self.xmax - (self.xmax-self.xmin)*5./4.,self.xmax)) 141 142 #g.plot(*d) 143 g('set border 3') 144 g('set xtics nomirror') 145 g('set ytics nomirror') 146 g('set key bottom') 142 147 if multiplot: 143 148 g('set multiplot') … … 146 151 g('set size 1,%f' % ( 1.0/float(len(d)) ) ) 147 152 g('set origin 0,%f' % ( 1.0*float(len(d)-i-1)/float(len(d)) ) ) 148 # erase axis 149 g('set border 3') 150 g('set xtics nomirror') 151 g('set ytics nomirror') 152 g('set key left top') 153 #g.ylabel('%Correct detections') 153 154 g('set xrange [%f:%f]' % (self.xmin,self.xmax)) #(self.xmax - (self.xmax-self.xmin)*5./4.,self.xmax)) 154 #g.ylabel('%Correct detections')155 if i == len(d)-1:156 g.xlabel(plottitle)157 155 g.plot(*d[i]) 158 156 g('unset title') … … 169 167 for each in sys.argv[3:-1]: print each 170 168 modes = ['schmitt', 'yin', 'yinfft', 'mcomb', 'fcomb'] 169 #modes = ['mcomb'] 171 170 172 171 params = taskparams() 173 params.bufsize = 2048 # 4096172 params.bufsize = 2048 # 4096 174 173 params.hopsize = 256 175 params.silence = - 70.174 params.silence = -60. 176 175 params.pitchsmooth = 0 177 176 params.pitchmax = 20000
Note: See TracChangeset
for help on using the changeset viewer.