update to last bench-onset, bench-pitch
authorPaul Brossier <piem@altern.org>
Fri, 3 Mar 2006 05:39:21 +0000 (05:39 +0000)
committerPaul Brossier <piem@altern.org>
Fri, 3 Mar 2006 05:39:21 +0000 (05:39 +0000)
update to last bench-onset, bench-pitch

python/test/bench/onset/bench-onset
python/test/bench/pitch/Makefile.am
python/test/bench/pitch/bench-pitch

index 7fdf89d..9edc866 100755 (executable)
@@ -15,11 +15,6 @@ class mybenchonset(benchonset):
                        self.vlist = []
                        self.params.onsetmode = mode
                        #self.params.localmin = True
-                       self.params.delay = 2. 
-                       self.params.bufsize = 1024 
-                       self.params.hopsize = 256
-                       self.params.step = float(self.params.hopsize)/float(self.params.samplerate)
-                       #self.params.mintol = 8. 
 
                        for threshold in self.thresholds:
                                self.params.threshold = threshold
@@ -56,6 +51,13 @@ if __name__ == "__main__":
 
        benchonset = mybenchonset(datapath,respath,checkres=True,checkanno=True)
        benchonset.params = taskparams()
+       benchonset.params.dcthreshold = -1.
+       benchonset.params.silence = -100.
+       benchonset.params.delay = 3. 
+       benchonset.params.bufsize = 1024 
+       benchonset.params.hopsize = 256 
+       benchonset.params.step = float(benchonset.params.hopsize)/float(benchonset.params.samplerate)
+       benchonset.params.mintol = 4.1 
        benchonset.task = taskonset
        benchonset.valuesdict = {}
 
index 656e892..453a4a2 100644 (file)
@@ -3,11 +3,19 @@ export PYTHONPATH=$(BASEDIR)/python
 export LD_LIBRARY_PATH=$(BASEDIR)/src/.libs:$(BASEDIR)/ext/.libs
 
 SOURCE = \
-       /var/tmp/pitch \
-       $(HOME)/archives/samples/pitch/isolated
+       $(HOME)/archives/samples/pitch/isolated/piano/011pfnof \
+       $(HOME)/archives/samples/pitch/isolated/rhodes/021epnof \
+       $(HOME)/archives/samples/pitch/isolated/harpsichord/031hcsim \
+       $(HOME)/archives/samples/pitch/isolated/vibraphone/041vihnf
 
 test-aubiopitch:         $(patsubst %, %.aubiopitch, $(SOURCE))
 
+plotpitch:
+       ../../../aubiopitch -m mcomb,fcomb,yin,schmitt -i $(HOME)/archives/samples/pitch/isolated/piano/011pfnof/011pfnof.69.wav -O 011pfnof.69.ps
+       ../../../aubiopitch -m mcomb,fcomb,yin,schmitt -i $(HOME)/archives/samples/pitch/isolated/rhodes/021epnof/021epnof.69.wav -O 021epnof.69.ps
+       ../../../aubiopitch -m mcomb,fcomb,yin,schmitt -i $(HOME)/archives/samples/pitch/isolated/harpsichord/031hcsim/031hcsim.69.wav -O 031hcsim.69.ps
+       ../../../aubiopitch -m mcomb,fcomb,yin,schmitt -i $(HOME)/archives/samples/pitch/isolated/vibraphone/041vihnf/041vihnf.69.wav -O 041vihnf.69.ps
+
 %.aubiopitch: %
        rm -f `basename $@`
        ./bench-pitch $< #| tee `basename $@`
index dc84160..a0a31a0 100755 (executable)
@@ -79,7 +79,10 @@ class benchpitch(bench):
                g('orig(x) = beta*x')
                g.xlabel('original pitch (Hz)')
                g.ylabel('detected pitch (Hz)')
+               g('set key left top')
                g('set log xy')
+               g('set xrange [50:2000]')
+               g('set yrange [50:2000]')
                g.plot(*d)
 
 
@@ -93,8 +96,10 @@ if __name__ == "__main__":
        #modes = ['fcomb']
 
        params = taskparams()
-       params.bufsize = 2048
-       params.hopsize = params.bufsize/2
+       params.bufsize = 4096 
+       params.hopsize = params.bufsize/4
+       params.silence = -1000.
+       params.pitchsmooth = 50
        benchpitch = benchpitch(datapath,params=params)
        benchpitch.task = taskpitch