shithub: aubio

Download patch

ref: d998190e422036f80ffb1dac9c5ba1a16ed4bb51
parent: c912c67ccd0dd420833c8e063fe084f3e59bb85a
author: Paul Brossier <piem@altern.org>
date: Fri Feb 17 12:34:35 EST 2006

add Makefile for bench-onset
add Makefile for bench-onset


--- a/configure.ac
+++ b/configure.ac
@@ -229,6 +229,7 @@
 		plugins/audacity/plug-ins/Makefile
 		plugins/wavesurfer/Makefile
                 plugins/puredata/Makefile
+                python/test/bench/onset/Makefile
                 doc/Makefile
 	])
 
--- /dev/null
+++ b/python/test/bench/onset/Makefile.am
@@ -1,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
--- a/python/test/bench/onset/bench-onset
+++ b/python/test/bench/onset/bench-onset
@@ -63,6 +63,8 @@
 		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'])