add Makefile for bench-onset
authorPaul Brossier <piem@altern.org>
Fri, 17 Feb 2006 17:34:35 +0000 (17:34 +0000)
committerPaul Brossier <piem@altern.org>
Fri, 17 Feb 2006 17:34:35 +0000 (17:34 +0000)
add Makefile for bench-onset

configure.ac
python/test/bench/onset/Makefile.am [new file with mode: 0644]
python/test/bench/onset/bench-onset

index 005fdc9ae527ce3b0668c1e13121aac5dda58ed4..2cce6463c4b655b264dbd9bfa0a8b5ab2b9d9cd4 100644 (file)
@@ -229,6 +229,7 @@ AC_OUTPUT([
                plugins/audacity/plug-ins/Makefile
                plugins/wavesurfer/Makefile
                 plugins/puredata/Makefile
+                python/test/bench/onset/Makefile
                 doc/Makefile
        ])
 
diff --git a/python/test/bench/onset/Makefile.am b/python/test/bench/onset/Makefile.am
new file mode 100644 (file)
index 0000000..0720deb
--- /dev/null
@@ -0,0 +1,23 @@
+export BASEDIR=../../../..
+export PYTHONPATH=$(BASEDIR)/python
+export LD_LIBRARY_PATH=$(BASEDIR)/src/.libs:$(BASEDIR)/ext/.libs
+
+SOURCE = \
+       /archives/samples/DB/PercussivePhrases/CM18/Samba_Audio \
+       /var/tmp/Onset-Mirex2005/poly_pitched \
+       /var/tmp/Onset-Mirex2005/solo_bars_and_bells \
+       /var/tmp/Onset-Mirex2005/solo_brass \
+       /var/tmp/Onset-Mirex2005/solo_drums \
+       /var/tmp/Onset-Mirex2005/solo_plucked_strings \
+       /var/tmp/Onset-Mirex2005/solo_singing_voice \
+       /var/tmp/Onset-Mirex2005/solo_sustained_strings \
+       /var/tmp/Onset-Mirex2005/solo_winds \
+       /var/tmp/Onset-Mirex2005/complex \
+       /var/tmp/Onset-Mirex2005
+
+test-aubiocut:         $(patsubst %, %.aubiocut, $(SOURCE))
+
+%.aubiocut: %
+       rm -f `basename $<`.aubiocut
+       ./bench-onset $< | tee `basename $<`.aubiocut
+       diff `basename $<`.aubiocut.ref `basename $<`.aubiocut
index a3b1b7cddd29db55794e85218ae05271bf2ade16..96303afb68c7954d4fb3f8ac233669078fc260c2 100755 (executable)
@@ -63,6 +63,8 @@ class benchonset(bench):
                self.v['aTfn']      = totalfn/N
                self.v['aTm']       = sum(self.v['Tm'])/N
                self.v['aTd']       = sum(self.v['Td'])/N
+               self.v['Tm']       = sum(self.v['Tm'])
+               self.v['Td']       = sum(self.v['Td'])
                self.v['mean']      = mmean(self.v['l'])
                self.v['smean']     = stdev(self.v['l'])
                self.v['amean']     = mmean(self.v['labs'])