Index: python/Makefile.am
===================================================================
--- python/Makefile.am	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/Makefile.am	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,5 @@
+EXTRA_DIST = README aubiocompare-onset aubioplot-notes aubiocut\
+	aubiofilter-notes aubionotes aubioonset aubiopitch
+
+SUBDIRS = aubio
+bin_SCRIPTS = aubiocut aubiocompare-onset 
Index: python/Makefile.in
===================================================================
--- python/Makefile.in	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/Makefile.in	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,480 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FFTWLIB_CFLAGS = @FFTWLIB_CFLAGS@
+FFTWLIB_LIBS = @FFTWLIB_LIBS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+LADCCA_CFLAGS = @LADCCA_CFLAGS@
+LADCCA_LIBS = @LADCCA_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@
+SAMPLERATE_LIBS = @SAMPLERATE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNDLIB_CFLAGS = @SNDLIB_CFLAGS@
+SNDLIB_LIBS = @SNDLIB_LIBS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+EXTRA_DIST = README aubiocompare-onset aubioplot-notes aubiocut\
+	aubiofilter-notes aubionotes aubioonset aubiopitch
+
+
+SUBDIRS = aubio
+bin_SCRIPTS = aubiocut aubiocompare-onset 
+subdir = python
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SCRIPTS = $(bin_SCRIPTS)
+
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+	ps-recursive install-info-recursive uninstall-info-recursive \
+	all-recursive install-data-recursive install-exec-recursive \
+	installdirs-recursive install-recursive uninstall-recursive \
+	check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  python/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f $$d$$p; then \
+	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	    echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
+	    $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
+	  else :; fi; \
+	done
+
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	else \
+	  include_option=--include; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS)
+installdirs: installdirs-recursive
+installdirs-am:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+	clean-generic clean-libtool clean-recursive ctags \
+	ctags-recursive distclean distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am \
+	dvi-recursive info info-am info-recursive install install-am \
+	install-binSCRIPTS install-data install-data-am \
+	install-data-recursive install-exec install-exec-am \
+	install-exec-recursive install-info install-info-am \
+	install-info-recursive install-man install-recursive \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am installdirs-recursive maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+	pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \
+	tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \
+	uninstall-info-am uninstall-info-recursive uninstall-recursive
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: python/README
===================================================================
--- python/README	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/README	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,5 @@
+Here you will find some examples of python scripts and some evaluation
+routines. The python interface for libaubio is generated using Swig.
+
+To have it working before installation, set LD_LIBRARY_PATH as:
+LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:../src/.libs
Index: python/aubio/Makefile.am
===================================================================
--- python/aubio/Makefile.am	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubio/Makefile.am	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,9 @@
+EXTRA_DIST = __init__.py onsetcompare.py aubioclass.py gnuplot.py\
+	median.py txtfile.py
+
+pkgpython_PYTHON = __init__.py onsetcompare.py\
+	gnuplot.py median.py txtfile.py aubioclass.py
+
+clean:
+	rm -f *.pyc
+
Index: python/aubio/Makefile.in
===================================================================
--- python/aubio/Makefile.in	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubio/Makefile.in	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,338 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FFTWLIB_CFLAGS = @FFTWLIB_CFLAGS@
+FFTWLIB_LIBS = @FFTWLIB_LIBS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+LADCCA_CFLAGS = @LADCCA_CFLAGS@
+LADCCA_LIBS = @LADCCA_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@
+SAMPLERATE_LIBS = @SAMPLERATE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNDLIB_CFLAGS = @SNDLIB_CFLAGS@
+SNDLIB_LIBS = @SNDLIB_LIBS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+EXTRA_DIST = __init__.py onsetcompare.py aubioclass.py gnuplot.py\
+	median.py txtfile.py
+
+
+pkgpython_PYTHON = __init__.py onsetcompare.py\
+	gnuplot.py median.py txtfile.py aubioclass.py
+
+subdir = python/aubio
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+py_compile = $(top_srcdir)/py-compile
+DIST_COMMON = $(pkgpython_PYTHON) $(srcdir)/Makefile.in Makefile.am
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  python/aubio/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+pkgpythonPYTHON_INSTALL = $(INSTALL_DATA)
+install-pkgpythonPYTHON: $(pkgpython_PYTHON)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(pkgpythondir)
+	@list='$(pkgpython_PYTHON)'; dlist=''; for p in $$list; do\
+	  if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+	  if test -f $$b$$p; then \
+	    d=`echo "$$p" | sed -e 's,^.*/,,'`; \
+	    dlist="$$dlist $$d"; \
+	    echo " $(pkgpythonPYTHON_INSTALL) $$b$$p $(DESTDIR)$(pkgpythondir)/$$d"; \
+	    $(pkgpythonPYTHON_INSTALL) $$b$$p $(DESTDIR)$(pkgpythondir)/$$d; \
+	  else :; fi; \
+	done; \
+	PYTHON=$(PYTHON) $(py_compile) --basedir $(DESTDIR)$(pkgpythondir) $$dlist
+
+uninstall-pkgpythonPYTHON:
+	@$(NORMAL_UNINSTALL)
+	list='$(pkgpython_PYTHON)'; for p in $$list; do \
+	  d=`echo "$$p" | sed -e 's,^.*/,,'`; \
+	  rm -f $(DESTDIR)$(pkgpythondir)/$$d; \
+	  rm -f $(DESTDIR)$(pkgpythondir)/$${d}c; \
+	  rm -f $(DESTDIR)$(pkgpythondir)/$${d}o; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(pkgpythondir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgpythonPYTHON
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-pkgpythonPYTHON
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-pkgpythonPYTHON \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am uninstall-info-am \
+	uninstall-pkgpythonPYTHON
+
+
+clean:
+	rm -f *.pyc
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: python/aubio/__init__.py
===================================================================
--- python/aubio/__init__.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubio/__init__.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,27 @@
+"""Copyright (C) 2004 Paul Brossier <piem@altern.org>
+print aubio.__LICENSE__ for the terms of use
+"""
+
+__LICENSE__ = """\
+     Copyright (C) 2004 Paul Brossier <piem@altern.org>
+
+     This program is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published by
+     the Free Software Foundation; either version 2 of the License, or
+     (at your option) any later version.
+
+     This program is distributed in the hope that it will be useful,
+     but WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+     GNU General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with this program; if not, write to the Free Software
+     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+"""            
+
+#from aubioclass import *
+#from onsetcompare import *
+#from median import *
+#from noteroc import *
+#from txtfile import *
Index: python/aubio/aubioclass.py
===================================================================
--- python/aubio/aubioclass.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubio/aubioclass.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,110 @@
+from aubiowrapper import *
+
+class fvec:
+    def __init__(self,size,chan):
+        self.vec = new_fvec(size,chan)
+    def __call__(self):
+        return self.vec
+    def __del__(self):
+        del_fvec(self())
+    def get(self,pos,chan):
+        return fvec_read_sample(self(),chan,pos)
+    def set(self,value,pos,chan):
+        return fvec_write_sample(self(),value,chan,pos)
+    def channel(self,chan):
+        return fvec_get_channel(self(),chan)
+    def data(self):
+        return fvec_get_data(self())
+
+class cvec:
+    def __init__(self,size,chan):
+        self.vec = new_cvec(size,chan)
+    def __call__(self):
+        return self.vec
+    def __del__(self):
+        del_cvec(self())
+
+class sndfile:
+    def __init__(self,filename,model=None):
+        if (model!=None):
+            self.file = new_file_wo(model.file,filename)
+        else:
+            self.file = new_file_ro(filename)
+    def __del__(self):
+        del_file(self.file)
+    def info(self):
+        file_info(self.file)
+    def samplerate(self):
+        return aubio_file_samplerate(self.file)
+    def channels(self):
+        return aubio_file_channels(self.file)
+    def read(self,nfram,vecread):
+        return file_read(self.file,nfram,vecread())
+    def write(self,nfram,vecwrite):
+        return file_write(self.file,nfram,vecwrite())
+
+class pvoc:
+    def __init__(self,buf,hop,chan):
+        self.pv = new_aubio_pvoc(buf,hop,chan)
+    def __del__(self):
+        del_aubio_pvoc(self.pv)
+    def do(self,tf,tc):
+        aubio_pvoc_do(self.pv,tf(),tc())
+    def rdo(self,tc,tf):
+        aubio_pvoc_rdo(self.pv,tc(),tf())
+
+class onsetdetection:
+    def __init__(self,type,buf,chan):
+        self.od = new_aubio_onsetdetection(type,buf,chan)
+    def do(self,tc,tf):
+        aubio_onsetdetection(self.od,tc(),tf())
+    def __del__(self):
+        aubio_onsetdetection_free(self.od)
+
+class peakpick:
+    def __init__(self,threshold=0.1):
+        self.pp = new_aubio_peakpicker(threshold)
+    def do(self,fv):
+        return aubio_peakpick_pimrt(fv(),self.pp)
+    def __del__(self):
+        del_aubio_peakpicker(self.pp)
+
+class onsetpick:
+    def __init__(self,bufsize,hopsize,channels,myvec,threshold):
+        self.myfft    = cvec(bufsize,channels)
+        self.pv       = pvoc(bufsize,hopsize,channels)
+        self.myod     = onsetdetection(hfc,bufsize,channels)
+        self.myod2    = onsetdetection(complexdomain,bufsize,channels)
+        self.myonset  = fvec(1,channels)
+        self.myonset2 = fvec(1,channels)
+        self.pp       = peakpick(float(threshold))
+
+    def do(self,myvec): 
+        self.pv.do(myvec,self.myfft)
+        self.myod.do(self.myfft,self.myonset)
+        self.myod2.do(self.myfft,self.myonset2)
+        self.myonset.set(self.myonset.get(0,0)*self.myonset2.get(0,0),0,0)
+        return self.pp.do(self.myonset),self.myonset.get(0,0)
+
+class pitchpick:
+    def __init__(self,bufsize,hopsize,channels,myvec,srate):
+        self.myfft    = cvec(bufsize,channels)
+        self.pv       = pvoc(bufsize,hopsize,channels)
+        self.pitchp   = new_aubio_pitchmcomb(bufsize,channels)
+        self.filt     = filter(srate,"adsgn")
+
+    def do(self,myvec): 
+        #self.filt.do(myvec)
+        #self.filt.do(myvec)
+        self.pv.do(myvec,self.myfft)
+        return aubio_pitchmcomb_detect(self.pitchp,self.myfft())
+
+class filter:
+    def __init__(self,srate,type=None):
+        if (type=="adsgn"):
+            self.filter = new_aubio_adsgn_filter(srate)
+    def __del__(self):
+        #del_aubio_filter(self.filter)
+        pass
+    def do(self,myvec):
+        aubio_filter_do(self.filter,myvec())
Index: python/aubio/gnuplot.py
===================================================================
--- python/aubio/gnuplot.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubio/gnuplot.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,103 @@
+"""Copyright (C) 2004 Paul Brossier <piem@altern.org>
+print aubio.__LICENSE__ for the terms of use
+"""
+
+__LICENSE__ = """\
+	 Copyright (C) 2004 Paul Brossier <piem@altern.org>
+
+	 This program is free software; you can redistribute it and/or modify
+	 it under the terms of the GNU General Public License as published by
+	 the Free Software Foundation; either version 2 of the License, or
+	 (at your option) any later version.
+
+	 This program is distributed in the hope that it will be useful,
+	 but WITHOUT ANY WARRANTY; without even the implied warranty of
+	 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+	 GNU General Public License for more details.
+
+	 You should have received a copy of the GNU General Public License
+	 along with this program; if not, write to the Free Software
+	 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+"""            
+
+__notesheight = 0.25
+
+
+from numarray import *
+import Gnuplot, Gnuplot.funcutils
+
+def plotnote(la,title=None) :
+        if la[0,:].size() == 3:
+                d = plotnote_withends(la, plot_title=title)
+        else: 
+            # scale data if in freq (for REF.txt files)
+            if max(la[:,1] > 128 ):
+                print "scaling frequency data to midi range"
+                la[:,1] /= 6.875
+                la[:,1] = log(la[:,1])/0.6931
+                la[:,1] *= 12
+                la[:,1] -= 3
+            d = plotnote_withoutends(la, plot_title=title)
+        return d
+
+def plotnote_multi(lalist,title=None,fileout=None) :
+        d=list()
+        for i in range(len(lalist)):
+            d.append(plotnote(lalist[i], title=title))
+        return d
+       
+
+def plotnote_withends(la,plot_title=None) :
+        d=[]
+
+        x_widths = array(la[:,1]-la[:,0])/2.
+
+        d.append(Gnuplot.Data(
+                la[:,0]+x_widths,               # x centers
+                la[:,2],                        # y centers
+                x_widths,                       # x errors
+                __notesheight*ones(len(la)      # y errors
+                ),
+                title=plot_title,with=('boxxyerrorbars fs 3')))
+
+        return d
+
+
+def plotnote_withoutends(la,plot_title=None) :
+        """ bug: fails drawing last note """
+        d=[]
+
+        x_widths = array(la[1:,0]-la[:-1,0])/2;
+
+        d.append(Gnuplot.Data(
+                la[:-1,0]+x_widths,             # x centers
+                la[:-1,1],                      # y centers
+                x_widths,                       # x errors
+                __notesheight*ones(len(la)-1    # y errors
+                ), 
+                title=plot_title,with=('boxxyerrorbars fs 3')))
+
+        return d
+
+def plotnote_do(d,fileout=None):
+    g = Gnuplot.Gnuplot(debug=1, persist=1)
+    g.gnuplot('set style fill solid border 1; \
+    set size ratio 1/6; \
+    set boxwidth 0.9 relative; \
+    set mxtics 2.5; \
+    set mytics 2.5; \
+    set xtics 5; \
+    set ytics 1; \
+    set grid xtics ytics mxtics mytics')
+
+    g.xlabel('Time (s)')
+    g.ylabel('Midi pitch')
+    # do the plot
+    #g.gnuplot('set multiplot')
+    #for i in d:
+    g.plot(d[0])
+    #g.gnuplot('set nomultiplot') 
+    if fileout != None:
+        g.hardcopy(fileout, enhanced=1, color=0)
+
+
Index: python/aubio/median.py
===================================================================
--- python/aubio/median.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubio/median.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,65 @@
+"""Copyright (C) 2004 Paul Brossier <piem@altern.org>
+print aubio.__LICENSE__ for the terms of use
+"""
+
+__LICENSE__ = """\
+	 Copyright (C) 2004 Paul Brossier <piem@altern.org> 
+	 	
+	 This program is free software; you can redistribute it and/or modify
+	 it under the terms of the GNU General Public License as published by
+	 the Free Software Foundation; either version 2 of the License, or
+	 (at your option) any later version.
+
+	 This program is distributed in the hope that it will be useful,
+	 but WITHOUT ANY WARRANTY; without even the implied warranty of
+	 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+	 GNU General Public License for more details.
+
+	 You should have received a copy of the GNU General Public License
+	 along with this program; if not, write to the Free Software
+	 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+"""            
+
+""" 
+original author Tim Peters
+modified by Paul Brossier <piem@altern.org>
+inspired from http://www.ics.uci.edu/~eppstein/161/python/peters-selection.py
+"""
+
+def short_find(a, rank):
+    a.sort()
+    return a[rank - 1]
+
+# Find the rank'th-smallest value in a, in worst-case linear time.
+def percental(a, rank):
+    n = len(a)
+    assert 1 <= rank <= n
+    if n <= 7:
+        return short_find(a, rank)
+
+    ## Find median of median-of-7's.
+    ##medians = [short_find(a[i : i+7], 4) for i in xrange(0, n-6, 7)]
+    #median = find(medians, (len(medians) + 1) // 2)
+    
+    # modified to Find median
+    median = short_find([a[0], a[-1], a[n//2]], 2)
+
+    # Partition around the median.
+    # a[:i]   <= median
+    # a[j+1:] >= median
+    i, j = 0, n-1
+    while i <= j:
+        while a[i] < median:
+            i += 1
+        while a[j] > median:
+            j -= 1
+        if i <= j:
+            a[i], a[j] = a[j], a[i]
+            i += 1
+            j -= 1
+
+    if rank <= i:
+        return percental(a[:i], rank)
+    else:
+        return percental(a[i:], rank - i)
+
Index: python/aubio/onsetcompare.py
===================================================================
--- python/aubio/onsetcompare.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubio/onsetcompare.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,119 @@
+"""Copyright (C) 2004 Paul Brossier <piem@altern.org>
+print aubio.__LICENSE__ for the terms of use
+"""
+
+__LICENSE__ = """\
+     Copyright (C) 2004 Paul Brossier <piem@altern.org>
+
+     This program is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published by
+     the Free Software Foundation; either version 2 of the License, or
+     (at your option) any later version.
+
+     This program is distributed in the hope that it will be useful,
+     but WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+     GNU General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with this program; if not, write to the Free Software
+     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+"""            
+
+""" this file contains routines to compare two lists of onsets or notes.
+it somewhat implements the Receiver Operating Statistic (ROC).
+see http://en.wikipedia.org/wiki/Receiver_operating_characteristic
+"""
+
+from numarray import *
+
+def onset_roc(la, lb, eps):
+    """ thanks to nicolas wack for the rewrite"""
+    """ compute differences between two lists """
+    """ feature: scalable to huge lists """
+    n, m = len(la), len(lb)
+    if m == 0 :
+        return 0,0,0,n,0
+    missed, bad = 0, 0
+    # find missed ones first
+    for x in la:
+        correspond = 0
+        for y in lb:
+            if abs(x-y) <= eps:
+                correspond += 1
+        if correspond == 0:
+            missed += 1
+    # then look for bad ones
+    for y in lb:
+        correspond = 0
+        for x in la:
+            if abs(x-y) <= eps:
+               correspond += 1
+        if correspond == 0:
+            bad += 1
+    ok    = n - missed
+    hits  = m - bad
+    total = n
+    return ok,bad,missed,total,hits
+    
+    
+def notes_roc (la, lb, eps):
+    """ creates a matrix of size len(la)*len(lb) then look for hit and miss
+    in it within eps tolerance windows """
+    gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0
+    m = len(la)
+    n = len(lb)
+    x =           resize(la[:,0],(n,m))
+    y = transpose(resize(lb[:,0],(m,n)))
+    teps =  (abs(x-y) <= eps[0]) 
+    x =           resize(la[:,1],(n,m))
+    y = transpose(resize(lb[:,1],(m,n)))
+    tpitc = (abs(x-y) <= eps[1]) 
+    res = teps * tpitc
+    res = add.reduce(res,axis=0)
+    for i in range(len(res)) :
+        if res[i] > 1:
+            gdn+=1
+            fdo+=res[i]-1
+        elif res [i] == 1:
+            gdn+=1
+    fpa = n - gdn - fpa
+    return gdn,fpw,fpg,fpa,fdo,fdp
+
+def load_onsets(filename) :
+    """ load onsets targets / candidates files in arrays """
+    l = [];
+    
+    f = open(filename,'ro')
+    while 1:
+        line = f.readline().split()
+        if not line : break
+        l.append(float(line[0]))
+    
+    return l
+
+"""
+def onset_roc (la, lb, eps):
+    \"\"\" build a matrix of all possible differences between two lists \"\"\"
+    \"\"\" bug: not scalable to huge lists \"\"\"
+        n, m        = len(la), len(lb)
+    if m ==0 :
+        return 0,0,0,n,0
+        missed, bad = 0, 0
+        x           = resize(la[:],(m,n))
+        y           = transpose(resize(lb[:],(n,m)))
+        teps        = (abs(x-y) <= eps)
+        resmis      = add.reduce(teps,axis = 0)
+        for i in range(n) :
+        if resmis[i] == 0:
+            missed += 1
+    resbad = add.reduce(teps,axis=1)
+    for i in range(m) : 
+        if resbad[i] == 0:
+            bad += 1
+    ok    = n - missed
+    hits  = m - bad
+    total = n
+    return ok,bad,missed,total,hits
+"""
+
Index: python/aubio/txtfile.py
===================================================================
--- python/aubio/txtfile.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubio/txtfile.py	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,42 @@
+"""Copyright (C) 2004 Paul Brossier <piem@altern.org>
+print aubio.__LICENSE__ for the terms of use
+"""
+
+__LICENSE__ = """\
+     Copyright (C) 2004 Paul Brossier <piem@altern.org>
+
+     This program is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published by
+     the Free Software Foundation; either version 2 of the License, or
+     (at your option) any later version.
+
+     This program is distributed in the hope that it will be useful,
+     but WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+     GNU General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with this program; if not, write to the Free Software
+     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+"""            
+
+def read_datafile(filename,depth=-1):
+    """read list data from a text file (columns of float)"""
+    fres = open(filename,'ro')
+    l = []
+    while 1:
+        tmp = fres.readline()
+        if not tmp : break
+        else: tmp = tmp.split()
+        if depth > 0:
+            for i in range(min(depth,len(tmp))):
+                tmp[i] = float(tmp[i])
+            l.append(tmp)
+        elif depth == 0:
+            l.append(float(tmp[0]))
+        else:
+            for i in range(len(tmp)):
+                tmp[i] = float(tmp[i])
+            l.append(tmp)
+    return l
+
Index: python/aubiocompare-onset
===================================================================
--- python/aubiocompare-onset	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubiocompare-onset	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,96 @@
+#! /usr/bin/python
+
+"""Copyright (C) 2004 Paul Brossier <piem@altern.org>
+
+print aubio.__LICENSE__ for the terms of use
+
+or see LICENSE.txt in the numarray installation directory.
+"""
+__LICENSE__ = """\
+	 Copyright (C) 2004 Paul Brossier <piem@altern.org>
+
+	 This program is free software; you can redistribute it and/or modify
+	 it under the terms of the GNU General Public License as published by
+	 the Free Software Foundation; either version 2 of the License, or
+	 (at your option) any later version.
+
+	 This program is distributed in the hope that it will be useful,
+	 but WITHOUT ANY WARRANTY; without even the implied warranty of
+	 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+	 GNU General Public License for more details.
+
+	 You should have received a copy of the GNU General Public License
+	 along with this program; if not, write to the Free Software
+	 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+"""            
+
+
+__HELP__ = """\
+# required arguments
+ -c targetfilename 
+ -o detectfilename 
+(both must be text files with 1 time a line expressed in seconds)
+
+# optional arguments
+ -D <delay>  	delay in seconds
+ -v 		verbose mode
+ -d 		debug mode
+
+# output 
+results:number of correct detections
+        number of incorrect detections
+        number of doubled detections
+        number of total detections
+        number of total targets
+
+# example:
+$ aubioonset-comp -c checked-onsets.txt -o handlab-onsets.txt -v
+( gd fp dd ) tot / real
+( 5 4 0 ) 9 / 9
+55.5555555556 %GD       44.4444444444 %FP       0.0 %OD
+
+# bugs
+does not scale to very long lists
+"""
+
+import sys
+from aubio.onsetcompare import onset_roc
+from aubio.txtfile import read_datafile
+
+# default values
+fileo=None;filec=None;vmode=None;dmode=None;delay=0.
+# default tolerance is 50 ms
+tol = 0.050
+
+while len(sys.argv) >=2:
+    option = sys.argv[1]; del sys.argv[1]
+    if option == '-h': print __HELP__; sys.exit()
+    if option == '-o': fileo = sys.argv[1]; del sys.argv[1]
+    if option == '-c': filec = sys.argv[1]; del sys.argv[1]
+    if option == '-v': vmode = 'verbose'
+    if option == '-d': dmode = 'debug'
+    if option == '-D': delay = float(sys.argv[1]); del sys.argv[1] 
+
+# arguments required
+if (not fileo) or (not filec):
+    print 'wrong set of arguments. use \'-h\' for help' 
+    sys.exit('error: needs at least \'-c targets.txt -o detected.txt\'')
+
+# load files
+ltru, lres = read_datafile(fileo,depth=0),read_datafile(filec,depth=0)
+
+# delay onsets as required with -D
+for i in range(len(lres)):
+    lres[i] = lres[i] + delay
+# compute errors types
+ok, bad, missed, total, hits = onset_roc(ltru,lres,tol)
+
+# print results
+if vmode=='verbose':
+    print '( ok bad missed ) tot / hits \t',
+    print '(', ok, bad, missed, ')', total, '/', hits,
+    print '\t',
+    print 100*float(ok)/(ok+missed), '%GD\t', 
+    print 100*float(bad)/(hits+bad), '%FP\t' 
+else:
+    print ok, bad, missed, total, hits
Index: python/aubiocut
===================================================================
--- python/aubiocut	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubiocut	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,59 @@
+#!/usr/bin/python
+
+""" this file was written by Paul Brossier 
+  it is released under the GNU/GPL license.
+"""
+
+from aubio.aubioclass import *
+import sys
+
+def getonsets(filein,threshold):
+        bufsize   = 1024
+        hopsize   = bufsize/2
+        frameread = 0
+        filei     = sndfile(filein)
+        srate     = filei.samplerate()
+        channels  = filei.channels()
+        myvec     = fvec(hopsize,channels)
+        readsize  = filei.read(hopsize,myvec)
+        opick     = onsetpick(bufsize,hopsize,channels,myvec,threshold)
+        #newname   = "%s%.8f%s" % ("/tmp/",0.0000000,filein[-4:])
+        #fileo     = sndfile(newname,model=filei)
+        mylist    = list()
+        while(readsize==hopsize):
+                readsize = filei.read(hopsize,myvec)
+                isonset,val = opick.do(myvec)
+                if (isonset == 1):
+                    now = (frameread-4)*hopsize/(srate+0.)
+                    #del fileo
+                    #fileo = sndfile("%s%f%s" % ("/tmp/",now,filein[-4:]),model=filei)
+                    mylist.append(now)
+                #writesize = fileo.write(readsize,myoldvec)
+                frameread += 1
+        return mylist
+
+def cutfile(filein,onsets):
+        hopsize   = 512
+        frameread = 0
+        readsize  = hopsize 
+        filei     = sndfile(filein)
+        srate     = filei.samplerate()
+        channels  = filei.channels()
+        newname   = "%s%f%s" % ("/tmp/",0.0000000,filein[-4:])
+        fileo     = sndfile(newname,model=filei)
+        myvec     = fvec(hopsize,channels)
+        while(readsize==hopsize):
+                readsize = filei.read(hopsize,myvec)
+                now = (frameread)*hopsize/(srate+0.)
+                writesize = fileo.write(readsize,myvec)
+                if len(onsets) and now == onsets[0]:
+                    onsets.pop(0)
+                    del fileo
+                    fileo = sndfile("%s%f%s%s" % ("/tmp/",now,".",filein.split(".")[-1]),model=filei)
+                frameread += 1
+        del fileo
+
+filename  = sys.argv[1]
+threshold = sys.argv[2]
+onsets    = getonsets(filename,threshold)
+cutfile(filename,onsets)
Index: python/aubiofilter-notes
===================================================================
--- python/aubiofilter-notes	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubiofilter-notes	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,94 @@
+#!/usr/bin/python
+
+"""  this file is used to get filter the (old) output format of aubionotes """
+
+# default parameters 
+__eps       = [0.250,0.50]      # minimum length, pitch tolerance (ms,midipitch)
+__plot      = 0                 # -P (command line switch)
+__delay     = 0.0               # -D <value> (fixed delay for score alignement)
+__winlength = 10                # -w <value> (window length for pitch estimation in frames)
+
+import getopt
+import sys
+
+def parse_args (sysargs):
+        from getopt import gnu_getopt
+        shortopts ='i:o:t:p:w:D:P:'
+        longopts =('input=','output=','tolpitch=','toltime=','winlength=','delay','plot=')
+        args,tmp = gnu_getopt(sysargs,shortopts,longopts)
+        assert len(args) > 1
+        plot      = __plot
+        delay     = __delay
+        eps       = __eps
+        winlength = __winlength
+        plot = __plot
+        fileout   = '/tmp/testprint.ps'
+        args.sort()
+        for i in range(len(args)):  # a bad way
+                if args[i][0] == '-i' or args[i][0] == '--input':
+                        fileorg =  args[i][1]
+                if args[i][0] == '-o' or args[i][0] == '--output':
+                        fileerr =  args[i][1]
+                if args[i][0] == '-t' or args[i][0] == '--toltime':
+                        eps[0] = float(args[i][1])
+                if args[i][0] == '-p' or args[i][0] == '--tolpitch':
+                        eps[1] = float(args[i][1])
+                if args[i][0] == '-D' or args[i][0] == '--delay':
+                        delay = float(args[i][1])
+                if args[i][0] == '-w' or args[i][0] == '--winlength':
+                        winlength = int(args[i][1])
+                if args[i][0] == '-P' or args[i][0] == '--plot':
+                        plot = 1
+                        fileout = args[i][1]
+        return fileorg,fileerr,eps,winlength,plot,delay,fileout
+
+def usage():
+        print __file__, "with at least some arguments"
+
+def main(): 
+        try:
+                opts,args = getopt.getopt(sys.argv[1:], 
+                        "hvo:i:p:P", 
+                        ["help", "output=", "verbose", "input=", "plot="])
+        except getopt.GetoptError:
+                usage()
+                sys.exit(2)
+
+        input = None
+        output = None
+        verbose = False
+        winlength = __winlength
+        plot = __plot
+        eps = __eps
+
+        for o, a in opts:
+                if o in ("-v", "--verbose"):
+                        verbose = True
+                if o in ("-h", "--help"):
+                        usage()
+                        sys.exit(2)
+                if o in ("--output"):
+                        output = a
+                if o in ("-i", "--input"):
+                        input = a
+                if o in ("-P", "--plot"):
+                        plot = 1
+
+        assert input != None and input != "", "no input file" 
+
+        from aubio import notefilter,txtfile,gnuplot
+        """ load midi and raw data """
+        from numarray import array
+        notelist = array(txtfile.read_datafile(input))
+        """ filter it out """
+        notelist_filtered = notefilter.segraw_onsets4(notelist,winlength,eps)
+        if verbose == 1 : 
+                for a,b in notelist_filtered:
+                        print a,b
+        """ plot results """
+        if plot == 1  : 
+                gnuplot.plotnote(notelist_filtered,title=input,fileout=output)
+        
+if __name__ == "__main__":
+        main()
+
Index: python/aubionotes
===================================================================
--- python/aubionotes	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubionotes	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,80 @@
+#!/usr/bin/python
+
+def do(filein,threshold):
+
+    import aubio.aubioclass
+    import aubio.median
+    #from numarray import around
+    from math import floor
+    hopsize   = 512
+    bufsize   = 4096
+    channels  = 1
+    frameread = 0
+    silthres  = -80.
+    filei     = aubio.aubioclass.sndfile(filein)
+    srate     = filei.samplerate()
+    myvec     = aubio.aubioclass.fvec(hopsize,channels)
+    readsize  = filei.read(hopsize,myvec)
+    ppick     = aubio.aubioclass.pitchpick(bufsize,hopsize,channels,myvec,srate)
+    opick     = aubio.aubioclass.onsetpick(bufsize,hopsize,channels,myvec,threshold)
+    mylist    = list()
+
+    wassilence = 0
+    lastpitch = 0
+    starttime = 0
+    while(readsize==hopsize):
+        readsize = filei.read(hopsize,myvec)
+        val = ppick.do(myvec)
+        midival = aubio.aubioclass.bintomidi(val,srate,bufsize) 
+        isonset,onset = opick.do(myvec) 
+        now = (frameread)*hopsize/(srate+0.)
+        issilence = aubio.aubioclass.aubio_silence_detection(myvec.vec,silthres)
+        
+        estmidival = 0
+        if (issilence == 1):
+            if (wassilence == 0):
+                #outputnow
+                endtime = (frameread-3)*hopsize/(srate+0.)
+                if len(mylist) > 5 :
+                    estmidival = aubio.median.percental(mylist,len(mylist)/2)
+                    print "sil", starttime, endtime, estmidival
+                #resetnow
+                mylist = list()
+            else:
+                wassilence = 1
+        else:
+            if isonset == 1:
+                if (wassilence == 0):
+                    #outputnow
+                    endtime = (frameread-3)*hopsize/(srate+0.)
+                    #estmidival = aubio.median.percental(around(array(mylist)),len(mylist)//2)
+                    if len(mylist) > 5 :
+                        estmidival = aubio.median.percental(mylist,len(mylist)/2)
+                        print starttime, endtime, estmidival
+                #resetnow
+                mylist = list()
+                #store start time
+                starttime = (frameread-3)*hopsize/(srate+0.)
+            else:
+                """
+                if(listfull):
+                    #outputnow
+                    endtime = (frameread-3)*hopsize/(srate+0.)
+                    print starttime, endtime, estimmidival
+                else:
+                """
+                #bufferize
+                if midival > 50 and midival < 75:
+                    mylist.append(floor(midival))
+            wassilence = 0
+                    
+            
+        #elif( midival > 45 ):
+        #    mylist.append(( now , midival+12 ))
+        #mylist.append(toappend)
+        frameread += 1
+
+
+if __name__ == "__main__":
+    import sys
+    do(sys.argv[1],sys.argv[2])
Index: python/aubioonset
===================================================================
--- python/aubioonset	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubioonset	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+def do(filein,threshold):
+        import aubio.aubioclass as aubio
+        hopsize   = 512
+        bufsize   = 1024
+        frameread = 0
+        filei     = aubio.sndfile(filein)
+        srate     = filei.samplerate()
+        channels  = filei.channels() 
+        myvec     = aubio.fvec(hopsize,channels)
+        readsize  = filei.read(hopsize,myvec)
+        opick     = aubio.onsetpick(bufsize,hopsize,channels,myvec,threshold)
+        mylist    = list()
+        while(readsize==hopsize):
+                readsize = filei.read(hopsize,myvec)
+                isonset,val = opick.do(myvec) 
+                if (isonset == 1):
+                    now = (frameread-3)*hopsize/(srate+0.)
+                    print "%.8f\t%.2f"% (now,val)
+                frameread += 1
+
+if __name__ == "__main__":
+        import sys
+        do(sys.argv[1],sys.argv[2])
Index: python/aubiopitch
===================================================================
--- python/aubiopitch	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubiopitch	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+def do(filein):
+    from aubio import aubioclass
+    hopsize   = 512
+    bufsize   = 4096
+    frameread = 0
+    filei     = aubioclass.sndfile(filein)
+    srate     = filei.samplerate()
+    channels  = filei.channels()
+    myvec     = aubioclass.fvec(hopsize,channels)
+    readsize  = filei.read(hopsize,myvec)
+    ppick     = aubioclass.pitchpick(bufsize,hopsize,channels,myvec,srate)
+    while(readsize==hopsize):
+        readsize = filei.read(hopsize,myvec)
+        val = ppick.do(myvec)
+        freq = aubioclass.bintofreq(val,srate,bufsize)
+        now = (frameread)*hopsize/(srate+0.)
+        print "%.3f     %.2f" % (now,freq)
+        frameread += 1
+
+if __name__ == "__main__":
+    import sys
+    do(sys.argv[1])
Index: python/aubioplot-notes
===================================================================
--- python/aubioplot-notes	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
+++ python/aubioplot-notes	(revision 96fb8ad625b1b62c2551bd98a7af1aa3f00307f6)
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+
+def parse_args (sysargs):
+        from getopt import gnu_getopt
+        shortopts ='i:o:'
+        longopts =('input=','output=')
+        args,tmp = gnu_getopt(sysargs,shortopts,longopts)
+        args.sort()
+        filein,fileout= None,None
+        for i in range(len(args)):  # a bad way
+                if args[i][0] == '-i' or args[i][0] == '--input':
+                        filein =  args[i][1]
+                if args[i][0] == '-o' or args[i][0] == '--output':
+                        fileout =  args[i][1]
+        assert filein != None, 'precise filein'
+        return filein,fileout
+
+def main (sysargs) :
+    from aubio.txtfile import read_datafile
+    from aubio.gnuplot import plotnote,plotnote_do 
+    from numarray import array
+    filein,fileout = parse_args(sysargs)
+    #print 'checking', fileerr, 'against', fileorg
+    """ load midi and raw data """
+    d = plotnote(array(read_datafile(filein)),title=filein)
+    plotnote_do(d,fileout=fileout)
+
+if __name__ == "__main__":
+    import sys 
+    main(sys.argv[1:])
+
