History

update to last bench-onset, bench-pitch update to last bench-onset, bench-pitch

Paul Brossier committed 20 years ago

Commit cafb00a1 parent 30430813 files · +24 −9Browse files

Showing the changes to python (3 of 3 files). Show all

Unified · Split

3 files
  1. python/test/bench/onset/bench-onset +7 −5
  2. python/test/bench/pitch/Makefile.am +10 −2
  3. python/test/bench/pitch/bench-pitch +7 −2
python/test/bench/onset/bench-onset+7−5
@@ -15,11 +15,6 @@ class mybenchonset(benchonset): · 14 unmodified lines
15 self.vlist = []15 self.vlist = []
16 self.params.onsetmode = mode16 self.params.onsetmode = mode
17 #self.params.localmin = True17 #self.params.localmin = True
18 self.params.delay = 2.
19 self.params.bufsize = 1024
20 self.params.hopsize = 256
21 self.params.step = float(self.params.hopsize)/float(self.params.samplerate)
22 #self.params.mintol = 8.
23 18
24 for threshold in self.thresholds:19 for threshold in self.thresholds:
25 self.params.threshold = threshold20 self.params.threshold = threshold
@@ -56,6 +51,13 @@ if __name__ == "__main__": · 30 unmodified lines
56 51
57 benchonset = mybenchonset(datapath,respath,checkres=True,checkanno=True)52 benchonset = mybenchonset(datapath,respath,checkres=True,checkanno=True)
58 benchonset.params = taskparams()53 benchonset.params = taskparams()
54 benchonset.params.dcthreshold = -1.
55 benchonset.params.silence = -100.
56 benchonset.params.delay = 3.
57 benchonset.params.bufsize = 1024
58 benchonset.params.hopsize = 256
59 benchonset.params.step = float(benchonset.params.hopsize)/float(benchonset.params.samplerate)
60 benchonset.params.mintol = 4.1
59 benchonset.task = taskonset61 benchonset.task = taskonset
60 benchonset.valuesdict = {}62 benchonset.valuesdict = {}
61 63
python/test/bench/pitch/Makefile.am+10−2
@@ -3,11 +3,19 @@ export PYTHONPATH=$(BASEDIR)/python · 2 unmodified lines
3export LD_LIBRARY_PATH=$(BASEDIR)/src/.libs:$(BASEDIR)/ext/.libs3export LD_LIBRARY_PATH=$(BASEDIR)/src/.libs:$(BASEDIR)/ext/.libs
4 4
5SOURCE = \5SOURCE = \
6 /var/tmp/pitch \6 $(HOME)/archives/samples/pitch/isolated/piano/011pfnof \
7 $(HOME)/archives/samples/pitch/isolated7 $(HOME)/archives/samples/pitch/isolated/rhodes/021epnof \
8 $(HOME)/archives/samples/pitch/isolated/harpsichord/031hcsim \
9 $(HOME)/archives/samples/pitch/isolated/vibraphone/041vihnf
8 10
9test-aubiopitch: $(patsubst %, %.aubiopitch, $(SOURCE))11test-aubiopitch: $(patsubst %, %.aubiopitch, $(SOURCE))
10 12
13plotpitch:
14 ../../../aubiopitch -m mcomb,fcomb,yin,schmitt -i $(HOME)/archives/samples/pitch/isolated/piano/011pfnof/011pfnof.69.wav -O 011pfnof.69.ps
15 ../../../aubiopitch -m mcomb,fcomb,yin,schmitt -i $(HOME)/archives/samples/pitch/isolated/rhodes/021epnof/021epnof.69.wav -O 021epnof.69.ps
16 ../../../aubiopitch -m mcomb,fcomb,yin,schmitt -i $(HOME)/archives/samples/pitch/isolated/harpsichord/031hcsim/031hcsim.69.wav -O 031hcsim.69.ps
17 ../../../aubiopitch -m mcomb,fcomb,yin,schmitt -i $(HOME)/archives/samples/pitch/isolated/vibraphone/041vihnf/041vihnf.69.wav -O 041vihnf.69.ps
18
11%.aubiopitch: %19%.aubiopitch: %
12 rm -f `basename $@`20 rm -f `basename $@`
13 ./bench-pitch $< #| tee `basename $@`21 ./bench-pitch $< #| tee `basename $@`
python/test/bench/pitch/bench-pitch+7−2
@@ -79,7 +79,10 @@ class benchpitch(bench): · 78 unmodified lines
79 g('orig(x) = beta*x')79 g('orig(x) = beta*x')
80 g.xlabel('original pitch (Hz)')80 g.xlabel('original pitch (Hz)')
81 g.ylabel('detected pitch (Hz)')81 g.ylabel('detected pitch (Hz)')
82 g('set key left top')
82 g('set log xy')83 g('set log xy')
84 g('set xrange [50:2000]')
85 g('set yrange [50:2000]')
83 g.plot(*d)86 g.plot(*d)
84 87
85 88
@@ -93,8 +96,10 @@ if __name__ == "__main__": · 7 unmodified lines
93 #modes = ['fcomb']96 #modes = ['fcomb']
94 97
95 params = taskparams()98 params = taskparams()
96 params.bufsize = 204899 params.bufsize = 4096
97 params.hopsize = params.bufsize/2100 params.hopsize = params.bufsize/4
101 params.silence = -1000.
102 params.pitchsmooth = 50
98 benchpitch = benchpitch(datapath,params=params)103 benchpitch = benchpitch(datapath,params=params)
99 benchpitch.task = taskpitch104 benchpitch.task = taskpitch
100 105

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t