Changeset 6ae3a77 for python/test/bench/onset/bench-window
- Timestamp:
- Feb 23, 2006, 3:23:30 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:
- ee7b9da
- Parents:
- a12563ea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/test/bench/onset/bench-window
ra12563ea r6ae3a77 3 3 from aubio.tasks import * 4 4 5 from benchonset import mmean, stdev, plotdiffs, plotplotdiffs,benchonset5 from benchonset import mmean, stdev, benchonset 6 6 7 7 class mybenchonset(benchonset): … … 11 11 self.thresholds = thresholds 12 12 self.pretty_titles() 13 13 14 for mode in modes: 14 15 15 16 self.params.onsetmode = mode 17 self.params.localmin = True 18 self.params.delay = 1. 16 19 self.params.threshold = thresholds[0] 17 20 self.params.localmin = False 18 21 # 19 22 for delay in (0., 4.): 20 23 d = [] 21 outplot = "_-_".join(("window",mode,"delay-%s" % delay,22 basename(self.datadir) ))23 24 self.params.delay = delay 24 25 25 for buf in (2048, 1024, 512): 26 26 for hop in (buf/2, buf/4): … … 28 28 self.params.hopsize = hop 29 29 self.params.step = float(self.params.hopsize)/float(self.params.samplerate) 30 31 self.dir_exec() 32 self.dir_eval() 33 self.pretty_print() 34 plotdiffs(self.v,d,plottitle="%s %s" % (buf,hop)) 35 36 plotplotdiffs(d) 37 plotplotdiffs(d,outplot=outplot,extension="png") 38 plotplotdiffs(d,outplot=outplot,extension="ps") 39 plotplotdiffs(d,outplot=outplot,extension="svg") 40 30 self.dir_eval_print() 31 self.plotdiffs(d,plottitle="%s %s" % (buf,hop)) 32 #plotplotdiffs(d) 33 outplot = "_-_".join(("window",mode,"delay-%s" % int(delay), 34 basename(self.datadir) )) 35 for ext in ("png","svg","ps"): 36 self.plotplotdiffs(d,outplot=outplot,extension=ext) 41 37 42 38 if __name__ == "__main__": … … 44 40 if len(sys.argv) > 1: datapath = sys.argv[1] 45 41 else: print "ERR: a path is required"; sys.exit(1) 46 modes = ['complex', 'energy', 'phase', ' specdiff', 'kl', 'mkl', 'dual']47 # modes = [ 'complex']48 thresholds = [ 0.5]49 #thresholds = [1.5]42 modes = ['complex', 'energy', 'phase', 'hfc', 'specdiff', 'kl', 'mkl', 'dual'] 43 #thresholds = [ 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2] 44 #modes = [ 'hfc' ] 45 thresholds = [0.5] 50 46 51 47 #datapath = "%s%s" % (DATADIR,'/onset/DB/*/')
Note: See TracChangeset
for help on using the changeset viewer.