changeset 135:caf05503bf42

Merge from branch "with-dependencies"
author Chris Cannam
date Mon, 13 Oct 2014 10:16:37 +0100
parents 565bc0c2295d (diff) c82736e79739 (current diff)
children 2260947be4aa ee56e3e9eeb5
files
diffstat 173 files changed, 5745 insertions(+), 4354 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Thu May 09 13:55:11 2013 +0100
+++ b/.hgignore	Mon Oct 13 10:16:37 2014 +0100
@@ -10,7 +10,7 @@
 *.so
 *.so.*
 *.a
-*.wav
 *~
 *.orig
 *.rej
+cov-int
--- a/.hgsubstate	Thu May 09 13:55:11 2013 +0100
+++ b/.hgsubstate	Mon Oct 13 10:16:37 2014 +0100
@@ -1,3 +1,3 @@
-1618ab0f5e89bb6a0c6242bea545fe76a5fcd755 dataquay
-619f715526df43e23b2b9b50715e825941572352 sv-dependency-builds
-9207c142b461b2ed347a16a1b7da49751257f8f6 svcore
+d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay
+879bdc878826bebec67130326f99397c430419b1 sv-dependency-builds
+952005e252668fecdee23fed6227c52ba28cf0a3 svcore
--- a/.hgtags	Thu May 09 13:55:11 2013 +0100
+++ b/.hgtags	Mon Oct 13 10:16:37 2014 +0100
@@ -9,3 +9,6 @@
 e4652b60e469c8d09487c03c7a875f109696efaf sonic-annotator-0.7
 e4652b60e469c8d09487c03c7a875f109696efaf sonic-annotator-0.7
 ace08e6519a9e48210231c789889b25e82079ecf sonic-annotator-0.7
+52e5e2c03792209d1cd7561d34ecd0f3c33eb676 sonic-annotator-1.0
+52e5e2c03792209d1cd7561d34ecd0f3c33eb676 sonic-annotator-1.0
+5fe1f2efd40779acbdccc4c91a53693bd61f6d9b sonic-annotator-1.0
--- a/CHANGELOG	Thu May 09 13:55:11 2013 +0100
+++ b/CHANGELOG	Mon Oct 13 10:16:37 2014 +0100
@@ -1,3 +1,23 @@
+
+Changes in Sonic Annotator 1.1 since the previous release 1.0:
+
+Front-end changes:
+
+ - Add support for the start time and duration properties of a
+   transform, applying a plugin to only a range of the input audio
+ - Add --normalise to request each audio file be normalised to 1.0 max
+ - Add --multiplex option to compose multiple audio files into a
+   single multi-channel stream with one input file per channel
+ - Add --minversion option to permit scripts to check that the
+   version of Sonic Annotator is as they expect
+
+Bug fixes:
+
+ - Fix the former habit of forging ahead even if not all transform
+   files could be found or parsed (this may have been intentional
+   behaviour but it is confusing more than it is useful)
+ - Fix failure to support --summary-only flag when reading transforms
+   with summaries from a transform file
 
 Changes in Sonic Annotator 1.0 since the previous release 0.7:
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CITATION	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,9 @@
+@article{SonicAnnotator,
+  author = {Chris Cannam and Michael O. Jewell and Christophe Rhodes and Mark Sandler and Mark d'Inverno},
+  title = {Linked Data And You: Bringing music research software into the Semantic Web},
+  journal = {Journal of New Music Research},
+  number = {4},
+  pages = {313-325},
+  volume = {39},
+  year = {2010}
+} 
--- a/README	Thu May 09 13:55:11 2013 +0100
+++ b/README	Mon Oct 13 10:16:37 2014 +0100
@@ -25,7 +25,7 @@
 The main program is by Mark Levy, Chris Cannam, and Chris Sutton.
 Sonic Annotator incorporates library code from the Sonic Visualiser
 application by Chris Cannam.  Code copyright 2005-2007 Chris Cannam,
-copyright 2006-2013 Queen Mary, University of London, except where
+copyright 2006-2014 Queen Mary, University of London, except where
 indicated in the individual source files.
 
 This work was funded by the Engineering and Physical Sciences Research
--- a/configure	Thu May 09 13:55:11 2013 +0100
+++ b/configure	Mon Oct 13 10:16:37 2014 +0100
@@ -644,6 +644,8 @@
 oggz_CFLAGS
 lrdf_LIBS
 lrdf_CFLAGS
+liblo_LIBS
+liblo_CFLAGS
 serd_LIBS
 serd_CFLAGS
 sord_LIBS
@@ -759,6 +761,8 @@
 sord_LIBS
 serd_CFLAGS
 serd_LIBS
+liblo_CFLAGS
+liblo_LIBS
 lrdf_CFLAGS
 lrdf_LIBS
 oggz_CFLAGS
@@ -1422,6 +1426,9 @@
   sord_LIBS   linker flags for sord, overriding pkg-config
   serd_CFLAGS C compiler flags for serd, overriding pkg-config
   serd_LIBS   linker flags for serd, overriding pkg-config
+  liblo_CFLAGS
+              C compiler flags for liblo, overriding pkg-config
+  liblo_LIBS  linker flags for liblo, overriding pkg-config
   lrdf_CFLAGS C compiler flags for lrdf, overriding pkg-config
   lrdf_LIBS   linker flags for lrdf, overriding pkg-config
   oggz_CFLAGS C compiler flags for oggz, overriding pkg-config
@@ -5588,6 +5595,161 @@
 
 
 
+SV_MODULE_MODULE=liblo
+SV_MODULE_VERSION_TEST=""
+SV_MODULE_HEADER=lo/lo.h
+SV_MODULE_LIB=lo
+SV_MODULE_FUNC=lo_address_new
+SV_MODULE_HAVE=HAVE_$(echo liblo | tr 'a-z' 'A-Z')
+SV_MODULE_FAILED=1
+if test -n "$liblo_LIBS" ; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE" >&5
+$as_echo "$as_me: User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE" >&6;}
+   CXXFLAGS="$CXXFLAGS $liblo_CFLAGS"
+   LIBS="$LIBS $liblo_LIBS"
+   SV_MODULE_FAILED=""
+fi
+if test -z "$SV_MODULE_VERSION_TEST" ; then
+   SV_MODULE_VERSION_TEST=$SV_MODULE_MODULE
+fi
+if test -n "$SV_MODULE_FAILED" && test -n "$PKG_CONFIG"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblo" >&5
+$as_echo_n "checking for liblo... " >&6; }
+
+if test -n "$liblo_CFLAGS"; then
+    pkg_cv_liblo_CFLAGS="$liblo_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_liblo_CFLAGS=`$PKG_CONFIG --cflags "$SV_MODULE_VERSION_TEST" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$liblo_LIBS"; then
+    pkg_cv_liblo_LIBS="$liblo_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_liblo_LIBS=`$PKG_CONFIG --libs "$SV_MODULE_VERSION_TEST" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        liblo_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$SV_MODULE_VERSION_TEST" 2>&1`
+        else
+	        liblo_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$SV_MODULE_VERSION_TEST" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$liblo_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+$as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+$as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
+else
+	liblo_CFLAGS=$pkg_cv_liblo_CFLAGS
+	liblo_LIBS=$pkg_cv_liblo_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	HAVES="$HAVES $SV_MODULE_HAVE";CXXFLAGS="$CXXFLAGS $liblo_CFLAGS";LIBS="$LIBS $liblo_LIBS";SV_MODULE_FAILED=""
+fi
+fi
+if test -n "$SV_MODULE_FAILED"; then
+   as_ac_Header=`$as_echo "ac_cv_header_$SV_MODULE_HEADER" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$SV_MODULE_HEADER" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  HAVES="$HAVES $SV_MODULE_HAVE";SV_MODULE_FAILED=""
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find header $SV_MODULE_HEADER for optional module $SV_MODULE_MODULE" >&5
+$as_echo "$as_me: Failed to find header $SV_MODULE_HEADER for optional module $SV_MODULE_MODULE" >&6;}
+fi
+
+
+   if test -z "$SV_MODULE_FAILED"; then
+      if test -n "$SV_MODULE_LIB"; then
+           as_ac_Lib=`$as_echo "ac_cv_lib_$SV_MODULE_LIB''_$SV_MODULE_FUNC" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SV_MODULE_FUNC in -l$SV_MODULE_LIB" >&5
+$as_echo_n "checking for $SV_MODULE_FUNC in -l$SV_MODULE_LIB... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$SV_MODULE_LIB  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $SV_MODULE_FUNC ();
+int
+main ()
+{
+return $SV_MODULE_FUNC ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  LIBS="$LIBS -l$SV_MODULE_LIB"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find library $SV_MODULE_LIB for optional module $SV_MODULE_MODULE" >&5
+$as_echo "$as_me: Failed to find library $SV_MODULE_LIB for optional module $SV_MODULE_MODULE" >&6;}
+fi
+
+      fi
+   fi
+fi
+
+
 SV_MODULE_MODULE=lrdf
 SV_MODULE_VERSION_TEST="lrdf >= 0.2"
 SV_MODULE_HEADER=lrdf.h
--- a/configure.ac	Thu May 09 13:55:11 2013 +0100
+++ b/configure.ac	Mon Oct 13 10:16:37 2014 +0100
@@ -84,6 +84,7 @@
 SV_MODULE_REQUIRED([sord],[sord-0 >= 0.5],[sord/sord.h],[sord-0],[sord_world_new])
 SV_MODULE_REQUIRED([serd],[serd-0 >= 0.5],[serd/serd.h],[serd-0],[serd_reader_read_file])
 
+SV_MODULE_OPTIONAL([liblo],[],[lo/lo.h],[lo],[lo_address_new])
 SV_MODULE_OPTIONAL([lrdf],[lrdf >= 0.2],[lrdf.h],[lrdf],[lrdf_init])
 SV_MODULE_OPTIONAL([oggz],[oggz >= 1.0.0],[oggz/oggz.h],[oggz],[oggz_run])
 SV_MODULE_OPTIONAL([fishsound],[fishsound >= 1.0.0],[fishsound/fishsound.h],[fishsound],[fish_sound_new])
--- a/platform-dataquay.pri	Thu May 09 13:55:11 2013 +0100
+++ b/platform-dataquay.pri	Mon Oct 13 10:16:37 2014 +0100
@@ -10,10 +10,17 @@
 EXTRALIBS -= -lrdf
 
 DEFINES += USE_SORD
-QMAKE_CXXFLAGS += -I/usr/local/include/sord-0 -I/usr/local/include/serd-0 -I/usr/include/sord-0 -I/usr/include/serd-0
-EXTRALIBS += -lsord-0 -lserd-0
+# Libraries and paths should be added by config.pri
 
-win32-g++: {
+win32-g++ {
     INCLUDEPATH += ../sv-dependency-builds/win32-mingw/include
     LIBS += -L../../sv-dependency-builds/win32-mingw/lib
 }
+win32-msvc* {
+    INCLUDEPATH += ../sv-dependency-builds/win32-msvc/include
+    LIBS += -L../../sv-dependency-builds/win32-msvc/lib
+}
+mac* {
+    INCLUDEPATH += ../sv-dependency-builds/osx/include
+    LIBS += -L../sv-dependency-builds/osx/lib
+}
--- a/runner.pro	Thu May 09 13:55:11 2013 +0100
+++ b/runner.pro	Mon Oct 13 10:16:37 2014 +0100
@@ -8,14 +8,30 @@
     INCLUDEPATH += sv-dependency-builds/win32-msvc/include
     LIBS += -Lsv-dependency-builds/win32-msvc/lib
 }
+mac* {
+    INCLUDEPATH += sv-dependency-builds/osx/include
+    LIBS += -L../vamp-plugin-sdk -Lsv-dependency-builds/osx/lib
+}
 
 exists(config.pri) {
     include(config.pri)
 }
-win* {
-    !exists(config.pri) {
-        DEFINES += HAVE_BZ2 HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_SAMPLERATE HAVE_VAMP HAVE_VAMPHOSTSDK HAVE_DATAQUAY HAVE_MAD HAVE_ID3TAG 
-        LIBS += -lbz2 -lvamp-hostsdk -lfftw3 -lfftw3f -lsndfile -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -logg -lmad -lid3tag -lsamplerate -lz -lsord-0 -lserd-0 -lwinmm -lws2_32
+
+!exists(config.pri) {
+
+    CONFIG += release
+    DEFINES += NDEBUG BUILD_RELEASE NO_TIMING
+
+    DEFINES += HAVE_BZ2 HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_SAMPLERATE HAVE_VAMP HAVE_VAMPHOSTSDK HAVE_DATAQUAY HAVE_MAD HAVE_ID3TAG
+
+    LIBS += -lbz2 -lvamp-hostsdk -lfftw3 -lfftw3f -lsndfile -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -logg -lmad -lid3tag -lsamplerate -lz -lsord-0 -lserd-0
+
+    win* {
+        LIBS += -lwinmm -lws2_32
+    }
+    macx* {
+        DEFINES += HAVE_COREAUDIO
+        LIBS += -framework CoreAudio -framework CoreMidi -framework AudioUnit -framework AudioToolbox -framework CoreFoundation -framework CoreServices -framework Accelerate
     }
 }
 
@@ -67,14 +83,16 @@
 	runner/AudioDBFeatureWriter.h \
         runner/FeatureWriterFactory.h  \
         runner/DefaultFeatureWriter.h \
-        runner/FeatureExtractionManager.h
+        runner/FeatureExtractionManager.h \
+        runner/MultiplexedReader.h
 
 SOURCES += \
 	runner/main.cpp \
 	runner/DefaultFeatureWriter.cpp \
 	runner/FeatureExtractionManager.cpp \
         runner/AudioDBFeatureWriter.cpp \
-        runner/FeatureWriterFactory.cpp
+        runner/FeatureWriterFactory.cpp \
+        runner/MultiplexedReader.cpp
 
 !win32 {
     QMAKE_POST_LINK=/bin/bash tests/test.sh
--- a/runner/FeatureExtractionManager.cpp	Thu May 09 13:55:11 2013 +0100
+++ b/runner/FeatureExtractionManager.cpp	Mon Oct 13 10:16:37 2014 +0100
@@ -14,6 +14,7 @@
 */
 
 #include "FeatureExtractionManager.h"
+#include "MultiplexedReader.h"
 
 #include <vamp-hostsdk/PluginChannelAdapter.h>
 #include <vamp-hostsdk/PluginBufferingAdapter.h>
@@ -40,7 +41,6 @@
 #include "data/fileio/FileSource.h"
 #include "data/fileio/AudioFileReader.h"
 #include "data/fileio/AudioFileReaderFactory.h"
-#include "data/fileio/PlaylistFileReader.h"
 #include "base/TempDirectory.h"
 #include "base/ProgressPrinter.h"
 #include "transform/TransformFactory.h"
@@ -59,7 +59,8 @@
     m_blockSize(16384),
     m_defaultSampleRate(0),
     m_sampleRate(0),
-    m_channels(0)
+    m_channels(0),
+    m_normalise(false)
 {
 }
 
@@ -84,6 +85,11 @@
     m_defaultSampleRate = sampleRate;
 }
 
+void FeatureExtractionManager::setNormalise(bool normalise)
+{
+    m_normalise = normalise;
+}
+
 static PluginSummarisingAdapter::SummaryType
 getSummaryType(string name)
 {
@@ -99,9 +105,9 @@
     return PluginSummarisingAdapter::UnknownSummaryType;
 }
 
-bool FeatureExtractionManager::setSummaryTypes(const set<string> &names,
-                                               bool summariesOnly,
-                                               const PluginSummarisingAdapter::SegmentBoundaries &boundaries)
+bool
+FeatureExtractionManager::setSummaryTypes(const set<string> &names,
+                                          const PluginSummarisingAdapter::SegmentBoundaries &boundaries)
 {
     for (SummaryNameSet::const_iterator i = names.begin();
          i != names.end(); ++i) {
@@ -111,11 +117,16 @@
         }
     }
     m_summaries = names;
-    m_summariesOnly = summariesOnly;
     m_boundaries = boundaries;
     return true;
 }
 
+void
+FeatureExtractionManager::setSummariesOnly(bool summariesOnly)
+{
+    m_summariesOnly = summariesOnly;
+}
+
 static PluginInputDomainAdapter::WindowType
 convertWindowType(WindowType t)
 {
@@ -329,9 +340,31 @@
             }
         }
 
+        if (transform.getPluginVersion() != "") {
+            if (QString("%1").arg(plugin->getPluginVersion())
+                != transform.getPluginVersion()) {
+                cerr << "ERROR: Transform specifies version "
+                     << transform.getPluginVersion()
+                     << " of plugin \"" << plugin->getIdentifier()
+                     << "\", but installed plugin is version "
+                     << plugin->getPluginVersion()
+                     << endl;
+                return false;
+            }
+        }
+
         if (transform.getOutput() == "") {
             transform.setOutput
                 (plugin->getOutputDescriptors()[0].identifier.c_str());
+        } else {
+            if (m_pluginOutputs[plugin].find
+                (transform.getOutput().toLocal8Bit().data()) ==
+                m_pluginOutputs[plugin].end()) {
+                cerr << "ERROR: Transform requests nonexistent plugin output \""
+                     << transform.getOutput()
+                     << "\"" << endl;
+                return false;
+            }
         }
 
         m_transformPluginMap[transform] = plugin;
@@ -345,6 +378,10 @@
         plugin = m_transformPluginMap[transform];
     }
 
+    if (m_plugins.find(plugin) == m_plugins.end()) {
+        m_orderedPlugins.push_back(plugin);
+    }
+
     m_plugins[plugin][transform] = writers;
 
     return true;
@@ -373,25 +410,37 @@
 bool FeatureExtractionManager::addFeatureExtractorFromFile
 (QString transformXmlFile, const vector<FeatureWriter*> &writers)
 {
-    RDFTransformFactory factory
-        (QUrl::fromLocalFile(QFileInfo(transformXmlFile).absoluteFilePath())
-         .toString());
-    ProgressPrinter printer("Parsing transforms RDF file");
-    std::vector<Transform> transforms = factory.getTransforms(&printer);
-    if (!factory.isOK()) {
-        cerr << "WARNING: FeatureExtractionManager::addFeatureExtractorFromFile: Failed to parse transforms file: " << factory.getErrorString().toStdString() << endl;
-        if (factory.isRDF()) {
-            return false; // no point trying it as XML
-        }
+    bool tryRdf = true;
+
+    if (transformXmlFile.endsWith(".xml") || transformXmlFile.endsWith(".XML")) {
+        // We don't support RDF-XML (and nor does the underlying
+        // parser library) so skip the RDF parse if the filename
+        // suggests XML, to avoid puking out a load of errors from
+        // feeding XML to a Turtle parser
+        tryRdf = false;
     }
-    if (!transforms.empty()) {
-        bool success = true;
-        for (int i = 0; i < (int)transforms.size(); ++i) {
-            if (!addFeatureExtractor(transforms[i], writers)) {
-                success = false;
+
+    if (tryRdf) {
+        RDFTransformFactory factory
+            (QUrl::fromLocalFile(QFileInfo(transformXmlFile).absoluteFilePath())
+             .toString());
+        ProgressPrinter printer("Parsing transforms RDF file");
+        std::vector<Transform> transforms = factory.getTransforms(&printer);
+        if (!factory.isOK()) {
+            cerr << "WARNING: FeatureExtractionManager::addFeatureExtractorFromFile: Failed to parse transforms file: " << factory.getErrorString().toStdString() << endl;
+            if (factory.isRDF()) {
+                return false; // no point trying it as XML
             }
         }
-        return success;
+        if (!transforms.empty()) {
+            bool success = true;
+            for (int i = 0; i < (int)transforms.size(); ++i) {
+                if (!addFeatureExtractor(transforms[i], writers)) {
+                    success = false;
+                }
+            }
+            return success;
+        }
     }
 
     QFile file(transformXmlFile);
@@ -411,31 +460,8 @@
     return addFeatureExtractor(transform, writers);
 }
 
-void FeatureExtractionManager::addSource(QString audioSource)
+void FeatureExtractionManager::addSource(QString audioSource, bool willMultiplex)
 {
-    if (QFileInfo(audioSource).suffix().toLower() == "m3u") {
-        ProgressPrinter retrievalProgress("Opening playlist file...");
-        FileSource source(audioSource, &retrievalProgress);
-        if (!source.isAvailable()) {
-            cerr << "ERROR: File or URL \"" << audioSource.toStdString()
-                 << "\" could not be located" << endl;
-            throw FileNotFound(audioSource);
-        }
-        source.waitForData();
-        PlaylistFileReader reader(source);
-        if (reader.isOK()) {
-            vector<QString> files = reader.load();
-            for (int i = 0; i < (int)files.size(); ++i) {
-                addSource(files[i]);
-            }
-            return;
-        } else {
-            cerr << "ERROR: Playlist \"" << audioSource.toStdString()
-                 << "\" could not be opened" << endl;
-            throw FileNotFound(audioSource);
-        }
-    }
-
     std::cerr << "Have audio source: \"" << audioSource.toStdString() << "\"" << std::endl;
 
     // We don't actually do anything with it here, unless it's the
@@ -449,7 +475,11 @@
         FileSource source(audioSource, &retrievalProgress);
         if (!source.isAvailable()) {
             cerr << "ERROR: File or URL \"" << audioSource.toStdString()
-                 << "\" could not be located" << endl;
+                 << "\" could not be located";
+            if (source.getErrorString() != "") {
+                cerr << ": " << source.getErrorString();
+            }
+            cerr << endl;
             throw FileNotFound(audioSource);
         }
     
@@ -459,7 +489,9 @@
         // (then close, and open again later with actual desired rate &c)
 
         AudioFileReader *reader =
-            AudioFileReaderFactory::createReader(source, 0, &retrievalProgress);
+            AudioFileReaderFactory::createReader(source, 0, 
+                                                 m_normalise,
+                                                 &retrievalProgress);
     
         if (!reader) {
             throw FailedToOpenFile(audioSource);
@@ -469,10 +501,12 @@
 
         cerr << "File or URL \"" << audioSource.toStdString() << "\" opened successfully" << endl;
 
-        if (m_channels == 0) {
-            m_channels = reader->getChannelCount();
-            cerr << "Taking default channel count of "
-                 << reader->getChannelCount() << " from file" << endl;
+        if (!willMultiplex) {
+            if (m_channels == 0) {
+                m_channels = reader->getChannelCount();
+                cerr << "Taking default channel count of "
+                     << reader->getChannelCount() << " from file" << endl;
+            }
         }
 
         if (m_defaultSampleRate == 0) {
@@ -484,39 +518,18 @@
 
         m_readyReaders[audioSource] = reader;
     }
+
+    if (willMultiplex) {
+        ++m_channels; // channel count is simply number of sources
+        cerr << "Multiplexing, incremented target channel count to " 
+             << m_channels << endl;
+    }
 }
 
-void FeatureExtractionManager::extractFeatures(QString audioSource, bool force)
+void FeatureExtractionManager::extractFeatures(QString audioSource)
 {
     if (m_plugins.empty()) return;
 
-    if (QFileInfo(audioSource).suffix().toLower() == "m3u") {
-        FileSource source(audioSource);
-        PlaylistFileReader reader(source);
-        if (reader.isOK()) {
-            vector<QString> files = reader.load();
-            for (int i = 0; i < (int)files.size(); ++i) {
-                try {
-                    extractFeatures(files[i], force);
-                } catch (const std::exception &e) {
-                    if (!force) throw;
-                    cerr << "ERROR: Feature extraction failed for playlist entry \""
-                         << files[i].toStdString()
-                         << "\": " << e.what() << endl;
-                    // print a note only if we have more files to process
-                    if (++i != files.size()) {
-                        cerr << "NOTE: \"--force\" option was provided, continuing (more errors may occur)" << endl;
-                    }
-                }
-            }
-            return;
-        } else {
-            cerr << "ERROR: Playlist \"" << audioSource.toStdString()
-                 << "\" could not be opened" << endl;
-            throw FileNotFound(audioSource);
-        }
-    }
-
     testOutputFiles(audioSource);
 
     if (m_sampleRate == 0) {
@@ -528,13 +541,45 @@
             (audioSource, "internal error: have sources and plugins, but no channel count");
     }
 
+    AudioFileReader *reader = prepareReader(audioSource);
+    extractFeaturesFor(reader, audioSource); // Note this also deletes reader
+}
+
+void FeatureExtractionManager::extractFeaturesMultiplexed(QStringList sources)
+{
+    if (m_plugins.empty() || sources.empty()) return;
+
+    QString nominalSource = sources[0];
+
+    testOutputFiles(nominalSource);
+
+    if (m_sampleRate == 0) {
+        throw FileOperationFailed
+            (nominalSource, "internal error: have sources and plugins, but no sample rate");
+    }
+    if (m_channels == 0) {
+        throw FileOperationFailed
+            (nominalSource, "internal error: have sources and plugins, but no channel count");
+    }
+
+    QList<AudioFileReader *> readers;
+    foreach (QString source, sources) {
+        AudioFileReader *reader = prepareReader(source);
+        readers.push_back(reader);
+    }
+
+    AudioFileReader *reader = new MultiplexedReader(readers);
+    extractFeaturesFor(reader, nominalSource); // Note this also deletes reader
+}
+
+AudioFileReader *
+FeatureExtractionManager::prepareReader(QString source)
+{
     AudioFileReader *reader = 0;
-
-    if (m_readyReaders.contains(audioSource)) {
-        reader = m_readyReaders[audioSource];
-        m_readyReaders.remove(audioSource);
-        if (reader->getChannelCount() != m_channels ||
-            reader->getSampleRate() != m_sampleRate) {
+    if (m_readyReaders.contains(source)) {
+        reader = m_readyReaders[source];
+        m_readyReaders.remove(source);
+        if (reader->getSampleRate() != m_sampleRate) {
             // can't use this; open it again
             delete reader;
             reader = 0;
@@ -542,23 +587,31 @@
     }
     if (!reader) {
         ProgressPrinter retrievalProgress("Retrieving audio data...");
-        FileSource source(audioSource, &retrievalProgress);
-        source.waitForData();
-        reader = AudioFileReaderFactory::createReader
-            (source, m_sampleRate, &retrievalProgress);
+        FileSource fs(source, &retrievalProgress);
+        fs.waitForData();
+        reader = AudioFileReaderFactory::createReader(fs, m_sampleRate, 
+                                                      m_normalise,
+                                                      &retrievalProgress);
         retrievalProgress.done();
     }
+    if (!reader) {
+        throw FailedToOpenFile(source);
+    }
+    return reader;
+}
 
-    if (!reader) {
-        throw FailedToOpenFile(audioSource);
-    }
+void
+FeatureExtractionManager::extractFeaturesFor(AudioFileReader *reader,
+                                             QString audioSource)
+{
+    // Note: This also deletes reader
 
     cerr << "Audio file \"" << audioSource.toStdString() << "\": "
          << reader->getChannelCount() << "ch at " 
          << reader->getNativeRate() << "Hz" << endl;
     if (reader->getChannelCount() != m_channels ||
         reader->getNativeRate() != m_sampleRate) {
-        cerr << "NOTE: File will be mixed or resampled for processing: "
+        cerr << "NOTE: File will be mixed or resampled for processing, to: "
              << m_channels << "ch at " 
              << m_sampleRate << "Hz" << endl;
     }
@@ -591,12 +644,15 @@
     
 //    cerr << "file has " << frameCount << " frames" << endl;
 
-    for (PluginMap::iterator pi = m_plugins.begin();
-         pi != m_plugins.end(); ++pi) {
+    int earliestStartFrame = 0;
+    int latestEndFrame = frameCount;
+    bool haveExtents = false;
 
-        Plugin *plugin = pi->first;
+    foreach (Plugin *plugin, m_orderedPlugins) {
 
-//        std::cerr << "Calling reset on " << plugin << std::endl;
+        PluginMap::iterator pi = m_plugins.find(plugin);
+
+        std::cerr << "Calling reset on " << plugin << std::endl;
         plugin->reset();
 
         for (TransformWriterMap::iterator ti = pi->second.begin();
@@ -604,18 +660,34 @@
 
             const Transform &transform = ti->first;
 
-            //!!! we may want to set the start and duration times for extraction
-            // in the transform record (defaults of zero indicate extraction
-            // from the whole file)
-//            transform.setStartTime(RealTime::zeroTime);
-//            transform.setDuration
-//                (RealTime::frame2RealTime(reader->getFrameCount(), m_sampleRate));
+            int startFrame = RealTime::realTime2Frame
+                (transform.getStartTime(), m_sampleRate);
+            int duration = RealTime::realTime2Frame
+                (transform.getDuration(), m_sampleRate);
+            if (duration == 0) {
+                duration = frameCount - startFrame;
+            }
+
+            if (!haveExtents || startFrame < earliestStartFrame) {
+                earliestStartFrame = startFrame;
+            }
+            if (!haveExtents || startFrame + duration > latestEndFrame) {
+                latestEndFrame = startFrame + duration;
+            }
+/*
+            cerr << "startFrame for transform " << startFrame << endl;
+            cerr << "duration for transform " << duration << endl;
+            cerr << "earliestStartFrame becomes " << earliestStartFrame << endl;
+            cerr << "latestEndFrame becomes " << latestEndFrame << endl;
+*/
+            haveExtents = true;
 
             string outputId = transform.getOutput().toStdString();
             if (m_pluginOutputs[plugin].find(outputId) ==
                 m_pluginOutputs[plugin].end()) {
-                //!!! throw?
-                cerr << "WARNING: Nonexistent plugin output \"" << outputId << "\" requested for transform \""
+                // We shouldn't actually reach this point:
+                // addFeatureExtractor tests whether the output exists
+                cerr << "ERROR: Nonexistent plugin output \"" << outputId << "\" requested for transform \""
                      << transform.getIdentifier().toStdString() << "\", ignoring this transform"
                      << endl;
 /*
@@ -637,36 +709,12 @@
         }
     }
     
-    long startFrame = 0;
-    long endFrame = frameCount;
+    int startFrame = earliestStartFrame;
+    int endFrame = latestEndFrame;
+    
+    foreach (Plugin *plugin, m_orderedPlugins) {
 
-/*!!! No -- there is no single transform to pull this stuff from --
- * the transforms may have various start and end times, need to be far
- * cleverer about this if we're going to support them
-
-    RealTime trStartRT = transform.getStartTime();
-    RealTime trDurationRT = transform.getDuration();
-
-    long trStart = RealTime::realTime2Frame(trStartRT, m_sampleRate);
-    long trDuration = RealTime::realTime2Frame(trDurationRT, m_sampleRate);
-
-    if (trStart == 0 || trStart < startFrame) {
-        trStart = startFrame;
-    }
-
-    if (trDuration == 0) {
-        trDuration = endFrame - trStart;
-    }
-    if (trStart + trDuration > endFrame) {
-        trDuration = endFrame - trStart;
-    }
-
-    startFrame = trStart;
-    endFrame = trStart + trDuration;
-*/
-    
-    for (PluginMap::iterator pi = m_plugins.begin();
-         pi != m_plugins.end(); ++pi) { 
+        PluginMap::iterator pi = m_plugins.find(plugin);
 
         for (TransformWriterMap::const_iterator ti = pi->second.begin();
              ti != pi->second.end(); ++ti) {
@@ -687,10 +735,10 @@
     ProgressPrinter extractionProgress("Extracting and writing features...");
     int progress = 0;
 
-    for (long i = startFrame; i < endFrame; i += m_blockSize) {
+    for (int i = startFrame; i < endFrame; i += m_blockSize) {
         
         //!!! inefficient, although much of the inefficiency may be
-        // susceptible to optimisation
+        // susceptible to compiler optimisation
         
         SampleBlock frames;
         reader->getInterleavedFrames(i, m_blockSize, frames);
@@ -738,10 +786,28 @@
         Vamp::RealTime timestamp = Vamp::RealTime::frame2RealTime
             (i, m_sampleRate);
         
-        for (PluginMap::iterator pi = m_plugins.begin();
-             pi != m_plugins.end(); ++pi) {
+        foreach (Plugin *plugin, m_orderedPlugins) {
 
-            Plugin *plugin = pi->first;
+            PluginMap::iterator pi = m_plugins.find(plugin);
+
+            // Skip any plugin none of whose transforms have come
+            // around yet. (Though actually, all transforms for a
+            // given plugin must have the same start time -- they can
+            // only differ in output and summary type.)
+            bool inRange = false;
+            for (TransformWriterMap::const_iterator ti = pi->second.begin();
+                 ti != pi->second.end(); ++ti) {
+                int startFrame = RealTime::realTime2Frame
+                    (ti->first.getStartTime(), m_sampleRate);
+                if (i >= startFrame || i + m_blockSize > startFrame) {
+                    inRange = true;
+                    break;
+                }
+            }
+            if (!inRange) {
+                continue;
+            }
+
             Plugin::FeatureSet featureSet = plugin->process(data, timestamp);
 
             if (!m_summariesOnly) {
@@ -758,41 +824,9 @@
 
     lifemgr.destroy(); // deletes reader, data
         
-    // In order to ensure our results are written to the output in a
-    // fixed order (and not one that depends on the pointer value of
-    // each plugin on the heap in any given run of the program) we
-    // take the plugins' entries from the plugin map and sort them
-    // into a new, temporary map that is indexed by the first
-    // transform for each plugin. We then iterate over than instead of
-    // over m_plugins in order to get the right ordering.
+    foreach (Plugin *plugin, m_orderedPlugins) {
 
-    // This is not the most elegant way to do this -- it would be more
-    // elegant to impose an ordering directly on the plugins that are
-    // used as keys to m_plugins. But the plugin type comes from the
-    // Vamp SDK, so this change is more localised.
-
-    // Thanks to Matthias for this.
-
-    typedef map<Transform, PluginMap::value_type> OrderedPluginMap;
-    OrderedPluginMap orderedPlugins;
-
-    for (PluginMap::iterator pi = m_plugins.begin();
-         pi != m_plugins.end(); ++pi) { 
-        Transform firstForPlugin = (pi->second).begin()->first;
-        orderedPlugins.insert(OrderedPluginMap::value_type(firstForPlugin, *pi));
-    }
-
-    for (OrderedPluginMap::iterator superPi = orderedPlugins.begin();
-         superPi != orderedPlugins.end(); ++superPi) {
-
-        // The value we extract from this map is just the same as the
-        // value_type we get from iterating over our PluginMap
-        // directly -- but we happen to get them in the right order
-        // now because the map iterator is ordered by the Transform
-        // key type ordering
-        PluginMap::value_type pi = superPi->second;
-
-        Plugin *plugin = pi.first;
+        PluginMap::iterator pi = m_plugins.find(plugin);
         Plugin::FeatureSet featureSet = plugin->getRemainingFeatures();
 
         if (!m_summariesOnly) {
@@ -935,8 +969,9 @@
 
 void FeatureExtractionManager::finish()
 {
-    for (PluginMap::iterator pi = m_plugins.begin();
-         pi != m_plugins.end(); ++pi) {
+    foreach (Plugin *plugin, m_orderedPlugins) {
+
+        PluginMap::iterator pi = m_plugins.find(plugin);
 
         for (TransformWriterMap::iterator ti = pi->second.begin();
              ti != pi->second.end(); ++ti) {
--- a/runner/FeatureExtractionManager.h	Thu May 09 13:55:11 2013 +0100
+++ b/runner/FeatureExtractionManager.h	Mon Oct 13 10:16:37 2014 +0100
@@ -43,11 +43,13 @@
 
     void setChannels(int channels);
     void setDefaultSampleRate(int sampleRate);
+    void setNormalise(bool normalise);
 
     bool setSummaryTypes(const set<string> &summaryTypes,
-                         bool summariesOnly,
                          const Vamp::HostExt::PluginSummarisingAdapter::SegmentBoundaries &boundaries);
 
+    void setSummariesOnly(bool summariesOnly);
+
     bool addFeatureExtractor(Transform transform,
                              const vector<FeatureWriter*> &writers);
 
@@ -60,12 +62,17 @@
     // Make a note of an audio or playlist file which will be passed
     // to extractFeatures later.  Amongst other things, this may
     // initialise the default sample rate and channel count
-    void addSource(QString audioSource);
+    void addSource(QString audioSource, bool willMultiplex);
 
     // Extract features from the given audio or playlist file.  If the
     // file is a playlist and force is true, continue extracting even
     // if a file in the playlist fails.
-    void extractFeatures(QString audioSource, bool force);
+    void extractFeatures(QString audioSource);
+
+    // Extract features from the given audio files, multiplexing into
+    // a single "file" whose individual channels are mixdowns of the
+    // supplied sources.
+    void extractFeaturesMultiplexed(QStringList sources);
 
 private:
     // A plugin may have many outputs, so we can have more than one
@@ -77,7 +84,17 @@
     typedef map<Transform, vector<FeatureWriter *> > TransformWriterMap;
     typedef map<Vamp::Plugin *, TransformWriterMap> PluginMap;
     PluginMap m_plugins;
-        
+
+    // When we run plugins, we want to run them in a known order so as
+    // to get the same results on each run of Sonic Annotator with the
+    // same transforms. But if we just iterate through our PluginMap,
+    // we get them in an arbitrary order based on pointer
+    // address. This vector provides an underlying order for us. Note
+    // that the TransformWriterMap is consistently ordered (because
+    // the key is a Transform which has a proper ordering) so using
+    // this gives us a consistent order across the whole PluginMap
+    vector<Vamp::Plugin *> m_orderedPlugins;
+
     // And a map back from transforms to their plugins.  Note that
     // this is keyed by transform, not transform ID -- two differently
     // configured transforms with the same ID must use different
@@ -101,6 +118,10 @@
     bool m_summariesOnly;
     Vamp::HostExt::PluginSummarisingAdapter::SegmentBoundaries m_boundaries;
 
+    AudioFileReader *prepareReader(QString audioSource);
+
+    void extractFeaturesFor(AudioFileReader *reader, QString audioSource);
+
     void writeSummaries(QString audioSource, Vamp::Plugin *);
 
     void writeFeatures(QString audioSource,
@@ -116,6 +137,7 @@
     int m_defaultSampleRate;
     int m_sampleRate;
     int m_channels;
+    bool m_normalise;
 
     QMap<QString, AudioFileReader *> m_readyReaders;
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runner/MultiplexedReader.cpp	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,106 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*
+    Sonic Annotator
+    A utility for batch feature extraction from audio files.
+    Mark Levy, Chris Sutton and Chris Cannam, Queen Mary, University of London.
+    Copyright 2007-2014 QMUL.
+
+    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.  See the file
+    COPYING included with this distribution for more information.
+*/
+
+#include "MultiplexedReader.h"
+
+MultiplexedReader::MultiplexedReader(QList<AudioFileReader *> readers) : 
+    m_readers(readers)
+{
+    m_channelCount = readers.size();
+    m_sampleRate = readers[0]->getSampleRate();
+    
+    m_frameCount = 0;
+    m_quicklySeekable = true;
+    
+    foreach (AudioFileReader *r, m_readers) {
+	if (!r->isOK()) {
+	    m_channelCount = 0;
+	    m_error = r->getError();
+	} else {
+	    if (r->getFrameCount() > m_frameCount) {
+		m_frameCount = r->getFrameCount();
+	    }
+	    if (!r->isQuicklySeekable()) {
+		m_quicklySeekable = false;
+	    }
+	}
+    }
+}
+
+MultiplexedReader::~MultiplexedReader()
+{
+    foreach (AudioFileReader *r, m_readers) {
+	delete r;
+    }
+}
+
+void
+MultiplexedReader::getInterleavedFrames(int start, int frameCount,
+					SampleBlock &block) const
+{
+    int out_chans = m_readers.size();
+
+    // Allocate and zero
+    block = SampleBlock(frameCount * out_chans, 0.f);
+
+    for (int out_chan = 0; out_chan < out_chans; ++out_chan) {
+
+	AudioFileReader *reader = m_readers[out_chan];
+	SampleBlock readerBlock;
+	reader->getInterleavedFrames(start, frameCount, readerBlock);
+
+	int in_chans = reader->getChannelCount();
+
+	for (int frame = 0; frame < frameCount; ++frame) {
+
+            int out_index = frame * out_chans + out_chan;
+
+	    for (int in_chan = 0; in_chan < in_chans; ++in_chan) {
+                int in_index = frame * in_chans + in_chan;
+                if (in_index >= (int)readerBlock.size()) break;
+		block[out_index] += readerBlock[in_index];
+	    }
+
+            if (in_chans > 1) {
+                block[out_index] /= float(in_chans);
+            }
+	}
+    }
+}
+
+int
+MultiplexedReader::getDecodeCompletion() const
+{
+    int completion = 100;
+    foreach (AudioFileReader *r, m_readers) {
+	int c = r->getDecodeCompletion();
+	if (c < 100) {
+	    completion = c;
+	}
+    }
+    return completion;
+}
+
+bool
+MultiplexedReader::isUpdating() const
+{
+    foreach (AudioFileReader *r, m_readers) {
+	if (r->isUpdating()) return true;
+    }
+    return false;
+}
+
+
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runner/MultiplexedReader.h	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,49 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*
+    Sonic Annotator
+    A utility for batch feature extraction from audio files.
+    Mark Levy, Chris Sutton and Chris Cannam, Queen Mary, University of London.
+    Copyright 2007-2014 QMUL.
+
+    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.  See the file
+    COPYING included with this distribution for more information.
+*/
+
+#ifndef _MULTIPLEXED_READER_H_
+#define _MULTIPLEXED_READER_H_
+
+#include "data/fileio/AudioFileReader.h"
+
+#include <QString>
+#include <QList>
+
+class MultiplexedReader : public AudioFileReader
+{
+    Q_OBJECT
+
+public:
+    // I take ownership of readers
+    MultiplexedReader(QList<AudioFileReader *> readers);
+    virtual ~MultiplexedReader();
+
+    virtual QString getError() const { return m_error; }
+    virtual bool isQuicklySeekable() const { return m_quicklySeekable; }
+
+    virtual void getInterleavedFrames(int start, int count,
+				      SampleBlock &frames) const;
+
+    virtual int getDecodeCompletion() const;
+
+    virtual bool isUpdating() const;
+
+protected:
+    QString m_error;
+    bool m_quicklySeekable;
+    QList<AudioFileReader *> m_readers;
+};
+
+#endif
--- a/runner/main.cpp	Thu May 09 13:55:11 2013 +0100
+++ b/runner/main.cpp	Mon Oct 13 10:16:37 2014 +0100
@@ -35,6 +35,7 @@
 
 #include "base/Exceptions.h"
 #include "base/TempDirectory.h"
+#include "base/ProgressPrinter.h"
 
 #include "data/fileio/AudioFileReaderFactory.h"
 #include "data/fileio/PlaylistFileReader.h"
@@ -136,32 +137,83 @@
     return ws;
 }
 
-void usage(QString myname)
+static bool
+isVersionNewerThan(QString a, QString b) // from VersionTester in svapp
 {
-    set<string> writers = FeatureWriterFactory::getWriterTags();
-        
+    QRegExp re("[._-]");
+    QStringList alist = a.split(re, QString::SkipEmptyParts);
+    QStringList blist = b.split(re, QString::SkipEmptyParts);
+    int ae = alist.size();
+    int be = blist.size();
+    int e = std::max(ae, be);
+    for (int i = 0; i < e; ++i) {
+        int an = 0, bn = 0;
+        if (i < ae) {
+            an = alist[i].toInt();
+            if (an == 0 && alist[i] != "0") {
+                an = -1; // non-numeric field -> "-pre1" etc
+            }
+        }
+        if (i < be) {
+            bn = blist[i].toInt();
+            if (bn == 0 && blist[i] != "0") {
+                bn = -1;
+            }
+        }
+        if (an < bn) return false;
+        if (an > bn) return true;
+    }
+    return false;
+}
+
+static int
+checkMinVersion(QString myname, QString v)
+{
+    if (v == RUNNER_VERSION) {
+        return 0;
+    } else if (isVersionNewerThan(RUNNER_VERSION, v)) {
+        return 0;
+    } else {
+        cerr << myname << ": version " 
+             << RUNNER_VERSION << " is less than requested min version "
+             << v << ", failing" << endl;
+        return 1;
+    }
+}
+
+void printUsage(QString myname)
+{
     cerr << endl;
     cerr << "Sonic Annotator v" << RUNNER_VERSION << endl;
     cerr << "A utility for batch feature extraction from audio files." << endl;
     cerr << "Mark Levy, Chris Sutton and Chris Cannam, Queen Mary, University of London." << endl;
-    cerr << "Copyright 2007-2013 Queen Mary, University of London." << endl;
+    cerr << "Copyright 2007-2014 Queen Mary, University of London." << endl;
     cerr << endl;
     cerr << "This program is free software.  You may redistribute copies of it under the" << endl;
     cerr << "terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>." << endl;
     cerr << "This program is supplied with NO WARRANTY, to the extent permitted by law." << endl;
     cerr << endl;
-    cerr << "  Usage: " << myname.toStdString()
-         << " [-mr] -t trans.xml [...] -w <writer> [...] <audio> [...]" << endl;
-    cerr << "         " << myname.toStdString()
-         << " [-mr] -T trans.txt [...] -w <writer> [...] <audio> [...]" << endl;
-    cerr << "         " << myname.toStdString()
+    cerr << "Usage: " << endl;
+    cerr << "  " << myname
+         << " [-mrnf] -t transform.ttl [..] -w <writer> [..] <audio> [..]" << endl;
+    cerr << "  " << myname
+         << " [-mrnf] -T translist.txt [..] -w <writer> [..] <audio> [..]" << endl;
+    cerr << "  " << myname
+         << " [-mrnf] -d <plugin> [..] -w <writer> [..] <audio> [...]" << endl;
+    cerr << "  " << myname
          << " -s <transform>" << endl;
-    cerr << "         " << myname.toStdString()
+    cerr << "  " << myname
          << " [-lhv]" << endl;
     cerr << endl;
     cerr << "Where <audio> is an audio file or URL to use as input: either a local file" << endl;
-    cerr << "path, local \"file://\" URL, or remote \"http://\" or \"ftp://\" URL." << endl;
+    cerr << "path, local \"file://\" URL, or remote \"http://\" or \"ftp://\" URL;" << endl;
+    cerr << "and <plugin> is a plugin output identified as vamp:libname:plugin:output." << endl;
     cerr << endl;
+}
+
+void printHelp(QString myname)
+{
+    printUsage(myname);
 
     QString extensions = AudioFileReaderFactory::getKnownExtensions();
     QStringList extlist = extensions.split(" ", QString::SkipEmptyParts);
@@ -177,7 +229,7 @@
                 cerr << "\n  ";
                 c -= 78;
             }
-            cerr << ext.toStdString();
+            cerr << ext;
             if (i + 1 == extlist.size()) cerr << ".";
             else cerr << ", ";
         }
@@ -186,14 +238,15 @@
 
     cerr << "Playlist files in M3U format are also supported." << endl;
     cerr << endl;
+
     cerr << "Transformation options:" << endl;
     cerr << endl;
     cerr << "  -t, --transform <T> Apply transform described in transform file <T> to" << endl;
     cerr << "                      all input audio files.  You may supply this option" << endl;
     cerr << "                      multiple times.  You must supply this option or -T at" << endl;
     cerr << "                      least once for any work to be done.  Transform format" << endl;
-    cerr << "                      may be SV transform XML or Vamp transform RDF.  See" << endl;
-    cerr << "                      documentation for examples." << endl;
+    cerr << "                      may be SV transform XML or Vamp transform RDF/Turtle." << endl;
+    cerr << "                      See documentation for examples." << endl;
     cerr << endl;
     cerr << "  -T, --transforms <T> Apply all transforms described in transform files" << endl;
     cerr << "                      whose names are listed in text file <T>.  You may supply" << endl;
@@ -210,6 +263,7 @@
     cerr << endl;
     cerr << "  -w, --writer <W>    Write output using writer type <W>." << endl;
     cerr << "                      Supported writer types are: ";
+    set<string> writers = FeatureWriterFactory::getWriterTags();
     for (set<string>::const_iterator i = writers.begin();
          i != writers.end(); ) {
         cerr << *i;
@@ -222,7 +276,7 @@
     cerr << endl;
     cerr << "  -S, --summary <S>   In addition to the result features, write summary feature" << endl;
     cerr << "                      of summary type <S>." << endl;
-    cerr << "                      Supported summary types are: min, max, mean, median, mode," << endl;
+    cerr << "                      Supported summary types are min, max, mean, median, mode," << endl;
     cerr << "                      sum, variance, sd, count." << endl;
     cerr << "                      You may supply this option multiple times." << endl;
     cerr << endl;
@@ -233,20 +287,19 @@
     cerr << "                      Summarise in segments, with segment boundaries" << endl;
     cerr << "                      at A, B, ... seconds." << endl;
     cerr << endl;
-
-/*!!! This feature not implemented yet (sniff)
     cerr << "  -m, --multiplex     If multiple input audio files are given, use mono" << endl;
     cerr << "                      mixdowns of all files as the input channels for a single" << endl;
     cerr << "                      invocation of each transform, instead of running the" << endl;
-    cerr << "                      transform against all files separately." << endl;
+    cerr << "                      transform against all files separately. The first file" << endl;
+    cerr << "                      will be used for output reference name and sample rate." << endl;
     cerr << endl;
-*/
-
     cerr << "  -r, --recursive     If any of the <audio> arguments is found to be a local" << endl;
     cerr << "                      directory, search the tree starting at that directory" << endl;
     cerr << "                      for all supported audio files and take all of those as" << endl;
     cerr << "                      input instead." << endl;
     cerr << endl;
+    cerr << "  -n, --normalise     Normalise input audio files to signal absolute max = 1.f." << endl;
+    cerr << endl;
     cerr << "  -f, --force         Continue with subsequent files following an error." << endl;
     cerr << endl;
     cerr << "Housekeeping options:" << endl;
@@ -257,7 +310,12 @@
     cerr << "                      and write it to standard output." << endl;
     cerr << endl;
     cerr << "  -v, --version       Show the version number and exit." << endl;
-    cerr << "  -h, --help          Show this help." << endl;
+    cerr << endl;
+    cerr << "      --minversion <V> Exit with successful return code if the version of" << endl;
+    cerr << "                      " << myname << " is at least <V>, failure otherwise." << endl;
+    cerr << "                      For scripts that depend on certain option support." << endl;
+    cerr << endl;
+    cerr << "  -h, --help          Show help." << endl;
 
     cerr << endl;
     cerr << "If no -w (or --writer) options are supplied, either the -l -s -v or -h option" << endl;
@@ -286,12 +344,11 @@
             for (int k = 0; k < spaceage; ++k) cerr << " ";
             QString s(j->description.c_str());
             s = wrap(s, 56, 22);
-            cerr << s.toStdString() << endl;
+            cerr << s << endl;
         }
     }
 
     cerr << endl;
-    exit(0);
 }
 
 void
@@ -304,7 +361,7 @@
          iter != transforms.end(); ++iter) {
         const TransformDescription &transform = *iter;
         if (transform.type == TransformDescription::Analysis) {
-            cout << transform.identifier.toStdString() << endl;
+            cout << transform.identifier << endl;
         }
     }
 }    
@@ -319,7 +376,7 @@
          << "@prefix :         <#> ." << endl << endl;
     QString rdf = RDFTransformFactory::writeTransformToRDF
         (transform, ":transform");
-    cout << rdf.toStdString();
+    cout << rdf;
 }    
 
 void
@@ -328,8 +385,8 @@
     QDir dir(dirname);
 
     QString printable = dir.dirName().left(20);
-    cerr << "\rScanning \"" << printable.toStdString() << "\"..."
-         << QString("                    ").left(20 - printable.length()).toStdString()
+    cerr << "\rScanning \"" << printable << "\"..."
+         << QString("                    ").left(20 - printable.length())
          << " [" << found << " audio file(s)]";
 
     QString extensions = AudioFileReaderFactory::getKnownExtensions();
@@ -349,6 +406,38 @@
     }
 }
 
+QStringList
+expandPlaylists(QStringList sources)
+{
+    QStringList expanded;
+    foreach (QString path, sources) {
+        if (QFileInfo(path).suffix().toLower() == "m3u") {
+            ProgressPrinter retrievalProgress("Opening playlist file...");
+            FileSource source(path, &retrievalProgress);
+            if (!source.isAvailable()) {
+                // Don't fail or throw an exception here, just keep
+                // the file in the list -- it will be tested again
+                // when adding it as a source and that's the proper
+                // time to fail. All we're concluding here is that it
+                // isn't a valid playlist
+                expanded.push_back(path);
+                continue;
+            }
+            source.waitForData();
+            PlaylistFileReader reader(source);
+            if (reader.isOK()) {
+                vector<QString> files = reader.load();
+                for (int i = 0; i < (int)files.size(); ++i) {
+                    expanded.push_back(files[i]);
+                }
+            }
+        } else {
+            // not a playlist
+            expanded.push_back(path);
+        }
+    }
+    return expanded;
+}
 
 int main(int argc, char **argv)
 {
@@ -365,11 +454,13 @@
     set<string> requestedDefaultTransforms;
     set<string> requestedSummaryTypes;
     bool force = false;
-//!!!    bool multiplex = false;
+    bool multiplex = false;
     bool recursive = false;
+    bool normalise = false;
     bool list = false;
     bool summaryOnly = false;
     QString skeletonFor = "";
+    QString minVersion = "";
     QString myname = args[0];
     myname = QFileInfo(myname).baseName();
     QStringList otherArgs;
@@ -383,7 +474,8 @@
         bool last = ((i + 1) == args.size());
         
         if (arg == "-h" || arg == "--help" || arg == "-?") {
-            usage(myname);
+            printHelp(myname);
+            return 0;
         }
 
         if (arg == "-v" || arg == "--version") {
@@ -393,14 +485,14 @@
 
         if (arg == "-w" || arg == "--writer") {
             if (last || args[i+1].startsWith("-")) {
-                cerr << myname.toStdString() << ": argument expected for \""
-                     << arg.toStdString() << "\" option" << endl;
-                cerr << helpStr.toStdString() << endl;
+                cerr << myname << ": argument expected for \""
+                     << arg << "\" option" << endl;
+                cerr << helpStr << endl;
                 exit(2);
             } else {
                 string tag = args[++i].toStdString();
                 if (requestedWriterTags.find(tag) != requestedWriterTags.end()) {
-                    cerr << myname.toStdString() << ": NOTE: duplicate specification of writer type \"" << tag << "\" ignored" << endl;
+                    cerr << myname << ": NOTE: duplicate specification of writer type \"" << tag << "\" ignored" << endl;
                 } else {
                     requestedWriterTags.insert(tag);
                 }
@@ -408,15 +500,15 @@
             }
         } else if (arg == "-t" || arg == "--transform") {
             if (last || args[i+1].startsWith("-")) {
-                cerr << myname.toStdString() << ": argument expected for \""
-                     << arg.toStdString() << "\" option" << endl;
-                cerr << helpStr.toStdString() << endl;
+                cerr << myname << ": argument expected for \""
+                     << arg << "\" option" << endl;
+                cerr << helpStr << endl;
                 exit(2);
             } else {
                 string transform = args[++i].toStdString();
                 if (requestedTransformFiles.find(transform) !=
                     requestedTransformFiles.end()) {
-                    cerr << myname.toStdString() << ": NOTE: duplicate specification of transform file \"" << transform << "\" ignored" << endl;
+                    cerr << myname << ": NOTE: duplicate specification of transform file \"" << transform << "\" ignored" << endl;
                 } else {
                     requestedTransformFiles.insert(transform);
                 }
@@ -424,15 +516,15 @@
             }
         } else if (arg == "-T" || arg == "--transforms") {
             if (last || args[i+1].startsWith("-")) {
-                cerr << myname.toStdString() << ": argument expected for \""
-                     << arg.toStdString() << "\" option" << endl;
-                cerr << helpStr.toStdString() << endl;
+                cerr << myname << ": argument expected for \""
+                     << arg << "\" option" << endl;
+                cerr << helpStr << endl;
                 exit(2);
             } else {
                 string transform = args[++i].toStdString();
                 if (requestedTransformListFiles.find(transform) !=
                     requestedTransformListFiles.end()) {
-                    cerr << myname.toStdString() << ": NOTE: duplicate specification of transform list file \"" << transform << "\" ignored" << endl;
+                    cerr << myname << ": NOTE: duplicate specification of transform list file \"" << transform << "\" ignored" << endl;
                 } else {
                     requestedTransformListFiles.insert(transform);
                 }
@@ -440,15 +532,15 @@
             }
         } else if (arg == "-d" || arg == "--default") {
             if (last || args[i+1].startsWith("-")) {
-                cerr << myname.toStdString() << ": argument expected for \""
-                     << arg.toStdString() << "\" option" << endl;
-                cerr << helpStr.toStdString() << endl;
+                cerr << myname << ": argument expected for \""
+                     << arg << "\" option" << endl;
+                cerr << helpStr << endl;
                 exit(2);
             } else {
                 string deft = args[++i].toStdString();
                 if (requestedDefaultTransforms.find(deft) !=
                     requestedDefaultTransforms.end()) {
-                    cerr << myname.toStdString() << ": NOTE: duplicate specification of default transform \"" << deft << "\" ignored" << endl;
+                    cerr << myname << ": NOTE: duplicate specification of default transform \"" << deft << "\" ignored" << endl;
                 } else {
                     requestedDefaultTransforms.insert(deft);
                 }
@@ -456,9 +548,9 @@
             }
         } else if (arg == "-S" || arg == "--summary") {
             if (last || args[i+1].startsWith("-")) {
-                cerr << myname.toStdString() << ": argument expected for \""
-                     << arg.toStdString() << "\" option" << endl;
-                cerr << helpStr.toStdString() << endl;
+                cerr << myname << ": argument expected for \""
+                     << arg << "\" option" << endl;
+                cerr << helpStr << endl;
                 exit(2);
             } else {
                 string summary = args[++i].toStdString();
@@ -470,9 +562,9 @@
             continue;
         } else if (arg == "--segments") {
             if (last) {
-                cerr << myname.toStdString() << ": argument expected for \""
-                     << arg.toStdString() << "\" option" << endl;
-                cerr << helpStr.toStdString() << endl;
+                cerr << myname << ": argument expected for \""
+                     << arg << "\" option" << endl;
+                cerr << helpStr << endl;
                 exit(2);
             } else {
                 string segmentSpec = args[++i].toStdString();
@@ -482,34 +574,42 @@
                     boundaries.insert(Vamp::RealTime::fromSeconds
                                       (segmentStrs[j].toDouble(&good)));
                     if (!good) {
-                        cerr << myname.toStdString() << ": segment boundaries must be numeric" << endl;
-                        cerr << helpStr.toStdString() << endl;
+                        cerr << myname << ": segment boundaries must be numeric" << endl;
+                        cerr << helpStr << endl;
                         exit(2);
                     }
                 }
             }
-/*!!!
         } else if (arg == "-m" || arg == "--multiplex") {
             multiplex = true;
-            cerr << myname.toStdString()
-                 << ": WARNING: Multiplex argument not yet implemented" << endl; //!!!
             continue;
-*/
         } else if (arg == "-r" || arg == "--recursive") {
             recursive = true;
             continue;
+        } else if (arg == "-n" || arg == "--normalise") {
+            normalise = true;
+            continue;
         } else if (arg == "-f" || arg == "--force") {
             force = true;
             continue;
         } else if (arg == "-l" || arg == "--list") {
             list = true;
             continue;
+        } else if (arg == "--minversion") {
+            if (last || args[i+1].startsWith("-")) {
+                cerr << myname << ": usage: "
+                     << myname << " " << arg << " <version>" << endl;
+                cerr << helpStr << endl;
+                exit(2);
+            }
+            minVersion = args[++i];
+            continue;
         } else if (arg == "-s" || arg == "--skeleton") {
             if (last || args[i+1].startsWith("-")) {
-                cerr << myname.toStdString() << ": usage: "
-                     << myname.toStdString() << " " << arg.toStdString()
+                cerr << myname << ": usage: "
+                     << myname << " " << arg
                      << " <transform>" << endl;
-                cerr << helpStr.toStdString() << endl;
+                cerr << helpStr << endl;
                 exit(2);
             } else {
                 skeletonFor = args[++i];
@@ -522,7 +622,7 @@
 
     if (list) {
         if (!requestedWriterTags.empty() || skeletonFor != "") {
-            cerr << helpStr.toStdString() << endl;
+            cerr << helpStr << endl;
             exit(2);
         }
         listTransforms();
@@ -530,35 +630,42 @@
     }
     if (skeletonFor != "") {
         if (!requestedWriterTags.empty()) {
-            cerr << helpStr.toStdString() << endl;
+            cerr << helpStr << endl;
             exit(2);
         }
         printSkeleton(skeletonFor);
         exit(0);
     }
+    if (minVersion != "") {
+        if (!requestedWriterTags.empty()) {
+            cerr << helpStr << endl;
+            exit(2);
+        }
+        exit(checkMinVersion(myname, minVersion));
+    }
 
     if (requestedTransformFiles.empty() &&
         requestedTransformListFiles.empty() &&
         requestedDefaultTransforms.empty()) {
-        cerr << myname.toStdString()
+        cerr << myname
              << ": no transform(s) specified" << endl;
-        cerr << helpStr.toStdString() << endl;
+        cerr << helpStr << endl;
         exit(2);
     }
 
     if (requestedWriterTags.empty()) {
-        cerr << myname.toStdString()
+        cerr << myname
              << ": no writer(s) specified" << endl;
-        cerr << helpStr.toStdString() << endl;
+        cerr << helpStr << endl;
         exit(2);
     }
 
     if (!boundaries.empty()) {
         if (requestedSummaryTypes.empty()) {
-            cerr << myname.toStdString()
+            cerr << myname
                  << ": summary segment boundaries provided, but no summary type specified"
                  << endl;
-            cerr << helpStr.toStdString() << endl;
+            cerr << helpStr << endl;
             exit(2);
         }
     }
@@ -584,16 +691,19 @@
 
     FeatureExtractionManager manager;
 
+    manager.setNormalise(normalise);
+
     if (!requestedSummaryTypes.empty()) {
         if (!manager.setSummaryTypes(requestedSummaryTypes,
-                                     summaryOnly,
                                      boundaries)) {
-            cerr << myname.toStdString()
+            cerr << myname
                  << ": failed to set requested summary types" << endl;
             exit(1);
         }
     }
-    
+
+    manager.setSummariesOnly(summaryOnly);
+
     vector<FeatureWriter *> writers;
 
     for (set<string>::const_iterator i = requestedWriterTags.begin();
@@ -602,22 +712,22 @@
         FeatureWriter *writer = FeatureWriterFactory::createWriter(*i);
 
         if (!writer) {
-            cerr << myname.toStdString() << ": unknown feature writer \""
+            cerr << myname << ": unknown feature writer \""
                  << *i << "\"" << endl;
-            cerr << helpStr.toStdString() << endl;
+            cerr << helpStr << endl;
             exit(2);
         }
 
         map<string, string> writerArgs;
         FeatureWriter::ParameterList pl(writer->getSupportedParameters());
 
-        for (int k = 0; k < pl.size(); ++k) {
+        for (int k = 0; k < (int)pl.size(); ++k) {
             
             string argbase = pl[k].name;
             QString literal = QString("--%1-%2")
                 .arg(i->c_str()).arg(argbase.c_str());
             
-            for (int j = 0; j < otherArgs.size(); ) {
+            for (int j = 0; j < (int)otherArgs.size(); ) {
                 
                 if (otherArgs[j] != literal) {
                     ++j;
@@ -631,11 +741,11 @@
                         writerArgs[argbase] = otherArgs[j].toStdString();
                         otherArgs.removeAt(j);
                     } else {
-                        cerr << myname.toStdString() << ": "
+                        cerr << myname << ": "
                              << "argument required for \""
-                             << literal.toStdString() << "\" option"
+                             << literal << "\" option"
                              << endl;
-                        cerr << helpStr.toStdString() << endl;
+                        cerr << helpStr << endl;
                         exit(2);
                     }
                 } else {
@@ -651,16 +761,16 @@
 
     for (int i = 0; i < otherArgs.size(); ++i) {
         if (otherArgs[i].startsWith("-")) {
-            cerr << myname.toStdString() << ": unknown option \""
-                 << otherArgs[i].toStdString() << "\"" << endl;
-            cerr << helpStr.toStdString() << endl;
+            cerr << myname << ": unknown option \""
+                 << otherArgs[i] << "\"" << endl;
+            cerr << helpStr << endl;
             exit(2);
         }
     }
 
     if (otherArgs.empty()) {
-        cerr << myname.toStdString() << ": no input(s) specified" << endl;
-        cerr << helpStr.toStdString() << endl;
+        cerr << myname << ": no input(s) specified" << endl;
+        cerr << helpStr << endl;
         exit(2);
     }    
 
@@ -669,11 +779,11 @@
         PlaylistFileReader reader(i->c_str());
         if (reader.isOK()) {
             vector<QString> files = reader.load();
-            for (int j = 0; j < files.size(); ++j) {
+            for (int j = 0; j < (int)files.size(); ++j) {
                 requestedTransformFiles.insert(files[j].toStdString());
             }
         } else {
-            cerr << myname.toStdString() << ": failed to read template list file \"" << *i << "\"" << endl;
+            cerr << myname << ": failed to read template list file \"" << *i << "\"" << endl;
             exit(2);
         }
     }
@@ -695,13 +805,15 @@
         }
     }
 
+    sources = expandPlaylists(sources);
+        
     bool good = true;
     QSet<QString> badSources;
 
     for (QStringList::const_iterator i = sources.begin();
          i != sources.end(); ++i) {
         try {
-            manager.addSource(*i);
+            manager.addSource(*i, multiplex);
         } catch (const std::exception &e) {
             badSources.insert(*i);
             cerr << "ERROR: Failed to process file \"" << i->toStdString()
@@ -729,6 +841,9 @@
              i != requestedTransformFiles.end(); ++i) {
             if (manager.addFeatureExtractorFromFile(i->c_str(), writers)) {
                 haveFeatureExtractor = true;
+            } else {
+                cerr << "ERROR: Failed to add feature extractor from transform file \"" << *i << "\"" << endl;
+                good = false;
             }
         }
 
@@ -736,42 +851,60 @@
              i != requestedDefaultTransforms.end(); ++i) {
             if (manager.addDefaultFeatureExtractor(i->c_str(), writers)) {
                 haveFeatureExtractor = true;
+            } else {
+                cerr << "ERROR: Failed to add default feature extractor for transform \"" << *i << "\"" << endl;
+                good = false;
             }
         }
 
         if (!haveFeatureExtractor) {
-            cerr << myname.toStdString() << ": no feature extractors added" << endl;
+            cerr << myname << ": no feature extractors added" << endl;
             good = false;
         }
     }
 
     if (good) {
-        for (QStringList::const_iterator i = sources.begin();
-             i != sources.end(); ++i) {
-            if (badSources.contains(*i)) continue;
-            std::cerr << "Extracting features for: \"" << i->toStdString() << "\"" << std::endl;
+        QStringList goodSources;
+        foreach (QString source, sources) {
+            if (!badSources.contains(source)) {
+                goodSources.push_back(source);
+            }
+        }
+        if (multiplex) {
             try {
-                manager.extractFeatures(*i, force);
+                manager.extractFeaturesMultiplexed(goodSources);
             } catch (const std::exception &e) {
-                cerr << "ERROR: Feature extraction failed for \"" << i->toStdString()
-                     << "\": " << e.what() << endl;
-                if (force) {
-                    // print a note only if we have more files to process
-                    QStringList::const_iterator j = i;
-                    if (++j != sources.end()) {
-                        cerr << "NOTE: \"--force\" option was provided, continuing (more errors may occur)" << endl;
+                cerr << "ERROR: Feature extraction failed: "
+                     << e.what() << endl;
+            }
+        } else {
+            for (QStringList::const_iterator i = goodSources.begin();
+                 i != goodSources.end(); ++i) {
+                std::cerr << "Extracting features for: \"" << i->toStdString()
+                          << "\"" << std::endl;
+                try {
+                    manager.extractFeatures(*i);
+                } catch (const std::exception &e) {
+                    cerr << "ERROR: Feature extraction failed for \""
+                         << i->toStdString() << "\": " << e.what() << endl;
+                    if (force) {
+                        // print a note only if we have more files to process
+                        QStringList::const_iterator j = i;
+                        if (++j != sources.end()) {
+                            cerr << "NOTE: \"--force\" option was provided, continuing (more errors may occur)" << endl;
+                        }
+                    } else {
+                        cerr << "NOTE: If you want to continue with processing any further files after an" << endl
+                             << "error like this, use the --force option" << endl;
+                        good = false;
+                        break;
                     }
-                } else {
-                    cerr << "NOTE: If you want to continue with processing any further files after an" << endl
-                         << "error like this, use the --force option" << endl;
-                    good = false;
-                    break;
                 }
             }
         }
     }
     
-    for (int i = 0; i < writers.size(); ++i) delete writers[i];
+    for (int i = 0; i < (int)writers.size(); ++i) delete writers[i];
 
 #ifdef HAVE_FFTW3
     settings.beginGroup("FFTWisdom");
Binary file tests/audio/3clicks8quiet.wav has changed
Binary file tests/audio/6clicks.ogg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/audio/playlist.m3u	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,2 @@
+3clicks.mp3
+6clicks.ogg
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/audio/remote-playlist.m3u	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,2 @@
+http://vamp-plugins.org/sonic-annotator/testfiles/3clicks.mp3
+6clicks.ogg
--- a/tests/expected/transforms-audioformat-percussiononsets-mp3.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-"./audio/3clicks.mp3",0.058049886
-,0.824308390
-,1.706666666
-,2.461315192
--- a/tests/expected/transforms-audioformat-percussiononsets-ogg.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-"./audio/3clicks.ogg",0.777868480
-,1.648616780
-,2.414875283
--- a/tests/expected/transforms-audioformat-percussiononsets-wav.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-"./audio/3clicks8.wav",0.777868480
-,1.648616780
-,2.414875283
--- a/tests/expected/transforms-basic-percussiononsets-df-windowtype-default.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,448 +0,0 @@
-"./audio/3clicks8.wav",0.000000000,0
-,0.011609977,207
-,0.023219954,170
-,0.034829931,184
-,0.046439909,166
-,0.058049886,174
-,0.069659863,179
-,0.081269841,162
-,0.092879818,157
-,0.104489795,156
-,0.116099773,182
-,0.127709750,168
-,0.139319727,168
-,0.150929705,155
-,0.162539682,200
-,0.174149659,163
-,0.185759637,178
-,0.197369614,164
-,0.208979591,166
-,0.220589569,137
-,0.232199546,155
-,0.243809523,177
-,0.255419501,145
-,0.267029478,172
-,0.278639455,155
-,0.290249433,201
-,0.301859410,166
-,0.313469387,169
-,0.325079365,158
-,0.336689342,169
-,0.348299319,155
-,0.359909297,187
-,0.371519274,177
-,0.383129251,149
-,0.394739229,196
-,0.406349206,160
-,0.417959183,174
-,0.429569160,165
-,0.441179138,149
-,0.452789115,181
-,0.464399092,180
-,0.476009070,156
-,0.487619047,163
-,0.499229024,188
-,0.510839002,173
-,0.522448979,160
-,0.534058956,168
-,0.545668934,154
-,0.557278911,155
-,0.568888888,161
-,0.580498866,163
-,0.592108843,172
-,0.603718820,168
-,0.615328798,181
-,0.626938775,167
-,0.638548752,172
-,0.650158730,158
-,0.661768707,172
-,0.673378684,167
-,0.684988662,180
-,0.696598639,188
-,0.708208616,160
-,0.719818594,166
-,0.731428571,158
-,0.743038548,176
-,0.754648526,153
-,0.766258503,173
-,0.777868480,449
-,0.789478458,30
-,0.801088435,70
-,0.812698412,181
-,0.824308390,165
-,0.835918367,174
-,0.847528344,181
-,0.859138321,179
-,0.870748299,154
-,0.882358276,169
-,0.893968253,150
-,0.905578231,189
-,0.917188208,159
-,0.928798185,172
-,0.940408163,157
-,0.952018140,167
-,0.963628117,169
-,0.975238095,155
-,0.986848072,189
-,0.998458049,178
-,1.010068027,168
-,1.021678004,169
-,1.033287981,178
-,1.044897959,157
-,1.056507936,166
-,1.068117913,162
-,1.079727891,170
-,1.091337868,186
-,1.102947845,178
-,1.114557823,178
-,1.126167800,155
-,1.137777777,173
-,1.149387755,156
-,1.160997732,158
-,1.172607709,170
-,1.184217687,167
-,1.195827664,160
-,1.207437641,180
-,1.219047619,153
-,1.230657596,154
-,1.242267573,171
-,1.253877551,159
-,1.265487528,194
-,1.277097505,170
-,1.288707482,157
-,1.300317460,184
-,1.311927437,156
-,1.323537414,173
-,1.335147392,184
-,1.346757369,168
-,1.358367346,182
-,1.369977324,147
-,1.381587301,164
-,1.393197278,163
-,1.404807256,165
-,1.416417233,181
-,1.428027210,172
-,1.439637188,169
-,1.451247165,165
-,1.462857142,166
-,1.474467120,158
-,1.486077097,162
-,1.497687074,188
-,1.509297052,176
-,1.520907029,176
-,1.532517006,159
-,1.544126984,183
-,1.555736961,178
-,1.567346938,168
-,1.578956916,171
-,1.590566893,158
-,1.602176870,153
-,1.613786848,189
-,1.625396825,171
-,1.637006802,142
-,1.648616780,503
-,1.660226757,0
-,1.671836734,30
-,1.683446712,189
-,1.695056689,146
-,1.706666666,174
-,1.718276643,171
-,1.729886621,169
-,1.741496598,164
-,1.753106575,181
-,1.764716553,180
-,1.776326530,163
-,1.787936507,174
-,1.799546485,135
-,1.811156462,193
-,1.822766439,187
-,1.834376417,176
-,1.845986394,172
-,1.857596371,155
-,1.869206349,185
-,1.880816326,167
-,1.892426303,173
-,1.904036281,162
-,1.915646258,166
-,1.927256235,167
-,1.938866213,179
-,1.950476190,170
-,1.962086167,158
-,1.973696145,168
-,1.985306122,162
-,1.996916099,182
-,2.008526077,167
-,2.020136054,185
-,2.031746031,165
-,2.043356009,184
-,2.054965986,157
-,2.066575963,167
-,2.078185941,164
-,2.089795918,160
-,2.101405895,181
-,2.113015873,165
-,2.124625850,181
-,2.136235827,161
-,2.147845804,176
-,2.159455782,177
-,2.171065759,150
-,2.182675736,185
-,2.194285714,173
-,2.205895691,162
-,2.217505668,169
-,2.229115646,171
-,2.240725623,140
-,2.252335600,196
-,2.263945578,155
-,2.275555555,171
-,2.287165532,186
-,2.298775510,157
-,2.310385487,166
-,2.321995464,169
-,2.333605442,183
-,2.345215419,186
-,2.356825396,138
-,2.368435374,162
-,2.380045351,180
-,2.391655328,165
-,2.403265306,181
-,2.414875283,444
-,2.426485260,27
-,2.438095238,150
-,2.449705215,166
-,2.461315192,177
-,2.472925170,174
-,2.484535147,165
-,2.496145124,158
-,2.507755102,178
-,2.519365079,177
-,2.530975056,172
-,2.542585034,174
-,2.554195011,168
-,2.565804988,165
-,2.577414965,168
-,2.589024943,149
-,2.600634920,171
-,2.612244897,164
-,2.623854875,163
-,2.635464852,182
-,2.647074829,162
-,2.658684807,156
-,2.670294784,173
-,2.681904761,188
-,2.693514739,166
-,2.705124716,157
-,2.716734693,170
-,2.728344671,167
-,2.739954648,191
-,2.751564625,154
-,2.763174603,175
-,2.774784580,157
-,2.786394557,169
-,2.798004535,160
-,2.809614512,163
-,2.821224489,191
-,2.832834467,158
-,2.844444444,184
-,2.856054421,164
-,2.867664399,176
-,2.879274376,182
-,2.890884353,180
-,2.902494331,138
-,2.914104308,170
-,2.925714285,172
-,2.937324263,172
-,2.948934240,168
-,2.960544217,186
-,2.972154195,171
-,2.983764172,154
-,2.995374149,185
-,3.006984126,172
-,3.018594104,164
-,3.030204081,176
-,3.041814058,195
-,3.053424036,160
-,3.065034013,124
-,3.076643990,181
-,3.088253968,170
-,3.099863945,178
-,3.111473922,165
-,3.123083900,164
-,3.134693877,194
-,3.146303854,157
-,3.157913832,205
-,3.169523809,163
-,3.181133786,159
-,3.192743764,184
-,3.204353741,145
-,3.215963718,170
-,3.227573696,155
-,3.239183673,161
-,3.250793650,164
-,3.262403628,184
-,3.274013605,175
-,3.285623582,155
-,3.297233560,164
-,3.308843537,181
-,3.320453514,182
-,3.332063492,145
-,3.343673469,177
-,3.355283446,162
-,3.366893424,153
-,3.378503401,185
-,3.390113378,174
-,3.401723356,167
-,3.413333333,187
-,3.424943310,157
-,3.436553287,170
-,3.448163265,169
-,3.459773242,166
-,3.471383219,171
-,3.482993197,165
-,3.494603174,158
-,3.506213151,181
-,3.517823129,168
-,3.529433106,175
-,3.541043083,162
-,3.552653061,167
-,3.564263038,179
-,3.575873015,167
-,3.587482993,156
-,3.599092970,209
-,3.610702947,179
-,3.622312925,159
-,3.633922902,180
-,3.645532879,152
-,3.657142857,169
-,3.668752834,189
-,3.680362811,170
-,3.691972789,156
-,3.703582766,165
-,3.715192743,179
-,3.726802721,173
-,3.738412698,163
-,3.750022675,170
-,3.761632653,181
-,3.773242630,177
-,3.784852607,181
-,3.796462585,166
-,3.808072562,153
-,3.819682539,164
-,3.831292517,209
-,3.842902494,159
-,3.854512471,194
-,3.866122448,164
-,3.877732426,184
-,3.889342403,163
-,3.900952380,173
-,3.912562358,165
-,3.924172335,164
-,3.935782312,182
-,3.947392290,170
-,3.959002267,160
-,3.970612244,173
-,3.982222222,160
-,3.993832199,174
-,4.005442176,179
-,4.017052154,179
-,4.028662131,145
-,4.040272108,196
-,4.051882086,155
-,4.063492063,170
-,4.075102040,180
-,4.086712018,156
-,4.098321995,159
-,4.109931972,182
-,4.121541950,175
-,4.133151927,173
-,4.144761904,164
-,4.156371882,186
-,4.167981859,160
-,4.179591836,175
-,4.191201814,178
-,4.202811791,159
-,4.214421768,177
-,4.226031746,181
-,4.237641723,177
-,4.249251700,163
-,4.260861678,158
-,4.272471655,188
-,4.284081632,163
-,4.295691609,158
-,4.307301587,164
-,4.318911564,164
-,4.330521541,183
-,4.342131519,160
-,4.353741496,182
-,4.365351473,172
-,4.376961451,172
-,4.388571428,179
-,4.400181405,154
-,4.411791383,166
-,4.423401360,174
-,4.435011337,156
-,4.446621315,174
-,4.458231292,169
-,4.469841269,169
-,4.481451247,178
-,4.493061224,175
-,4.504671201,193
-,4.516281179,153
-,4.527891156,160
-,4.539501133,176
-,4.551111111,167
-,4.562721088,184
-,4.574331065,163
-,4.585941043,150
-,4.597551020,156
-,4.609160997,182
-,4.620770975,168
-,4.632380952,168
-,4.643990929,152
-,4.655600907,174
-,4.667210884,186
-,4.678820861,168
-,4.690430839,173
-,4.702040816,184
-,4.713650793,169
-,4.725260770,166
-,4.736870748,164
-,4.748480725,193
-,4.760090702,155
-,4.771700680,164
-,4.783310657,181
-,4.794920634,142
-,4.806530612,183
-,4.818140589,181
-,4.829750566,185
-,4.841360544,171
-,4.852970521,184
-,4.864580498,156
-,4.876190476,162
-,4.887800453,182
-,4.899410430,161
-,4.911020408,175
-,4.922630385,168
-,4.934240362,172
-,4.945850340,151
-,4.957460317,176
-,4.969070294,171
-,4.980680272,93
-,4.992290249,0
-,5.003900226,0
-,5.015510204,0
-,5.027120181,0
-,5.038730158,0
-,5.050340136,0
-,5.061950113,0
-,5.073560090,0
-,5.085170068,0
-,5.096780045,0
-,5.108390022,0
-,5.120000000,0
-,5.131609977,0
-,5.143219954,0
-,5.154829931,0
-,5.166439909,0
-,5.178049886,0
-,5.189659863,0
--- a/tests/expected/transforms-basic-percussiononsets-df-windowtype-hamming.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,448 +0,0 @@
-"./audio/3clicks8.wav",0.000000000,0
-,0.011609977,209
-,0.023219954,168
-,0.034829931,177
-,0.046439909,164
-,0.058049886,169
-,0.069659863,176
-,0.081269841,162
-,0.092879818,154
-,0.104489795,160
-,0.116099773,181
-,0.127709750,172
-,0.139319727,165
-,0.150929705,151
-,0.162539682,200
-,0.174149659,161
-,0.185759637,171
-,0.197369614,164
-,0.208979591,165
-,0.220589569,138
-,0.232199546,150
-,0.243809523,176
-,0.255419501,151
-,0.267029478,168
-,0.278639455,157
-,0.290249433,201
-,0.301859410,171
-,0.313469387,171
-,0.325079365,166
-,0.336689342,169
-,0.348299319,161
-,0.359909297,191
-,0.371519274,179
-,0.383129251,148
-,0.394739229,189
-,0.406349206,157
-,0.417959183,176
-,0.429569160,163
-,0.441179138,153
-,0.452789115,178
-,0.464399092,185
-,0.476009070,163
-,0.487619047,152
-,0.499229024,186
-,0.510839002,168
-,0.522448979,161
-,0.534058956,170
-,0.545668934,158
-,0.557278911,150
-,0.568888888,161
-,0.580498866,163
-,0.592108843,173
-,0.603718820,169
-,0.615328798,188
-,0.626938775,165
-,0.638548752,177
-,0.650158730,156
-,0.661768707,172
-,0.673378684,164
-,0.684988662,178
-,0.696598639,184
-,0.708208616,161
-,0.719818594,169
-,0.731428571,157
-,0.743038548,176
-,0.754648526,155
-,0.766258503,173
-,0.777868480,450
-,0.789478458,29
-,0.801088435,55
-,0.812698412,184
-,0.824308390,155
-,0.835918367,168
-,0.847528344,184
-,0.859138321,175
-,0.870748299,156
-,0.882358276,166
-,0.893968253,148
-,0.905578231,183
-,0.917188208,160
-,0.928798185,174
-,0.940408163,161
-,0.952018140,170
-,0.963628117,167
-,0.975238095,156
-,0.986848072,189
-,0.998458049,181
-,1.010068027,169
-,1.021678004,168
-,1.033287981,171
-,1.044897959,160
-,1.056507936,164
-,1.068117913,168
-,1.079727891,170
-,1.091337868,181
-,1.102947845,177
-,1.114557823,162
-,1.126167800,158
-,1.137777777,180
-,1.149387755,156
-,1.160997732,150
-,1.172607709,170
-,1.184217687,169
-,1.195827664,160
-,1.207437641,175
-,1.219047619,159
-,1.230657596,152
-,1.242267573,169
-,1.253877551,159
-,1.265487528,190
-,1.277097505,166
-,1.288707482,152
-,1.300317460,183
-,1.311927437,162
-,1.323537414,169
-,1.335147392,176
-,1.346757369,168
-,1.358367346,180
-,1.369977324,147
-,1.381587301,164
-,1.393197278,160
-,1.404807256,165
-,1.416417233,181
-,1.428027210,171
-,1.439637188,165
-,1.451247165,167
-,1.462857142,167
-,1.474467120,154
-,1.486077097,167
-,1.497687074,189
-,1.509297052,172
-,1.520907029,169
-,1.532517006,153
-,1.544126984,179
-,1.555736961,175
-,1.567346938,178
-,1.578956916,169
-,1.590566893,156
-,1.602176870,157
-,1.613786848,183
-,1.625396825,171
-,1.637006802,142
-,1.648616780,503
-,1.660226757,0
-,1.671836734,23
-,1.683446712,181
-,1.695056689,147
-,1.706666666,174
-,1.718276643,174
-,1.729886621,156
-,1.741496598,161
-,1.753106575,171
-,1.764716553,185
-,1.776326530,167
-,1.787936507,170
-,1.799546485,126
-,1.811156462,191
-,1.822766439,185
-,1.834376417,176
-,1.845986394,175
-,1.857596371,153
-,1.869206349,176
-,1.880816326,165
-,1.892426303,177
-,1.904036281,165
-,1.915646258,158
-,1.927256235,163
-,1.938866213,175
-,1.950476190,169
-,1.962086167,158
-,1.973696145,170
-,1.985306122,161
-,1.996916099,188
-,2.008526077,168
-,2.020136054,187
-,2.031746031,168
-,2.043356009,193
-,2.054965986,160
-,2.066575963,166
-,2.078185941,164
-,2.089795918,164
-,2.101405895,182
-,2.113015873,167
-,2.124625850,174
-,2.136235827,165
-,2.147845804,171
-,2.159455782,173
-,2.171065759,153
-,2.182675736,179
-,2.194285714,178
-,2.205895691,158
-,2.217505668,165
-,2.229115646,173
-,2.240725623,137
-,2.252335600,186
-,2.263945578,154
-,2.275555555,164
-,2.287165532,187
-,2.298775510,155
-,2.310385487,162
-,2.321995464,166
-,2.333605442,180
-,2.345215419,184
-,2.356825396,143
-,2.368435374,161
-,2.380045351,175
-,2.391655328,162
-,2.403265306,253
-,2.414875283,435
-,2.426485260,33
-,2.438095238,56
-,2.449705215,166
-,2.461315192,173
-,2.472925170,170
-,2.484535147,155
-,2.496145124,154
-,2.507755102,175
-,2.519365079,181
-,2.530975056,172
-,2.542585034,169
-,2.554195011,164
-,2.565804988,174
-,2.577414965,169
-,2.589024943,142
-,2.600634920,166
-,2.612244897,164
-,2.623854875,165
-,2.635464852,185
-,2.647074829,166
-,2.658684807,155
-,2.670294784,172
-,2.681904761,181
-,2.693514739,161
-,2.705124716,160
-,2.716734693,163
-,2.728344671,160
-,2.739954648,189
-,2.751564625,148
-,2.763174603,175
-,2.774784580,154
-,2.786394557,169
-,2.798004535,159
-,2.809614512,162
-,2.821224489,189
-,2.832834467,160
-,2.844444444,182
-,2.856054421,158
-,2.867664399,181
-,2.879274376,182
-,2.890884353,178
-,2.902494331,146
-,2.914104308,171
-,2.925714285,167
-,2.937324263,167
-,2.948934240,169
-,2.960544217,182
-,2.972154195,174
-,2.983764172,156
-,2.995374149,186
-,3.006984126,169
-,3.018594104,166
-,3.030204081,169
-,3.041814058,189
-,3.053424036,161
-,3.065034013,127
-,3.076643990,182
-,3.088253968,163
-,3.099863945,172
-,3.111473922,162
-,3.123083900,155
-,3.134693877,191
-,3.146303854,152
-,3.157913832,205
-,3.169523809,165
-,3.181133786,152
-,3.192743764,181
-,3.204353741,155
-,3.215963718,174
-,3.227573696,151
-,3.239183673,156
-,3.250793650,168
-,3.262403628,178
-,3.274013605,178
-,3.285623582,159
-,3.297233560,163
-,3.308843537,181
-,3.320453514,184
-,3.332063492,146
-,3.343673469,176
-,3.355283446,160
-,3.366893424,138
-,3.378503401,189
-,3.390113378,174
-,3.401723356,164
-,3.413333333,184
-,3.424943310,161
-,3.436553287,167
-,3.448163265,164
-,3.459773242,167
-,3.471383219,166
-,3.482993197,168
-,3.494603174,163
-,3.506213151,177
-,3.517823129,163
-,3.529433106,170
-,3.541043083,160
-,3.552653061,175
-,3.564263038,178
-,3.575873015,159
-,3.587482993,151
-,3.599092970,204
-,3.610702947,175
-,3.622312925,161
-,3.633922902,178
-,3.645532879,146
-,3.657142857,170
-,3.668752834,187
-,3.680362811,167
-,3.691972789,163
-,3.703582766,172
-,3.715192743,174
-,3.726802721,170
-,3.738412698,158
-,3.750022675,173
-,3.761632653,180
-,3.773242630,173
-,3.784852607,183
-,3.796462585,168
-,3.808072562,150
-,3.819682539,162
-,3.831292517,205
-,3.842902494,159
-,3.854512471,186
-,3.866122448,163
-,3.877732426,182
-,3.889342403,158
-,3.900952380,174
-,3.912562358,163
-,3.924172335,159
-,3.935782312,171
-,3.947392290,167
-,3.959002267,154
-,3.970612244,173
-,3.982222222,162
-,3.993832199,170
-,4.005442176,180
-,4.017052154,182
-,4.028662131,146
-,4.040272108,196
-,4.051882086,151
-,4.063492063,171
-,4.075102040,180
-,4.086712018,163
-,4.098321995,155
-,4.109931972,177
-,4.121541950,172
-,4.133151927,176
-,4.144761904,163
-,4.156371882,184
-,4.167981859,162
-,4.179591836,165
-,4.191201814,182
-,4.202811791,162
-,4.214421768,171
-,4.226031746,180
-,4.237641723,176
-,4.249251700,161
-,4.260861678,167
-,4.272471655,181
-,4.284081632,163
-,4.295691609,155
-,4.307301587,161
-,4.318911564,164
-,4.330521541,186
-,4.342131519,163
-,4.353741496,180
-,4.365351473,170
-,4.376961451,168
-,4.388571428,173
-,4.400181405,156
-,4.411791383,163
-,4.423401360,176
-,4.435011337,151
-,4.446621315,170
-,4.458231292,171
-,4.469841269,169
-,4.481451247,178
-,4.493061224,174
-,4.504671201,191
-,4.516281179,156
-,4.527891156,163
-,4.539501133,176
-,4.551111111,166
-,4.562721088,178
-,4.574331065,160
-,4.585941043,150
-,4.597551020,162
-,4.609160997,179
-,4.620770975,170
-,4.632380952,165
-,4.643990929,151
-,4.655600907,178
-,4.667210884,188
-,4.678820861,162
-,4.690430839,172
-,4.702040816,179
-,4.713650793,170
-,4.725260770,166
-,4.736870748,155
-,4.748480725,198
-,4.760090702,162
-,4.771700680,162
-,4.783310657,184
-,4.794920634,142
-,4.806530612,183
-,4.818140589,184
-,4.829750566,185
-,4.841360544,171
-,4.852970521,177
-,4.864580498,155
-,4.876190476,158
-,4.887800453,178
-,4.899410430,162
-,4.911020408,174
-,4.922630385,174
-,4.934240362,175
-,4.945850340,151
-,4.957460317,177
-,4.969070294,170
-,4.980680272,90
-,4.992290249,0
-,5.003900226,0
-,5.015510204,0
-,5.027120181,0
-,5.038730158,0
-,5.050340136,0
-,5.061950113,0
-,5.073560090,0
-,5.085170068,0
-,5.096780045,0
-,5.108390022,0
-,5.120000000,0
-,5.131609977,0
-,5.143219954,0
-,5.154829931,0
-,5.166439909,0
-,5.178049886,0
-,5.189659863,0
--- a/tests/expected/transforms-basic-percussiononsets-df-windowtype-hanning.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,448 +0,0 @@
-"./audio/3clicks8.wav",0.000000000,0
-,0.011609977,207
-,0.023219954,170
-,0.034829931,184
-,0.046439909,166
-,0.058049886,174
-,0.069659863,179
-,0.081269841,162
-,0.092879818,157
-,0.104489795,156
-,0.116099773,182
-,0.127709750,168
-,0.139319727,168
-,0.150929705,155
-,0.162539682,200
-,0.174149659,163
-,0.185759637,178
-,0.197369614,164
-,0.208979591,166
-,0.220589569,137
-,0.232199546,155
-,0.243809523,177
-,0.255419501,145
-,0.267029478,172
-,0.278639455,155
-,0.290249433,201
-,0.301859410,166
-,0.313469387,169
-,0.325079365,158
-,0.336689342,169
-,0.348299319,155
-,0.359909297,187
-,0.371519274,177
-,0.383129251,149
-,0.394739229,196
-,0.406349206,160
-,0.417959183,174
-,0.429569160,165
-,0.441179138,149
-,0.452789115,181
-,0.464399092,180
-,0.476009070,156
-,0.487619047,163
-,0.499229024,188
-,0.510839002,173
-,0.522448979,160
-,0.534058956,168
-,0.545668934,154
-,0.557278911,155
-,0.568888888,161
-,0.580498866,163
-,0.592108843,172
-,0.603718820,168
-,0.615328798,181
-,0.626938775,167
-,0.638548752,172
-,0.650158730,158
-,0.661768707,172
-,0.673378684,167
-,0.684988662,180
-,0.696598639,188
-,0.708208616,160
-,0.719818594,166
-,0.731428571,158
-,0.743038548,176
-,0.754648526,153
-,0.766258503,173
-,0.777868480,449
-,0.789478458,30
-,0.801088435,70
-,0.812698412,181
-,0.824308390,165
-,0.835918367,174
-,0.847528344,181
-,0.859138321,179
-,0.870748299,154
-,0.882358276,169
-,0.893968253,150
-,0.905578231,189
-,0.917188208,159
-,0.928798185,172
-,0.940408163,157
-,0.952018140,167
-,0.963628117,169
-,0.975238095,155
-,0.986848072,189
-,0.998458049,178
-,1.010068027,168
-,1.021678004,169
-,1.033287981,178
-,1.044897959,157
-,1.056507936,166
-,1.068117913,162
-,1.079727891,170
-,1.091337868,186
-,1.102947845,178
-,1.114557823,178
-,1.126167800,155
-,1.137777777,173
-,1.149387755,156
-,1.160997732,158
-,1.172607709,170
-,1.184217687,167
-,1.195827664,160
-,1.207437641,180
-,1.219047619,153
-,1.230657596,154
-,1.242267573,171
-,1.253877551,159
-,1.265487528,194
-,1.277097505,170
-,1.288707482,157
-,1.300317460,184
-,1.311927437,156
-,1.323537414,173
-,1.335147392,184
-,1.346757369,168
-,1.358367346,182
-,1.369977324,147
-,1.381587301,164
-,1.393197278,163
-,1.404807256,165
-,1.416417233,181
-,1.428027210,172
-,1.439637188,169
-,1.451247165,165
-,1.462857142,166
-,1.474467120,158
-,1.486077097,162
-,1.497687074,188
-,1.509297052,176
-,1.520907029,176
-,1.532517006,159
-,1.544126984,183
-,1.555736961,178
-,1.567346938,168
-,1.578956916,171
-,1.590566893,158
-,1.602176870,153
-,1.613786848,189
-,1.625396825,171
-,1.637006802,142
-,1.648616780,503
-,1.660226757,0
-,1.671836734,30
-,1.683446712,189
-,1.695056689,146
-,1.706666666,174
-,1.718276643,171
-,1.729886621,169
-,1.741496598,164
-,1.753106575,181
-,1.764716553,180
-,1.776326530,163
-,1.787936507,174
-,1.799546485,135
-,1.811156462,193
-,1.822766439,187
-,1.834376417,176
-,1.845986394,172
-,1.857596371,155
-,1.869206349,185
-,1.880816326,167
-,1.892426303,173
-,1.904036281,162
-,1.915646258,166
-,1.927256235,167
-,1.938866213,179
-,1.950476190,170
-,1.962086167,158
-,1.973696145,168
-,1.985306122,162
-,1.996916099,182
-,2.008526077,167
-,2.020136054,185
-,2.031746031,165
-,2.043356009,184
-,2.054965986,157
-,2.066575963,167
-,2.078185941,164
-,2.089795918,160
-,2.101405895,181
-,2.113015873,165
-,2.124625850,181
-,2.136235827,161
-,2.147845804,176
-,2.159455782,177
-,2.171065759,150
-,2.182675736,185
-,2.194285714,173
-,2.205895691,162
-,2.217505668,169
-,2.229115646,171
-,2.240725623,140
-,2.252335600,196
-,2.263945578,155
-,2.275555555,171
-,2.287165532,186
-,2.298775510,157
-,2.310385487,166
-,2.321995464,169
-,2.333605442,183
-,2.345215419,186
-,2.356825396,138
-,2.368435374,162
-,2.380045351,180
-,2.391655328,165
-,2.403265306,181
-,2.414875283,444
-,2.426485260,27
-,2.438095238,150
-,2.449705215,166
-,2.461315192,177
-,2.472925170,174
-,2.484535147,165
-,2.496145124,158
-,2.507755102,178
-,2.519365079,177
-,2.530975056,172
-,2.542585034,174
-,2.554195011,168
-,2.565804988,165
-,2.577414965,168
-,2.589024943,149
-,2.600634920,171
-,2.612244897,164
-,2.623854875,163
-,2.635464852,182
-,2.647074829,162
-,2.658684807,156
-,2.670294784,173
-,2.681904761,188
-,2.693514739,166
-,2.705124716,157
-,2.716734693,170
-,2.728344671,167
-,2.739954648,191
-,2.751564625,154
-,2.763174603,175
-,2.774784580,157
-,2.786394557,169
-,2.798004535,160
-,2.809614512,163
-,2.821224489,191
-,2.832834467,158
-,2.844444444,184
-,2.856054421,164
-,2.867664399,176
-,2.879274376,182
-,2.890884353,180
-,2.902494331,138
-,2.914104308,170
-,2.925714285,172
-,2.937324263,172
-,2.948934240,168
-,2.960544217,186
-,2.972154195,171
-,2.983764172,154
-,2.995374149,185
-,3.006984126,172
-,3.018594104,164
-,3.030204081,176
-,3.041814058,195
-,3.053424036,160
-,3.065034013,124
-,3.076643990,181
-,3.088253968,170
-,3.099863945,178
-,3.111473922,165
-,3.123083900,164
-,3.134693877,194
-,3.146303854,157
-,3.157913832,205
-,3.169523809,163
-,3.181133786,159
-,3.192743764,184
-,3.204353741,145
-,3.215963718,170
-,3.227573696,155
-,3.239183673,161
-,3.250793650,164
-,3.262403628,184
-,3.274013605,175
-,3.285623582,155
-,3.297233560,164
-,3.308843537,181
-,3.320453514,182
-,3.332063492,145
-,3.343673469,177
-,3.355283446,162
-,3.366893424,153
-,3.378503401,185
-,3.390113378,174
-,3.401723356,167
-,3.413333333,187
-,3.424943310,157
-,3.436553287,170
-,3.448163265,169
-,3.459773242,166
-,3.471383219,171
-,3.482993197,165
-,3.494603174,158
-,3.506213151,181
-,3.517823129,168
-,3.529433106,175
-,3.541043083,162
-,3.552653061,167
-,3.564263038,179
-,3.575873015,167
-,3.587482993,156
-,3.599092970,209
-,3.610702947,179
-,3.622312925,159
-,3.633922902,180
-,3.645532879,152
-,3.657142857,169
-,3.668752834,189
-,3.680362811,170
-,3.691972789,156
-,3.703582766,165
-,3.715192743,179
-,3.726802721,173
-,3.738412698,163
-,3.750022675,170
-,3.761632653,181
-,3.773242630,177
-,3.784852607,181
-,3.796462585,166
-,3.808072562,153
-,3.819682539,164
-,3.831292517,209
-,3.842902494,159
-,3.854512471,194
-,3.866122448,164
-,3.877732426,184
-,3.889342403,163
-,3.900952380,173
-,3.912562358,165
-,3.924172335,164
-,3.935782312,182
-,3.947392290,170
-,3.959002267,160
-,3.970612244,173
-,3.982222222,160
-,3.993832199,174
-,4.005442176,179
-,4.017052154,179
-,4.028662131,145
-,4.040272108,196
-,4.051882086,155
-,4.063492063,170
-,4.075102040,180
-,4.086712018,156
-,4.098321995,159
-,4.109931972,182
-,4.121541950,175
-,4.133151927,173
-,4.144761904,164
-,4.156371882,186
-,4.167981859,160
-,4.179591836,175
-,4.191201814,178
-,4.202811791,159
-,4.214421768,177
-,4.226031746,181
-,4.237641723,177
-,4.249251700,163
-,4.260861678,158
-,4.272471655,188
-,4.284081632,163
-,4.295691609,158
-,4.307301587,164
-,4.318911564,164
-,4.330521541,183
-,4.342131519,160
-,4.353741496,182
-,4.365351473,172
-,4.376961451,172
-,4.388571428,179
-,4.400181405,154
-,4.411791383,166
-,4.423401360,174
-,4.435011337,156
-,4.446621315,174
-,4.458231292,169
-,4.469841269,169
-,4.481451247,178
-,4.493061224,175
-,4.504671201,193
-,4.516281179,153
-,4.527891156,160
-,4.539501133,176
-,4.551111111,167
-,4.562721088,184
-,4.574331065,163
-,4.585941043,150
-,4.597551020,156
-,4.609160997,182
-,4.620770975,168
-,4.632380952,168
-,4.643990929,152
-,4.655600907,174
-,4.667210884,186
-,4.678820861,168
-,4.690430839,173
-,4.702040816,184
-,4.713650793,169
-,4.725260770,166
-,4.736870748,164
-,4.748480725,193
-,4.760090702,155
-,4.771700680,164
-,4.783310657,181
-,4.794920634,142
-,4.806530612,183
-,4.818140589,181
-,4.829750566,185
-,4.841360544,171
-,4.852970521,184
-,4.864580498,156
-,4.876190476,162
-,4.887800453,182
-,4.899410430,161
-,4.911020408,175
-,4.922630385,168
-,4.934240362,172
-,4.945850340,151
-,4.957460317,176
-,4.969070294,171
-,4.980680272,93
-,4.992290249,0
-,5.003900226,0
-,5.015510204,0
-,5.027120181,0
-,5.038730158,0
-,5.050340136,0
-,5.061950113,0
-,5.073560090,0
-,5.085170068,0
-,5.096780045,0
-,5.108390022,0
-,5.120000000,0
-,5.131609977,0
-,5.143219954,0
-,5.154829931,0
-,5.166439909,0
-,5.178049886,0
-,5.189659863,0
--- a/tests/expected/transforms-basic-percussiononsets-multiple-outputs.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,451 +0,0 @@
-"./audio/3clicks8.wav",0.000000000,0
-,0.011609977,207
-,0.023219954,170
-,0.034829931,184
-,0.046439909,166
-,0.058049886,174
-,0.069659863,179
-,0.081269841,162
-,0.092879818,157
-,0.104489795,156
-,0.116099773,182
-,0.127709750,168
-,0.139319727,168
-,0.150929705,155
-,0.162539682,200
-,0.174149659,163
-,0.185759637,178
-,0.197369614,164
-,0.208979591,166
-,0.220589569,137
-,0.232199546,155
-,0.243809523,177
-,0.255419501,145
-,0.267029478,172
-,0.278639455,155
-,0.290249433,201
-,0.301859410,166
-,0.313469387,169
-,0.325079365,158
-,0.336689342,169
-,0.348299319,155
-,0.359909297,187
-,0.371519274,177
-,0.383129251,149
-,0.394739229,196
-,0.406349206,160
-,0.417959183,174
-,0.429569160,165
-,0.441179138,149
-,0.452789115,181
-,0.464399092,180
-,0.476009070,156
-,0.487619047,163
-,0.499229024,188
-,0.510839002,173
-,0.522448979,160
-,0.534058956,168
-,0.545668934,154
-,0.557278911,155
-,0.568888888,161
-,0.580498866,163
-,0.592108843,172
-,0.603718820,168
-,0.615328798,181
-,0.626938775,167
-,0.638548752,172
-,0.650158730,158
-,0.661768707,172
-,0.673378684,167
-,0.684988662,180
-,0.696598639,188
-,0.708208616,160
-,0.719818594,166
-,0.731428571,158
-,0.743038548,176
-,0.754648526,153
-,0.766258503,173
-,0.777868480,449
-,0.789478458,30
-,0.801088435,70
-,0.812698412,181
-,0.824308390,165
-,0.835918367,174
-,0.847528344,181
-,0.859138321,179
-,0.870748299,154
-,0.882358276,169
-,0.893968253,150
-,0.905578231,189
-,0.917188208,159
-,0.928798185,172
-,0.940408163,157
-,0.952018140,167
-,0.963628117,169
-,0.975238095,155
-,0.986848072,189
-,0.998458049,178
-,1.010068027,168
-,1.021678004,169
-,1.033287981,178
-,1.044897959,157
-,1.056507936,166
-,1.068117913,162
-,1.079727891,170
-,1.091337868,186
-,0.777868481
-,1.102947845,178
-,1.114557823,178
-,1.126167800,155
-,1.137777777,173
-,1.149387755,156
-,1.160997732,158
-,1.172607709,170
-,1.184217687,167
-,1.195827664,160
-,1.207437641,180
-,1.219047619,153
-,1.230657596,154
-,1.242267573,171
-,1.253877551,159
-,1.265487528,194
-,1.277097505,170
-,1.288707482,157
-,1.300317460,184
-,1.311927437,156
-,1.323537414,173
-,1.335147392,184
-,1.346757369,168
-,1.358367346,182
-,1.369977324,147
-,1.381587301,164
-,1.393197278,163
-,1.404807256,165
-,1.416417233,181
-,1.428027210,172
-,1.439637188,169
-,1.451247165,165
-,1.462857142,166
-,1.474467120,158
-,1.486077097,162
-,1.497687074,188
-,1.509297052,176
-,1.520907029,176
-,1.532517006,159
-,1.544126984,183
-,1.555736961,178
-,1.567346938,168
-,1.578956916,171
-,1.590566893,158
-,1.602176870,153
-,1.613786848,189
-,1.625396825,171
-,1.637006802,142
-,1.648616780,503
-,1.660226757,0
-,1.671836734,30
-,1.683446712,189
-,1.695056689,146
-,1.706666666,174
-,1.718276643,171
-,1.729886621,169
-,1.741496598,164
-,1.753106575,181
-,1.764716553,180
-,1.776326530,163
-,1.787936507,174
-,1.799546485,135
-,1.811156462,193
-,1.822766439,187
-,1.834376417,176
-,1.648616780
-,1.845986394,172
-,1.857596371,155
-,1.869206349,185
-,1.880816326,167
-,1.892426303,173
-,1.904036281,162
-,1.915646258,166
-,1.927256235,167
-,1.938866213,179
-,1.950476190,170
-,1.962086167,158
-,1.973696145,168
-,1.985306122,162
-,1.996916099,182
-,2.008526077,167
-,2.020136054,185
-,2.031746031,165
-,2.043356009,184
-,2.054965986,157
-,2.066575963,167
-,2.078185941,164
-,2.089795918,160
-,2.101405895,181
-,2.113015873,165
-,2.124625850,181
-,2.136235827,161
-,2.147845804,176
-,2.159455782,177
-,2.171065759,150
-,2.182675736,185
-,2.194285714,173
-,2.205895691,162
-,2.217505668,169
-,2.229115646,171
-,2.240725623,140
-,2.252335600,196
-,2.263945578,155
-,2.275555555,171
-,2.287165532,186
-,2.298775510,157
-,2.310385487,166
-,2.321995464,169
-,2.333605442,183
-,2.345215419,186
-,2.356825396,138
-,2.368435374,162
-,2.380045351,180
-,2.391655328,165
-,2.403265306,181
-,2.414875283,444
-,2.426485260,27
-,2.438095238,150
-,2.449705215,166
-,2.461315192,177
-,2.472925170,174
-,2.484535147,165
-,2.496145124,158
-,2.507755102,178
-,2.519365079,177
-,2.530975056,172
-,2.542585034,174
-,2.554195011,168
-,2.565804988,165
-,2.577414965,168
-,2.414875283
-,2.589024943,149
-,2.600634920,171
-,2.612244897,164
-,2.623854875,163
-,2.635464852,182
-,2.647074829,162
-,2.658684807,156
-,2.670294784,173
-,2.681904761,188
-,2.693514739,166
-,2.705124716,157
-,2.716734693,170
-,2.728344671,167
-,2.739954648,191
-,2.751564625,154
-,2.763174603,175
-,2.774784580,157
-,2.786394557,169
-,2.798004535,160
-,2.809614512,163
-,2.821224489,191
-,2.832834467,158
-,2.844444444,184
-,2.856054421,164
-,2.867664399,176
-,2.879274376,182
-,2.890884353,180
-,2.902494331,138
-,2.914104308,170
-,2.925714285,172
-,2.937324263,172
-,2.948934240,168
-,2.960544217,186
-,2.972154195,171
-,2.983764172,154
-,2.995374149,185
-,3.006984126,172
-,3.018594104,164
-,3.030204081,176
-,3.041814058,195
-,3.053424036,160
-,3.065034013,124
-,3.076643990,181
-,3.088253968,170
-,3.099863945,178
-,3.111473922,165
-,3.123083900,164
-,3.134693877,194
-,3.146303854,157
-,3.157913832,205
-,3.169523809,163
-,3.181133786,159
-,3.192743764,184
-,3.204353741,145
-,3.215963718,170
-,3.227573696,155
-,3.239183673,161
-,3.250793650,164
-,3.262403628,184
-,3.274013605,175
-,3.285623582,155
-,3.297233560,164
-,3.308843537,181
-,3.320453514,182
-,3.332063492,145
-,3.343673469,177
-,3.355283446,162
-,3.366893424,153
-,3.378503401,185
-,3.390113378,174
-,3.401723356,167
-,3.413333333,187
-,3.424943310,157
-,3.436553287,170
-,3.448163265,169
-,3.459773242,166
-,3.471383219,171
-,3.482993197,165
-,3.494603174,158
-,3.506213151,181
-,3.517823129,168
-,3.529433106,175
-,3.541043083,162
-,3.552653061,167
-,3.564263038,179
-,3.575873015,167
-,3.587482993,156
-,3.599092970,209
-,3.610702947,179
-,3.622312925,159
-,3.633922902,180
-,3.645532879,152
-,3.657142857,169
-,3.668752834,189
-,3.680362811,170
-,3.691972789,156
-,3.703582766,165
-,3.715192743,179
-,3.726802721,173
-,3.738412698,163
-,3.750022675,170
-,3.761632653,181
-,3.773242630,177
-,3.784852607,181
-,3.796462585,166
-,3.808072562,153
-,3.819682539,164
-,3.831292517,209
-,3.842902494,159
-,3.854512471,194
-,3.866122448,164
-,3.877732426,184
-,3.889342403,163
-,3.900952380,173
-,3.912562358,165
-,3.924172335,164
-,3.935782312,182
-,3.947392290,170
-,3.959002267,160
-,3.970612244,173
-,3.982222222,160
-,3.993832199,174
-,4.005442176,179
-,4.017052154,179
-,4.028662131,145
-,4.040272108,196
-,4.051882086,155
-,4.063492063,170
-,4.075102040,180
-,4.086712018,156
-,4.098321995,159
-,4.109931972,182
-,4.121541950,175
-,4.133151927,173
-,4.144761904,164
-,4.156371882,186
-,4.167981859,160
-,4.179591836,175
-,4.191201814,178
-,4.202811791,159
-,4.214421768,177
-,4.226031746,181
-,4.237641723,177
-,4.249251700,163
-,4.260861678,158
-,4.272471655,188
-,4.284081632,163
-,4.295691609,158
-,4.307301587,164
-,4.318911564,164
-,4.330521541,183
-,4.342131519,160
-,4.353741496,182
-,4.365351473,172
-,4.376961451,172
-,4.388571428,179
-,4.400181405,154
-,4.411791383,166
-,4.423401360,174
-,4.435011337,156
-,4.446621315,174
-,4.458231292,169
-,4.469841269,169
-,4.481451247,178
-,4.493061224,175
-,4.504671201,193
-,4.516281179,153
-,4.527891156,160
-,4.539501133,176
-,4.551111111,167
-,4.562721088,184
-,4.574331065,163
-,4.585941043,150
-,4.597551020,156
-,4.609160997,182
-,4.620770975,168
-,4.632380952,168
-,4.643990929,152
-,4.655600907,174
-,4.667210884,186
-,4.678820861,168
-,4.690430839,173
-,4.702040816,184
-,4.713650793,169
-,4.725260770,166
-,4.736870748,164
-,4.748480725,193
-,4.760090702,155
-,4.771700680,164
-,4.783310657,181
-,4.794920634,142
-,4.806530612,183
-,4.818140589,181
-,4.829750566,185
-,4.841360544,171
-,4.852970521,184
-,4.864580498,156
-,4.876190476,162
-,4.887800453,182
-,4.899410430,161
-,4.911020408,175
-,4.922630385,168
-,4.934240362,172
-,4.945850340,151
-,4.957460317,176
-,4.969070294,171
-,4.980680272,93
-,4.992290249,0
-,5.003900226,0
-,5.015510204,0
-,5.027120181,0
-,5.038730158,0
-,5.050340136,0
-,5.061950113,0
-,5.073560090,0
-,5.085170068,0
-,5.096780045,0
-,5.108390022,0
-,5.120000000,0
-,5.131609977,0
-,5.143219954,0
-,5.154829931,0
-,5.166439909,0
-,5.178049886,0
-,5.189659863,0
--- a/tests/expected/transforms-basic-percussiononsets-no-parameters-default-output.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-"./audio/3clicks8.wav",0.777868480
-,1.648616780
-,2.414875283
--- a/tests/expected/transforms-basic-percussiononsets-no-parameters.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-"./audio/3clicks8.wav",0.777868480
-,1.648616780
-,2.414875283
--- a/tests/expected/transforms-basic-percussiononsets-set-parameters.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-"./audio/3clicks8.wav",0.011609977
-,0.162539682
-,0.290249433
-,0.394739229
-,0.777868481
-,1.648616780
-,2.414875283
-,3.041814059
-,3.134693877
-,3.157913832
-,3.599092970
-,3.831292517
-,4.504671202
-,4.748480725
--- a/tests/expected/transforms-basic-percussiononsets-set-sample-rate.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-"./audio/3clicks8.wav",0.766258503
-,1.648616780
-,2.414875283
--- a/tests/expected/transforms-basic-percussiononsets-set-step-and-block-size.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-"./audio/3clicks8.wav",0.782312925
-,1.650680272
-,2.417346939
--- a/tests/expected/transforms-basic-percussiononsets.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-"./audio/3clicks8.wav",0.777868480
-,1.648616780
-,2.414875283
--- a/tests/expected/transforms-basic-skeleton-1.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-"./audio/3clicks8.wav",0.777868480
-,1.648616780
-,2.414875283
--- a/tests/expected/transforms-summaries-percussiononsets-all-summaries-only.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-"./audio/3clicks8.wav",0.000000000,5.201269840,count,448,"(count)"
-,0.000000000,5.201269840,max,503,"(maximum value)"
-,0.000000000,5.201269840,mean,162.585,"(mean value, continuous-time average)"
-,0.000000000,5.201269840,median,168,"(median value, continuous-time average)"
-,0.000000000,5.201269840,min,0,"(minimum value)"
-,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
-,0.000000000,5.201269840,sd,46.2356,"(standard deviation, continuous-time average)"
-,0.000000000,5.201269840,sum,72838,"(sum)"
-,0.000000000,5.201269840,variance,2137.73,"(variance, continuous-time average)"
--- a/tests/expected/transforms-summaries-percussiononsets-from-rdf.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-"./audio/3clicks8.wav",0.777868481
-,1.648616780
-,2.414875283
-,0.000000000,5.201269840,mean,162.585,"(mean value, continuous-time average)"
-,0.000000000,5.201269840,median,168,"(median value, continuous-time average)"
-,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
-,0.000000000,5.201269840,mean,677.241,"(mean value, continuous-time average)"
--- a/tests/expected/transforms-summaries-percussiononsets-from-rdf.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix dc: <http://purl.org/dc/elements/1.1/> .
-@prefix mo: <http://purl.org/ontology/mo/> .
-@prefix af: <http://purl.org/ontology/af/> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-@prefix event: <http://purl.org/NET/c4dm/event.owl#> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix tl: <http://purl.org/NET/c4dm/timeline.owl#> .
-@prefix vamp: <http://purl.org/ontology/vamp/> .
-@prefix : <> .
-
-:transform_0_onsets
-    vamp:block_size "1024"^^xsd:int ;
-    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_onsets> ;
-    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
-    vamp:sample_rate "44100"^^xsd:float ;
-    vamp:step_size "512"^^xsd:int ;
-    a vamp:Transform .
-
-<file://example.wav>
-    mo:encodes :signal_1 ;
-    a mo:AudioFile .
-
-:signal_1
-    mo:time [
-        tl:onTimeLine :signal_timeline_1 ;
-        a tl:Interval
-    ] ;
-    a mo:Signal .
-
-:signal_timeline_1
-    a tl:Timeline .
-
-:event_2
-    event:time [
-        tl:at "PT0.777868481S"^^xsd:duration ;
-        tl:onTimeLine :signal_timeline_1 ;
-        a tl:Instant
-    ] ;
-    vamp:computed_by :transform_0_onsets ;
-    a af:Onset .
-
-:event_3
-    event:time [
-        tl:at "PT1.648616780S"^^xsd:duration ;
-        tl:onTimeLine :signal_timeline_1 ;
-        a tl:Instant
-    ] ;
-    vamp:computed_by :transform_0_onsets ;
-    a af:Onset .
-
-:event_4
-    event:time [
-        tl:at "PT2.414875283S"^^xsd:duration ;
-        tl:onTimeLine :signal_timeline_1 ;
-        a tl:Instant
-    ] ;
-    vamp:computed_by :transform_0_onsets ;
-    a af:Onset .
-
-:transform_5_detectionfunction
-    vamp:block_size "4096"^^xsd:int ;
-    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_detectionfunction> ;
-    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
-    vamp:sample_rate "44100"^^xsd:float ;
-    vamp:step_size "2048"^^xsd:int ;
-    vamp:summary_type "mean" ;
-    a vamp:Transform .
-
-:event_type_6
-    dc:description "Broadband energy rise detection function" ;
-    dc:format "" ;
-    dc:title "Detection Function" ;
-    rdfs:subClassOf event:Event .
-
-:event_7
-    event:time [
-        tl:beginsAt "PT0.000000000S"^^xsd:duration ;
-        tl:duration "PT5.201269840S"^^xsd:duration ;
-        tl:onTimeLine :signal_timeline_1 ;
-        a tl:Interval
-    ] ;
-    af:feature "677.241" ;
-    vamp:computed_by :transform_5_detectionfunction ;
-    a :event_type_6 ;
-    rdfs:label "(mean value, continuous-time average)" .
-
-:transform_8_detectionfunction
-    vamp:block_size "1024"^^xsd:int ;
-    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_detectionfunction> ;
-    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
-    vamp:sample_rate "44100"^^xsd:float ;
-    vamp:step_size "512"^^xsd:int ;
-    vamp:summary_type "mean" ;
-    a vamp:Transform .
-
-:event_type_9
-    dc:description "Broadband energy rise detection function" ;
-    dc:format "" ;
-    dc:title "Detection Function" ;
-    rdfs:subClassOf event:Event .
-
-:event_10
-    event:time [
-        tl:beginsAt "PT0.000000000S"^^xsd:duration ;
-        tl:duration "PT5.201269840S"^^xsd:duration ;
-        tl:onTimeLine :signal_timeline_1 ;
-        a tl:Interval
-    ] ;
-    af:feature "162.585" ;
-    vamp:computed_by :transform_8_detectionfunction ;
-    a :event_type_9 ;
-    rdfs:label "(mean value, continuous-time average)" .
-
-:transform_11_detectionfunction
-    vamp:block_size "1024"^^xsd:int ;
-    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_detectionfunction> ;
-    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
-    vamp:sample_rate "44100"^^xsd:float ;
-    vamp:step_size "512"^^xsd:int ;
-    vamp:summary_type "median" ;
-    a vamp:Transform .
-
-:event_type_12
-    dc:description "Broadband energy rise detection function" ;
-    dc:format "" ;
-    dc:title "Detection Function" ;
-    rdfs:subClassOf event:Event .
-
-:event_13
-    event:time [
-        tl:beginsAt "PT0.000000000S"^^xsd:duration ;
-        tl:duration "PT5.201269840S"^^xsd:duration ;
-        tl:onTimeLine :signal_timeline_1 ;
-        a tl:Interval
-    ] ;
-    af:feature "168" ;
-    vamp:computed_by :transform_11_detectionfunction ;
-    a :event_type_12 ;
-    rdfs:label "(median value, continuous-time average)" .
-
-:transform_14_detectionfunction
-    vamp:block_size "1024"^^xsd:int ;
-    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_detectionfunction> ;
-    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
-    vamp:sample_rate "44100"^^xsd:float ;
-    vamp:step_size "512"^^xsd:int ;
-    vamp:summary_type "mode" ;
-    a vamp:Transform .
-
-:event_type_15
-    dc:description "Broadband energy rise detection function" ;
-    dc:format "" ;
-    dc:title "Detection Function" ;
-    rdfs:subClassOf event:Event .
-
-:event_16
-    event:time [
-        tl:beginsAt "PT0.000000000S"^^xsd:duration ;
-        tl:duration "PT5.201269840S"^^xsd:duration ;
-        tl:onTimeLine :signal_timeline_1 ;
-        a tl:Interval
-    ] ;
-    af:feature "0" ;
-    vamp:computed_by :transform_14_detectionfunction ;
-    a :event_type_15 ;
-    rdfs:label "(modal value, continuous-time average)" .
-
--- a/tests/expected/transforms-summaries-percussiononsets-with-mean.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,449 +0,0 @@
-"./audio/3clicks8.wav",0.000000000,0
-,0.011609977,207
-,0.023219954,170
-,0.034829931,184
-,0.046439909,166
-,0.058049886,174
-,0.069659863,179
-,0.081269841,162
-,0.092879818,157
-,0.104489795,156
-,0.116099773,182
-,0.127709750,168
-,0.139319727,168
-,0.150929705,155
-,0.162539682,200
-,0.174149659,163
-,0.185759637,178
-,0.197369614,164
-,0.208979591,166
-,0.220589569,137
-,0.232199546,155
-,0.243809523,177
-,0.255419501,145
-,0.267029478,172
-,0.278639455,155
-,0.290249433,201
-,0.301859410,166
-,0.313469387,169
-,0.325079365,158
-,0.336689342,169
-,0.348299319,155
-,0.359909297,187
-,0.371519274,177
-,0.383129251,149
-,0.394739229,196
-,0.406349206,160
-,0.417959183,174
-,0.429569160,165
-,0.441179138,149
-,0.452789115,181
-,0.464399092,180
-,0.476009070,156
-,0.487619047,163
-,0.499229024,188
-,0.510839002,173
-,0.522448979,160
-,0.534058956,168
-,0.545668934,154
-,0.557278911,155
-,0.568888888,161
-,0.580498866,163
-,0.592108843,172
-,0.603718820,168
-,0.615328798,181
-,0.626938775,167
-,0.638548752,172
-,0.650158730,158
-,0.661768707,172
-,0.673378684,167
-,0.684988662,180
-,0.696598639,188
-,0.708208616,160
-,0.719818594,166
-,0.731428571,158
-,0.743038548,176
-,0.754648526,153
-,0.766258503,173
-,0.777868480,449
-,0.789478458,30
-,0.801088435,70
-,0.812698412,181
-,0.824308390,165
-,0.835918367,174
-,0.847528344,181
-,0.859138321,179
-,0.870748299,154
-,0.882358276,169
-,0.893968253,150
-,0.905578231,189
-,0.917188208,159
-,0.928798185,172
-,0.940408163,157
-,0.952018140,167
-,0.963628117,169
-,0.975238095,155
-,0.986848072,189
-,0.998458049,178
-,1.010068027,168
-,1.021678004,169
-,1.033287981,178
-,1.044897959,157
-,1.056507936,166
-,1.068117913,162
-,1.079727891,170
-,1.091337868,186
-,1.102947845,178
-,1.114557823,178
-,1.126167800,155
-,1.137777777,173
-,1.149387755,156
-,1.160997732,158
-,1.172607709,170
-,1.184217687,167
-,1.195827664,160
-,1.207437641,180
-,1.219047619,153
-,1.230657596,154
-,1.242267573,171
-,1.253877551,159
-,1.265487528,194
-,1.277097505,170
-,1.288707482,157
-,1.300317460,184
-,1.311927437,156
-,1.323537414,173
-,1.335147392,184
-,1.346757369,168
-,1.358367346,182
-,1.369977324,147
-,1.381587301,164
-,1.393197278,163
-,1.404807256,165
-,1.416417233,181
-,1.428027210,172
-,1.439637188,169
-,1.451247165,165
-,1.462857142,166
-,1.474467120,158
-,1.486077097,162
-,1.497687074,188
-,1.509297052,176
-,1.520907029,176
-,1.532517006,159
-,1.544126984,183
-,1.555736961,178
-,1.567346938,168
-,1.578956916,171
-,1.590566893,158
-,1.602176870,153
-,1.613786848,189
-,1.625396825,171
-,1.637006802,142
-,1.648616780,503
-,1.660226757,0
-,1.671836734,30
-,1.683446712,189
-,1.695056689,146
-,1.706666666,174
-,1.718276643,171
-,1.729886621,169
-,1.741496598,164
-,1.753106575,181
-,1.764716553,180
-,1.776326530,163
-,1.787936507,174
-,1.799546485,135
-,1.811156462,193
-,1.822766439,187
-,1.834376417,176
-,1.845986394,172
-,1.857596371,155
-,1.869206349,185
-,1.880816326,167
-,1.892426303,173
-,1.904036281,162
-,1.915646258,166
-,1.927256235,167
-,1.938866213,179
-,1.950476190,170
-,1.962086167,158
-,1.973696145,168
-,1.985306122,162
-,1.996916099,182
-,2.008526077,167
-,2.020136054,185
-,2.031746031,165
-,2.043356009,184
-,2.054965986,157
-,2.066575963,167
-,2.078185941,164
-,2.089795918,160
-,2.101405895,181
-,2.113015873,165
-,2.124625850,181
-,2.136235827,161
-,2.147845804,176
-,2.159455782,177
-,2.171065759,150
-,2.182675736,185
-,2.194285714,173
-,2.205895691,162
-,2.217505668,169
-,2.229115646,171
-,2.240725623,140
-,2.252335600,196
-,2.263945578,155
-,2.275555555,171
-,2.287165532,186
-,2.298775510,157
-,2.310385487,166
-,2.321995464,169
-,2.333605442,183
-,2.345215419,186
-,2.356825396,138
-,2.368435374,162
-,2.380045351,180
-,2.391655328,165
-,2.403265306,181
-,2.414875283,444
-,2.426485260,27
-,2.438095238,150
-,2.449705215,166
-,2.461315192,177
-,2.472925170,174
-,2.484535147,165
-,2.496145124,158
-,2.507755102,178
-,2.519365079,177
-,2.530975056,172
-,2.542585034,174
-,2.554195011,168
-,2.565804988,165
-,2.577414965,168
-,2.589024943,149
-,2.600634920,171
-,2.612244897,164
-,2.623854875,163
-,2.635464852,182
-,2.647074829,162
-,2.658684807,156
-,2.670294784,173
-,2.681904761,188
-,2.693514739,166
-,2.705124716,157
-,2.716734693,170
-,2.728344671,167
-,2.739954648,191
-,2.751564625,154
-,2.763174603,175
-,2.774784580,157
-,2.786394557,169
-,2.798004535,160
-,2.809614512,163
-,2.821224489,191
-,2.832834467,158
-,2.844444444,184
-,2.856054421,164
-,2.867664399,176
-,2.879274376,182
-,2.890884353,180
-,2.902494331,138
-,2.914104308,170
-,2.925714285,172
-,2.937324263,172
-,2.948934240,168
-,2.960544217,186
-,2.972154195,171
-,2.983764172,154
-,2.995374149,185
-,3.006984126,172
-,3.018594104,164
-,3.030204081,176
-,3.041814058,195
-,3.053424036,160
-,3.065034013,124
-,3.076643990,181
-,3.088253968,170
-,3.099863945,178
-,3.111473922,165
-,3.123083900,164
-,3.134693877,194
-,3.146303854,157
-,3.157913832,205
-,3.169523809,163
-,3.181133786,159
-,3.192743764,184
-,3.204353741,145
-,3.215963718,170
-,3.227573696,155
-,3.239183673,161
-,3.250793650,164
-,3.262403628,184
-,3.274013605,175
-,3.285623582,155
-,3.297233560,164
-,3.308843537,181
-,3.320453514,182
-,3.332063492,145
-,3.343673469,177
-,3.355283446,162
-,3.366893424,153
-,3.378503401,185
-,3.390113378,174
-,3.401723356,167
-,3.413333333,187
-,3.424943310,157
-,3.436553287,170
-,3.448163265,169
-,3.459773242,166
-,3.471383219,171
-,3.482993197,165
-,3.494603174,158
-,3.506213151,181
-,3.517823129,168
-,3.529433106,175
-,3.541043083,162
-,3.552653061,167
-,3.564263038,179
-,3.575873015,167
-,3.587482993,156
-,3.599092970,209
-,3.610702947,179
-,3.622312925,159
-,3.633922902,180
-,3.645532879,152
-,3.657142857,169
-,3.668752834,189
-,3.680362811,170
-,3.691972789,156
-,3.703582766,165
-,3.715192743,179
-,3.726802721,173
-,3.738412698,163
-,3.750022675,170
-,3.761632653,181
-,3.773242630,177
-,3.784852607,181
-,3.796462585,166
-,3.808072562,153
-,3.819682539,164
-,3.831292517,209
-,3.842902494,159
-,3.854512471,194
-,3.866122448,164
-,3.877732426,184
-,3.889342403,163
-,3.900952380,173
-,3.912562358,165
-,3.924172335,164
-,3.935782312,182
-,3.947392290,170
-,3.959002267,160
-,3.970612244,173
-,3.982222222,160
-,3.993832199,174
-,4.005442176,179
-,4.017052154,179
-,4.028662131,145
-,4.040272108,196
-,4.051882086,155
-,4.063492063,170
-,4.075102040,180
-,4.086712018,156
-,4.098321995,159
-,4.109931972,182
-,4.121541950,175
-,4.133151927,173
-,4.144761904,164
-,4.156371882,186
-,4.167981859,160
-,4.179591836,175
-,4.191201814,178
-,4.202811791,159
-,4.214421768,177
-,4.226031746,181
-,4.237641723,177
-,4.249251700,163
-,4.260861678,158
-,4.272471655,188
-,4.284081632,163
-,4.295691609,158
-,4.307301587,164
-,4.318911564,164
-,4.330521541,183
-,4.342131519,160
-,4.353741496,182
-,4.365351473,172
-,4.376961451,172
-,4.388571428,179
-,4.400181405,154
-,4.411791383,166
-,4.423401360,174
-,4.435011337,156
-,4.446621315,174
-,4.458231292,169
-,4.469841269,169
-,4.481451247,178
-,4.493061224,175
-,4.504671201,193
-,4.516281179,153
-,4.527891156,160
-,4.539501133,176
-,4.551111111,167
-,4.562721088,184
-,4.574331065,163
-,4.585941043,150
-,4.597551020,156
-,4.609160997,182
-,4.620770975,168
-,4.632380952,168
-,4.643990929,152
-,4.655600907,174
-,4.667210884,186
-,4.678820861,168
-,4.690430839,173
-,4.702040816,184
-,4.713650793,169
-,4.725260770,166
-,4.736870748,164
-,4.748480725,193
-,4.760090702,155
-,4.771700680,164
-,4.783310657,181
-,4.794920634,142
-,4.806530612,183
-,4.818140589,181
-,4.829750566,185
-,4.841360544,171
-,4.852970521,184
-,4.864580498,156
-,4.876190476,162
-,4.887800453,182
-,4.899410430,161
-,4.911020408,175
-,4.922630385,168
-,4.934240362,172
-,4.945850340,151
-,4.957460317,176
-,4.969070294,171
-,4.980680272,93
-,4.992290249,0
-,5.003900226,0
-,5.015510204,0
-,5.027120181,0
-,5.038730158,0
-,5.050340136,0
-,5.061950113,0
-,5.073560090,0
-,5.085170068,0
-,5.096780045,0
-,5.108390022,0
-,5.120000000,0
-,5.131609977,0
-,5.143219954,0
-,5.154829931,0
-,5.166439909,0
-,5.178049886,0
-,5.189659863,0
-,0.000000000,5.201269840,mean,162.585,"(mean value, continuous-time average)"
--- a/tests/expected/transforms-summaries-percussiononsets.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,448 +0,0 @@
-"./audio/3clicks8.wav",0.000000000,0
-,0.011609977,207
-,0.023219954,170
-,0.034829931,184
-,0.046439909,166
-,0.058049886,174
-,0.069659863,179
-,0.081269841,162
-,0.092879818,157
-,0.104489795,156
-,0.116099773,182
-,0.127709750,168
-,0.139319727,168
-,0.150929705,155
-,0.162539682,200
-,0.174149659,163
-,0.185759637,178
-,0.197369614,164
-,0.208979591,166
-,0.220589569,137
-,0.232199546,155
-,0.243809523,177
-,0.255419501,145
-,0.267029478,172
-,0.278639455,155
-,0.290249433,201
-,0.301859410,166
-,0.313469387,169
-,0.325079365,158
-,0.336689342,169
-,0.348299319,155
-,0.359909297,187
-,0.371519274,177
-,0.383129251,149
-,0.394739229,196
-,0.406349206,160
-,0.417959183,174
-,0.429569160,165
-,0.441179138,149
-,0.452789115,181
-,0.464399092,180
-,0.476009070,156
-,0.487619047,163
-,0.499229024,188
-,0.510839002,173
-,0.522448979,160
-,0.534058956,168
-,0.545668934,154
-,0.557278911,155
-,0.568888888,161
-,0.580498866,163
-,0.592108843,172
-,0.603718820,168
-,0.615328798,181
-,0.626938775,167
-,0.638548752,172
-,0.650158730,158
-,0.661768707,172
-,0.673378684,167
-,0.684988662,180
-,0.696598639,188
-,0.708208616,160
-,0.719818594,166
-,0.731428571,158
-,0.743038548,176
-,0.754648526,153
-,0.766258503,173
-,0.777868480,449
-,0.789478458,30
-,0.801088435,70
-,0.812698412,181
-,0.824308390,165
-,0.835918367,174
-,0.847528344,181
-,0.859138321,179
-,0.870748299,154
-,0.882358276,169
-,0.893968253,150
-,0.905578231,189
-,0.917188208,159
-,0.928798185,172
-,0.940408163,157
-,0.952018140,167
-,0.963628117,169
-,0.975238095,155
-,0.986848072,189
-,0.998458049,178
-,1.010068027,168
-,1.021678004,169
-,1.033287981,178
-,1.044897959,157
-,1.056507936,166
-,1.068117913,162
-,1.079727891,170
-,1.091337868,186
-,1.102947845,178
-,1.114557823,178
-,1.126167800,155
-,1.137777777,173
-,1.149387755,156
-,1.160997732,158
-,1.172607709,170
-,1.184217687,167
-,1.195827664,160
-,1.207437641,180
-,1.219047619,153
-,1.230657596,154
-,1.242267573,171
-,1.253877551,159
-,1.265487528,194
-,1.277097505,170
-,1.288707482,157
-,1.300317460,184
-,1.311927437,156
-,1.323537414,173
-,1.335147392,184
-,1.346757369,168
-,1.358367346,182
-,1.369977324,147
-,1.381587301,164
-,1.393197278,163
-,1.404807256,165
-,1.416417233,181
-,1.428027210,172
-,1.439637188,169
-,1.451247165,165
-,1.462857142,166
-,1.474467120,158
-,1.486077097,162
-,1.497687074,188
-,1.509297052,176
-,1.520907029,176
-,1.532517006,159
-,1.544126984,183
-,1.555736961,178
-,1.567346938,168
-,1.578956916,171
-,1.590566893,158
-,1.602176870,153
-,1.613786848,189
-,1.625396825,171
-,1.637006802,142
-,1.648616780,503
-,1.660226757,0
-,1.671836734,30
-,1.683446712,189
-,1.695056689,146
-,1.706666666,174
-,1.718276643,171
-,1.729886621,169
-,1.741496598,164
-,1.753106575,181
-,1.764716553,180
-,1.776326530,163
-,1.787936507,174
-,1.799546485,135
-,1.811156462,193
-,1.822766439,187
-,1.834376417,176
-,1.845986394,172
-,1.857596371,155
-,1.869206349,185
-,1.880816326,167
-,1.892426303,173
-,1.904036281,162
-,1.915646258,166
-,1.927256235,167
-,1.938866213,179
-,1.950476190,170
-,1.962086167,158
-,1.973696145,168
-,1.985306122,162
-,1.996916099,182
-,2.008526077,167
-,2.020136054,185
-,2.031746031,165
-,2.043356009,184
-,2.054965986,157
-,2.066575963,167
-,2.078185941,164
-,2.089795918,160
-,2.101405895,181
-,2.113015873,165
-,2.124625850,181
-,2.136235827,161
-,2.147845804,176
-,2.159455782,177
-,2.171065759,150
-,2.182675736,185
-,2.194285714,173
-,2.205895691,162
-,2.217505668,169
-,2.229115646,171
-,2.240725623,140
-,2.252335600,196
-,2.263945578,155
-,2.275555555,171
-,2.287165532,186
-,2.298775510,157
-,2.310385487,166
-,2.321995464,169
-,2.333605442,183
-,2.345215419,186
-,2.356825396,138
-,2.368435374,162
-,2.380045351,180
-,2.391655328,165
-,2.403265306,181
-,2.414875283,444
-,2.426485260,27
-,2.438095238,150
-,2.449705215,166
-,2.461315192,177
-,2.472925170,174
-,2.484535147,165
-,2.496145124,158
-,2.507755102,178
-,2.519365079,177
-,2.530975056,172
-,2.542585034,174
-,2.554195011,168
-,2.565804988,165
-,2.577414965,168
-,2.589024943,149
-,2.600634920,171
-,2.612244897,164
-,2.623854875,163
-,2.635464852,182
-,2.647074829,162
-,2.658684807,156
-,2.670294784,173
-,2.681904761,188
-,2.693514739,166
-,2.705124716,157
-,2.716734693,170
-,2.728344671,167
-,2.739954648,191
-,2.751564625,154
-,2.763174603,175
-,2.774784580,157
-,2.786394557,169
-,2.798004535,160
-,2.809614512,163
-,2.821224489,191
-,2.832834467,158
-,2.844444444,184
-,2.856054421,164
-,2.867664399,176
-,2.879274376,182
-,2.890884353,180
-,2.902494331,138
-,2.914104308,170
-,2.925714285,172
-,2.937324263,172
-,2.948934240,168
-,2.960544217,186
-,2.972154195,171
-,2.983764172,154
-,2.995374149,185
-,3.006984126,172
-,3.018594104,164
-,3.030204081,176
-,3.041814058,195
-,3.053424036,160
-,3.065034013,124
-,3.076643990,181
-,3.088253968,170
-,3.099863945,178
-,3.111473922,165
-,3.123083900,164
-,3.134693877,194
-,3.146303854,157
-,3.157913832,205
-,3.169523809,163
-,3.181133786,159
-,3.192743764,184
-,3.204353741,145
-,3.215963718,170
-,3.227573696,155
-,3.239183673,161
-,3.250793650,164
-,3.262403628,184
-,3.274013605,175
-,3.285623582,155
-,3.297233560,164
-,3.308843537,181
-,3.320453514,182
-,3.332063492,145
-,3.343673469,177
-,3.355283446,162
-,3.366893424,153
-,3.378503401,185
-,3.390113378,174
-,3.401723356,167
-,3.413333333,187
-,3.424943310,157
-,3.436553287,170
-,3.448163265,169
-,3.459773242,166
-,3.471383219,171
-,3.482993197,165
-,3.494603174,158
-,3.506213151,181
-,3.517823129,168
-,3.529433106,175
-,3.541043083,162
-,3.552653061,167
-,3.564263038,179
-,3.575873015,167
-,3.587482993,156
-,3.599092970,209
-,3.610702947,179
-,3.622312925,159
-,3.633922902,180
-,3.645532879,152
-,3.657142857,169
-,3.668752834,189
-,3.680362811,170
-,3.691972789,156
-,3.703582766,165
-,3.715192743,179
-,3.726802721,173
-,3.738412698,163
-,3.750022675,170
-,3.761632653,181
-,3.773242630,177
-,3.784852607,181
-,3.796462585,166
-,3.808072562,153
-,3.819682539,164
-,3.831292517,209
-,3.842902494,159
-,3.854512471,194
-,3.866122448,164
-,3.877732426,184
-,3.889342403,163
-,3.900952380,173
-,3.912562358,165
-,3.924172335,164
-,3.935782312,182
-,3.947392290,170
-,3.959002267,160
-,3.970612244,173
-,3.982222222,160
-,3.993832199,174
-,4.005442176,179
-,4.017052154,179
-,4.028662131,145
-,4.040272108,196
-,4.051882086,155
-,4.063492063,170
-,4.075102040,180
-,4.086712018,156
-,4.098321995,159
-,4.109931972,182
-,4.121541950,175
-,4.133151927,173
-,4.144761904,164
-,4.156371882,186
-,4.167981859,160
-,4.179591836,175
-,4.191201814,178
-,4.202811791,159
-,4.214421768,177
-,4.226031746,181
-,4.237641723,177
-,4.249251700,163
-,4.260861678,158
-,4.272471655,188
-,4.284081632,163
-,4.295691609,158
-,4.307301587,164
-,4.318911564,164
-,4.330521541,183
-,4.342131519,160
-,4.353741496,182
-,4.365351473,172
-,4.376961451,172
-,4.388571428,179
-,4.400181405,154
-,4.411791383,166
-,4.423401360,174
-,4.435011337,156
-,4.446621315,174
-,4.458231292,169
-,4.469841269,169
-,4.481451247,178
-,4.493061224,175
-,4.504671201,193
-,4.516281179,153
-,4.527891156,160
-,4.539501133,176
-,4.551111111,167
-,4.562721088,184
-,4.574331065,163
-,4.585941043,150
-,4.597551020,156
-,4.609160997,182
-,4.620770975,168
-,4.632380952,168
-,4.643990929,152
-,4.655600907,174
-,4.667210884,186
-,4.678820861,168
-,4.690430839,173
-,4.702040816,184
-,4.713650793,169
-,4.725260770,166
-,4.736870748,164
-,4.748480725,193
-,4.760090702,155
-,4.771700680,164
-,4.783310657,181
-,4.794920634,142
-,4.806530612,183
-,4.818140589,181
-,4.829750566,185
-,4.841360544,171
-,4.852970521,184
-,4.864580498,156
-,4.876190476,162
-,4.887800453,182
-,4.899410430,161
-,4.911020408,175
-,4.922630385,168
-,4.934240362,172
-,4.945850340,151
-,4.957460317,176
-,4.969070294,171
-,4.980680272,93
-,4.992290249,0
-,5.003900226,0
-,5.015510204,0
-,5.027120181,0
-,5.038730158,0
-,5.050340136,0
-,5.061950113,0
-,5.073560090,0
-,5.085170068,0
-,5.096780045,0
-,5.108390022,0
-,5.120000000,0
-,5.131609977,0
-,5.143219954,0
-,5.154829931,0
-,5.166439909,0
-,5.178049886,0
-,5.189659863,0
--- a/tests/expected/vamp-test-plugin-curve-fsr-timed.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-,0.000000000,0,"1 of 10: 0 at 0 snap to 0"
-,0.000000000,0.1,"2 of 10: 0.1 at 0 snap to 0"
-,0.000000000,0.2,"3 of 10: 0.2 at 0.166 snap to 0"
-,0.400000000,0.3,"4 of 10: 0.3 at 0.333 snap to 0.4"
-,2.000000000,0.4,"5 of 10: 0.4 at 2 snap to 2"
-,2.000000000,0.5,"6 of 10: 0.5 at 2 snap to 2"
-,2.000000000,0.6,"7 of 10: 0.6 at 2.166 snap to 2"
-,2.400000000,0.7,"8 of 10: 0.7 at 2.333 snap to 2.4"
-,4.000000000,0.8,"9 of 10: 0.8 at 4 snap to 4"
-,4.000000000,0.9,"10 of 10: 0.9 at 4 snap to 4"
--- a/tests/expected/vamp-test-plugin-curve-fsr.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-,0.000000000,0,"1 of 10: 0 at 0"
-,0.400000000,0.1,"2 of 10: 0.1 at 0.4"
-,0.800000000,0.2,"3 of 10: 0.2 at 0.8"
-,1.200000000,0.3,"4 of 10: 0.3 at 1.2"
-,1.600000000,0.4,"5 of 10: 0.4 at 1.6"
-,2.000000000,0.5,"6 of 10: 0.5 at 2"
-,2.400000000,0.6,"7 of 10: 0.6 at 2.4"
-,2.800000000,0.7,"8 of 10: 0.7 at 2.8"
-,3.200000000,0.8,"9 of 10: 0.8 at 3.2"
-,3.600000000,0.9,"10 of 10: 0.9 at 3.6"
--- a/tests/expected/vamp-test-plugin-curve-oss.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-,0.000000000,0,"1 of 20: 0 at 0"
-,0.023219954,0.05,"2 of 20: 0.05 at 0.023"
-,0.046439909,0.1,"3 of 20: 0.1 at 0.046"
-,0.069659863,0.15,"4 of 20: 0.15 at 0.069"
-,0.092879818,0.2,"5 of 20: 0.2 at 0.092"
-,0.116099773,0.25,"6 of 20: 0.25 at 0.116"
-,0.139319727,0.3,"7 of 20: 0.3 at 0.139"
-,0.162539682,0.35,"8 of 20: 0.35 at 0.162"
-,0.185759637,0.4,"9 of 20: 0.4 at 0.185"
-,0.208979591,0.45,"10 of 20: 0.45 at 0.208"
-,0.232199546,0.5,"11 of 20: 0.5 at 0.232"
-,0.255419501,0.55,"12 of 20: 0.55 at 0.255"
-,0.278639455,0.6,"13 of 20: 0.6 at 0.278"
-,0.301859410,0.65,"14 of 20: 0.65 at 0.301"
-,0.325079365,0.7,"15 of 20: 0.7 at 0.325"
-,0.348299319,0.75,"16 of 20: 0.75 at 0.348"
-,0.371519274,0.8,"17 of 20: 0.8 at 0.371"
-,0.394739229,0.85,"18 of 20: 0.85 at 0.394"
-,0.417959183,0.9,"19 of 20: 0.9 at 0.417"
-,0.441179138,0.95,"20 of 20: 0.95 at 0.441"
--- a/tests/expected/vamp-test-plugin-curve-vsr.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-,0.000000000,0,"1 of 10: 0 at 0"
-,0.750000000,0.1,"2 of 10: 0.1 at 0.75"
-,1.500000000,0.2,"3 of 10: 0.2 at 1.5"
-,2.250000000,0.3,"4 of 10: 0.3 at 2.25"
-,3.000000000,0.4,"5 of 10: 0.4 at 3"
-,3.750000000,0.5,"6 of 10: 0.5 at 3.75"
-,4.500000000,0.6,"7 of 10: 0.6 at 4.5"
-,5.250000000,0.7,"8 of 10: 0.7 at 5.25"
-,6.000000000,0.8,"9 of 10: 0.8 at 6"
-,6.750000000,0.9,"10 of 10: 0.9 at 6.75"
--- a/tests/expected/vamp-test-plugin-grid-fsr.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-,0.000000000,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,"1 of 10 at 0"
-,0.400000000,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,"2 of 10 at 0.4"
-,0.800000000,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,"3 of 10 at 0.8"
-,1.200000000,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,"4 of 10 at 1.2"
-,1.600000000,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,"5 of 10 at 1.6"
-,2.000000000,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,"6 of 10 at 2"
-,2.400000000,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,"7 of 10 at 2.4"
-,2.800000000,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,"8 of 10 at 2.8"
-,3.200000000,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,"9 of 10 at 3.2"
-,3.600000000,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1,"10 of 10 at 3.6"
--- a/tests/expected/vamp-test-plugin-grid-oss.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-,0.000000000,0.0666667,0.1,0.133333,0.166667,0.2,0.233333,0.266667,0.3,0.333333,0.366667,"1 of 20 at 0"
-,0.023219954,0.1,0.133333,0.166667,0.2,0.233333,0.266667,0.3,0.333333,0.366667,0.4,"2 of 20 at 0.023"
-,0.046439909,0.133333,0.166667,0.2,0.233333,0.266667,0.3,0.333333,0.366667,0.4,0.433333,"3 of 20 at 0.046"
-,0.069659863,0.166667,0.2,0.233333,0.266667,0.3,0.333333,0.366667,0.4,0.433333,0.466667,"4 of 20 at 0.069"
-,0.092879818,0.2,0.233333,0.266667,0.3,0.333333,0.366667,0.4,0.433333,0.466667,0.5,"5 of 20 at 0.092"
-,0.116099773,0.233333,0.266667,0.3,0.333333,0.366667,0.4,0.433333,0.466667,0.5,0.533333,"6 of 20 at 0.116"
-,0.139319727,0.266667,0.3,0.333333,0.366667,0.4,0.433333,0.466667,0.5,0.533333,0.566667,"7 of 20 at 0.139"
-,0.162539682,0.3,0.333333,0.366667,0.4,0.433333,0.466667,0.5,0.533333,0.566667,0.6,"8 of 20 at 0.162"
-,0.185759637,0.333333,0.366667,0.4,0.433333,0.466667,0.5,0.533333,0.566667,0.6,0.633333,"9 of 20 at 0.185"
-,0.208979591,0.366667,0.4,0.433333,0.466667,0.5,0.533333,0.566667,0.6,0.633333,0.666667,"10 of 20 at 0.208"
-,0.232199546,0.4,0.433333,0.466667,0.5,0.533333,0.566667,0.6,0.633333,0.666667,0.7,"11 of 20 at 0.232"
-,0.255419501,0.433333,0.466667,0.5,0.533333,0.566667,0.6,0.633333,0.666667,0.7,0.733333,"12 of 20 at 0.255"
-,0.278639455,0.466667,0.5,0.533333,0.566667,0.6,0.633333,0.666667,0.7,0.733333,0.766667,"13 of 20 at 0.278"
-,0.301859410,0.5,0.533333,0.566667,0.6,0.633333,0.666667,0.7,0.733333,0.766667,0.8,"14 of 20 at 0.301"
-,0.325079365,0.533333,0.566667,0.6,0.633333,0.666667,0.7,0.733333,0.766667,0.8,0.833333,"15 of 20 at 0.325"
-,0.348299319,0.566667,0.6,0.633333,0.666667,0.7,0.733333,0.766667,0.8,0.833333,0.866667,"16 of 20 at 0.348"
-,0.371519274,0.6,0.633333,0.666667,0.7,0.733333,0.766667,0.8,0.833333,0.866667,0.9,"17 of 20 at 0.371"
-,0.394739229,0.633333,0.666667,0.7,0.733333,0.766667,0.8,0.833333,0.866667,0.9,0.933333,"18 of 20 at 0.394"
-,0.417959183,0.666667,0.7,0.733333,0.766667,0.8,0.833333,0.866667,0.9,0.933333,0.966667,"19 of 20 at 0.417"
-,0.441179138,0.7,0.733333,0.766667,0.8,0.833333,0.866667,0.9,0.933333,0.966667,1,"20 of 20 at 0.441"
--- a/tests/expected/vamp-test-plugin-instants.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-,0.000000000,"1 of 10 at 0"
-,1.500000000,"2 of 10 at 1.5"
-,3.000000000,"3 of 10 at 3"
-,4.500000000,"4 of 10 at 4.5"
-,6.000000000,"5 of 10 at 6"
-,7.500000000,"6 of 10 at 7.5"
-,9.000000000,"7 of 10 at 9"
-,10.500000000,"8 of 10 at 10.5"
-,12.000000000,"9 of 10 at 12"
-,13.500000000,"10 of 10 at 13.5"
--- a/tests/expected/vamp-test-plugin-notes-regions.csv	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-,0.000000000,1.750000000,0,"1 of 10: 0 at 0 dur. 1.75"
-,1.000000000,0.500000000,0.1,"2 of 10: 0.1 at 1 dur. 0.5"
-,2.000000000,1.750000000,0.2,"3 of 10: 0.2 at 2 dur. 1.75"
-,3.000000000,0.500000000,0.3,"4 of 10: 0.3 at 3 dur. 0.5"
-,4.000000000,1.750000000,0.4,"5 of 10: 0.4 at 4 dur. 1.75"
-,5.000000000,0.500000000,0.5,"6 of 10: 0.5 at 5 dur. 0.5"
-,6.000000000,1.750000000,0.6,"7 of 10: 0.6 at 6 dur. 1.75"
-,7.000000000,0.500000000,0.7,"8 of 10: 0.7 at 7 dur. 0.5"
-,8.000000000,1.750000000,0.8,"9 of 10: 0.8 at 8 dur. 1.75"
-,9.000000000,0.500000000,0.9,"10 of 10: 0.9 at 9 dur. 0.5"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/include.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,57 @@
+
+mypath=`dirname $0`
+
+testdir=$mypath/..
+r=$testdir/../sonic-annotator
+
+version=1.1
+
+audiopath=$testdir/audio
+
+percplug=vamp:vamp-example-plugins:percussiononsets
+amplplug=vamp:vamp-example-plugins:amplitudefollower
+testplug=vamp:vamp-test-plugin:vamp-test-plugin
+
+fail() {
+    echo "Test failed: $1"
+    exit 1
+}
+
+csvcompare() {
+    # permit some fuzz in final few digits
+    a="$1"
+    b="$2"
+    perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$a" > "${a}__"
+    perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$b" > "${b}__"
+    cmp -s "${a}__" "${b}__"
+    rv=$?
+    rm "${a}__" "${b}__"
+    return $rv
+}
+
+csvcompare_ignorefirst() {
+    # a bit like the above, but ignoring first column (and without temp files)
+    out=`cat "$1" "$2" | cut -d, -f2- | perl -p -e 's/(\d+\.\d{6})\d+/$1/' | sort | uniq -c | grep -v ' 2 '`
+    return `[ -z "$out" ]`
+}
+
+faildiff() {
+    echo "Test failed: $1"
+    if [ -n "$2" -a -n "$3" ]; then
+	echo "Output follows:"
+	echo "--"
+	cat $2
+	echo "--"
+	echo "Expected output follows:"
+	echo "--"
+	cat $3
+	echo "--"
+	echo "Diff:"
+	echo "--"
+	sdiff -w78 $2 $3
+	echo "--"
+    fi
+    exit 1
+}
+
+
--- a/tests/test-as-advertised.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-#!/bin/bash
-
-mypath=`dirname $0`
-r=$mypath/../sonic-annotator
-
-infile=$mypath/audio/3clicks8.wav
-testplug=vamp:vamp-example-plugins:percussiononsets
-tmpdir=$mypath/tmp_1_$$.dir
-tmpwav=$tmpdir/test.wav
-
-trap "rm -rf $tmpdir" 0
-
-fail() {
-    echo "Test failed: $1"
-    exit 1
-}
-
-types=`\
-    $r --help 2>&1 | \
-    grep 'Supported writer types are:' | \
-    sed -e 's/^.*://' -e 's/[,\.]//g' \
-    `
-[ -n "$types" ] || \
-    fail "Fails to report sensible list of writers in help text?"
-
-onsets=$mypath/transforms/transforms-as-advertised-percussiononsets-onsets.n3
-df=$mypath/transforms/transforms-as-advertised-percussiononsets-detectionfunction.n3
-
-adbdir=$tmpdir/audiodb-test
-mkdir -p $adbdir
-
-for type in $types; do
-
-    mkdir -p $tmpdir
-    cp $infile $tmpwav
-
-    # Some of these are special cases:
-    #
-    # * The "default" writer type always prints to stdout instead of
-    # to a file.
-    #
-    # * The "audiodb" writer will not print any output for features
-    # that have no values (but are only point events).  I don't know
-    # how reasonable that is, but it's clearly intentional.  It also
-    # writes to a subdirectory $basedir/$catid/$trackid.$output
-
-    case $type in
-	audiodb) 
-	    $r -t $df -w $type $tmpwav --audiodb-basedir $tmpdir --audiodb-catid `basename $adbdir` 2>/dev/null || \
-		fail "Fails to run with reader type \"$type\" and default options"
-	    ;;
-	default) 
-	    $r -t $onsets -w $type $tmpwav > $tmpdir/test.out 2>/dev/null || \
-		fail "Fails to run with reader type \"$type\" and default options"
-	    ;;
-	*)
-	    $r -t $onsets -w $type $tmpwav 2>/dev/null || \
-		fail "Fails to run with reader type \"$type\" and default options"
-	    ;;
-    esac
-    newfiles=`ls $tmpdir | fgrep -v .wav`
-    if [ "$type" = audiodb ]; then newfiles=`ls $adbdir`; fi
-
-    [ -n "$newfiles" ] || \
-	fail "Fails to create output file for reader \"$type\" with default options"
-
-    case `echo $newfiles | wc -w` in
-	[2-9])
-	if [ "$type" != audiodb ]; then
-	    fail "Produces more than one output file for reader \"$type\" with default options"
-	fi
-	;;
-	1)
-	if [ "$type" = audiodb ]; then
-	    fail "Produces only one output file for reader \"$type\" with default options (expected two)"
-	fi
-	;;
-    esac
-
-    rm -r $tmpdir
-done
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-as-advertised/test-as-advertised.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,77 @@
+#!/bin/bash
+
+. ../include.sh
+
+infile=$audiopath/3clicks8.wav
+tmpdir=$mypath/tmp_1_$$.dir
+tmpwav=$tmpdir/test.wav
+
+trap "rm -rf $tmpdir" 0
+
+types=`\
+    $r --help 2>&1 | \
+    grep 'Supported writer types are:' | \
+    sed -e 's/^.*://' -e 's/[,\.]//g' \
+    `
+[ -n "$types" ] || \
+    fail "Fails to report sensible list of writers in help text?"
+
+onsets=$mypath/transforms/percussiononsets-onsets.n3
+df=$mypath/transforms/percussiononsets-detectionfunction.n3
+
+adbdir=$tmpdir/audiodb-test
+mkdir -p $adbdir
+
+for type in $types; do
+
+    mkdir -p $tmpdir
+    cp $infile $tmpwav
+
+    # Some of these are special cases:
+    #
+    # * The "default" writer type always prints to stdout instead of
+    # to a file.
+    #
+    # * The "audiodb" writer will not print any output for features
+    # that have no values (but are only point events).  I don't know
+    # how reasonable that is, but it's clearly intentional.  It also
+    # writes to a subdirectory $basedir/$catid/$trackid.$output
+
+    case $type in
+	audiodb) 
+	    $r -t $df -w $type $tmpwav --audiodb-basedir $tmpdir --audiodb-catid `basename $adbdir` 2>/dev/null || \
+		fail "Fails to run with reader type \"$type\" and default options"
+	    ;;
+	default) 
+	    $r -t $onsets -w $type $tmpwav > $tmpdir/test.out 2>/dev/null || \
+		fail "Fails to run with reader type \"$type\" and default options"
+	    ;;
+	*)
+	    $r -t $onsets -w $type $tmpwav 2>/dev/null || \
+		fail "Fails to run with reader type \"$type\" and default options"
+	    ;;
+    esac
+    newfiles=`ls $tmpdir | fgrep -v .wav`
+    if [ "$type" = audiodb ]; then newfiles=`ls $adbdir`; fi
+
+    [ -n "$newfiles" ] || \
+	fail "Fails to create output file for reader \"$type\" with default options"
+
+    case `echo $newfiles | wc -w` in
+	[2-9])
+	if [ "$type" != audiodb ]; then
+	    fail "Produces more than one output file for reader \"$type\" with default options"
+	fi
+	;;
+	1)
+	if [ "$type" = audiodb ]; then
+	    fail "Produces only one output file for reader \"$type\" with default options (expected two)"
+	fi
+	;;
+    esac
+
+    rm -r $tmpdir
+done
+
+exit 0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-as-advertised/transforms/percussiononsets-detectionfunction.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,11 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets;
+	vamp:output examples:percussiononsets_output_detectionfunction.
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-as-advertised/transforms/percussiononsets-onsets.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets.
+
+
+
--- a/tests/test-audioformat.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-mypath=`dirname $0`
-r=$mypath/../sonic-annotator
-
-inbase=$mypath/audio/3clicks
-testplug=vamp:vamp-example-plugins:percussiononsets
-tmpfile1=$mypath/tmp_1_$$
-tmpfile2=$mypath/tmp_2_$$
-
-trap "rm -f $tmpfile1 $tmpfile2" 0
-
-. test-include.sh
-
-for extension in wav ogg mp3 ; do
-
-    transform=$mypath/transforms/transforms-audioformat-percussiononsets.n3 
-    expected=$mypath/expected/transforms-audioformat-percussiononsets-$extension.csv
-
-    test -f $transform || \
-	fail "Internal error: no transforms file for suffix $suffix"
-
-    test -f $expected || \
-	fail "Internal error: no expected output file for suffix $suffix"
-
-    infile=$inbase.$extension
-    if [ "$extension" = "wav" ]; then infile=${inbase}8.$extension; fi
-
-    test -f $infile || \
-	fail "Internal error: no input audio file for extension $extension"
-
-    $r -t $transform -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
-	fail "Fails to run transform $transform against audio file $infile"
-
-    if [ "$extension" = "wav" ]; then
-	csvcompare $tmpfile2 $expected || \
-	    fail "Output mismatch for transform $transform with audio file $infile"
-    else
-	csvcompare $tmpfile2 $expected || \
-	    ( echo "NOTE: Output mismatch for transform $transform with audio file $infile" ; \
-	      echo "This may be the result of differences in the audio file decoder, so I am not" ; \
-	      echo "failing the test, but I recommend that you check the results." )
-    fi
-done
-
-exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-audioformat/expected/norm-off.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+"./../audio/3clicks8quiet.wav",0.000000000,0.00555121
+,0.023219954,0.00547576
+,0.046439909,0.00564068
+,0.069659863,0.00546322
+,0.092879818,0.00562361
+,0.116099773,0.00556463
+,0.139319727,0.00536865
+,0.162539682,0.00531881
+,0.185759637,0.00515389
+,0.208979591,0.00555715
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-audioformat/expected/norm-on.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+"./../audio/3clicks8quiet.wav",0.000000000,0.054658
+,0.023219954,0.0539152
+,0.046439909,0.055539
+,0.069659863,0.0537917
+,0.092879818,0.0553709
+,0.116099773,0.0547902
+,0.139319727,0.0528606
+,0.162539682,0.0523698
+,0.185759637,0.050746
+,0.208979591,0.0547165
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-audioformat/expected/percussiononsets-mp3.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,4 @@
+"./../audio/3clicks.mp3",0.058049886
+,0.824308390
+,1.706666666
+,2.461315192
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-audioformat/expected/percussiononsets-ogg.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,3 @@
+"./../audio/3clicks.ogg",0.777868480
+,1.648616780
+,2.414875283
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-audioformat/expected/percussiononsets-wav.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,3 @@
+"./../audio/3clicks8.wav",0.777868480
+,1.648616780
+,2.414875283
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-audioformat/test-audioformat.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+. ../include.sh
+
+inbase=$audiopath/3clicks
+tmpfile1=$mypath/tmp_1_$$
+tmpfile2=$mypath/tmp_2_$$
+
+trap "rm -f $tmpfile1 $tmpfile2" 0
+
+for extension in wav ogg mp3 ; do
+
+    transform=$mypath/transforms/percussiononsets.n3 
+    expected=$mypath/expected/percussiononsets-$extension.csv
+
+    test -f $transform || \
+	fail "Internal error: no transforms file"
+
+    test -f $expected || \
+	fail "Internal error: no expected output file for extension $extension"
+
+    infile=$inbase.$extension
+    if [ "$extension" = "wav" ]; then infile=${inbase}8.$extension; fi
+
+    test -f $infile || \
+	fail "Internal error: no input audio file for extension $extension"
+
+    $r -t $transform -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
+	fail "Fails to run transform $transform against audio file $infile"
+
+    if [ "$extension" = "wav" ]; then
+	csvcompare $tmpfile2 $expected || \
+	    faildiff "Output mismatch for transform $transform with audio file $infile" $tmpfile2 $expected
+    else
+	csvcompare $tmpfile2 $expected || \
+	    ( echo "NOTE: Output mismatch for transform $transform with audio file $infile" ; \
+	      echo "This may be the result of differences in the audio file decoder, so I am not" ; \
+	      echo "failing the test, but I recommend that you check the results." )
+    fi
+done
+
+# Check the normalise flag
+
+$r -d $amplplug -w csv --csv-stdout ${inbase}8quiet.wav 2>/dev/null | head > $tmpfile1 || \
+    fail "Fails to run default transform for plugin $amplplug against audio file ${inbase}8quiet.wav"
+csvcompare $tmpfile1 $mypath/expected/norm-off.csv || \
+    faildiff "Output mismatch for default transform for plugin $amplplug against audio file ${inbase}8quiet.wav without normalisation" $tmpfile1 $mypath/expected/norm-off.csv
+
+$r -d $amplplug -n -w csv --csv-stdout ${inbase}8quiet.wav 2>/dev/null | head > $tmpfile1 || \
+    fail "Fails to run default transform for plugin $amplplug against audio file ${inbase}8quiet.wav with normalisation"
+csvcompare $tmpfile1 $mypath/expected/norm-on.csv || \
+    faildiff "Output mismatch for default transform for plugin $amplplug against audio file ${inbase}8quiet.wav with normalisation" $tmpfile1 $mypath/expected/norm-on.csv
+
+$r -d $amplplug --normalise -w csv --csv-stdout ${inbase}8quiet.wav 2>/dev/null | head > $tmpfile1 || \
+    fail "Fails to run default transform for plugin $amplplug against audio file ${inbase}8quiet.wav with normalisation"
+csvcompare $tmpfile1 $mypath/expected/norm-on.csv || \
+    faildiff "Output mismatch for default transform for plugin $amplplug against audio file ${inbase}8quiet.wav with normalisation" $tmpfile1 $mypath/expected/norm-on.csv
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-audioformat/transforms/percussiononsets.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets.
+
+
+
--- a/tests/test-csv-destinations.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-#!/bin/bash
-
-mypath=`dirname $0`
-r=$mypath/../sonic-annotator
-
-infile1=$mypath/audio/3clicks8.wav
-infile2=$mypath/audio/6clicks8.wav
-
-outfile1=$mypath/audio/3clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.csv
-outfile2=$mypath/audio/6clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.csv
-
-infile1dot=$mypath/audio/3.clicks.8.wav
-outfile1dot=$mypath/audio/3.clicks.8_vamp_vamp-example-plugins_percussiononsets_onsets.csv
-
-outfile3=$mypath/audio/3clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.csv
-outfile4=$mypath/audio/3clicks8_vamp_vamp-example-plugins_percussiononsets_detectionfunction.csv
-
-testplug=vamp:vamp-example-plugins:percussiononsets
-tmpcsv=$mypath/tmp_1_$$.csv
-
-trap "rm -f $tmpcsv $outfile1 $outfile2 $outfile3 $outfile4 $infile1dot $outfile1dot" 0
-
-fail() {
-    echo "Test failed: $1"
-    exit 1
-}
-
-transformpfx=$mypath/transforms/transforms-rdf-writer-percussiononsets
-
-check_csv() {
-    test -f $1 || \
-	fail "Fails to write output to expected location $1 for $2"
-    # every line must contain the same number of commas
-    formats=`awk -F, '{ print NF; }' $1 | sort | uniq | wc | awk '{ print $1 }'`
-    if [ "$formats" != "1" ]; then
-	fail "Output is not consistently formatted comma-separated file for $2"
-    fi
-    rm -f $1
-}    
-
-
-ctx="onsets transform, one audio file, default CSV writer destination"
-
-rm -f $outfile1
-
-$r -t $transformpfx-onsets.n3 -w csv $infile1 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_csv $outfile1 "$ctx"
-
-
-ctx="onsets transform, one audio file with dots in filename, default CSV writer destination"
-
-rm -f $outfile1
-
-cp $infile1 $infile1dot
-
-$r -t $transformpfx-onsets.n3 -w csv $infile1dot 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_csv $outfile1dot "$ctx"
-
-rm -f $infile1dot $outfile1dot
-
-
-ctx="onsets and df transforms, one audio file, default CSV writer destination"
-
-rm -f $outfile1
-
-$r -t $transformpfx-onsets.n3 -t $transformpfx-detectionfunction.n3 -w csv $infile1 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_csv $outfile1 "$ctx"
-
-
-ctx="onsets transform, two audio files, default CSV writer destination"
-
-rm -f $outfile1
-rm -f $outfile2
-
-$r -t $transformpfx-onsets.n3 -w csv $infile1 $infile2 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_csv $outfile1 "$ctx"
-check_csv $outfile2 "$ctx"
-
-
-ctx="onsets transform, two audio files, one-file CSV writer"
-
-$r -t $transformpfx-onsets.n3 -w csv --csv-one-file $tmpcsv $infile1 $infile2 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_csv $tmpcsv "$ctx"
-
-
-ctx="onsets transform, two audio files, stdout CSV writer"
-
-$r -t $transformpfx-onsets.n3 -w csv --csv-stdout $infile1 $infile2 2>/dev/null >$tmpcsv || \
-    fail "Fails to run with $ctx"
-
-check_csv $tmpcsv "$ctx"
-
-
-ctx="existing output file and no --csv-force"
-
-touch $outfile1
-
-$r -t $transformpfx-onsets.n3 -w csv $infile1 2>/dev/null && \
-    fail "Fails by completing successfully when output file already exists (should refuse and bail out)"
-
-
-ctx="existing output file and --csv-force"
-
-touch $outfile1
-
-$r -t $transformpfx-onsets.n3 -w csv --csv-force $infile1 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_csv $outfile1 "$ctx"
-
-
-exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-csv-destinations/test-csv-destinations.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,114 @@
+#!/bin/bash
+
+. ../include.sh
+
+infile1=$audiopath/3clicks8.wav
+infile2=$audiopath/6clicks8.wav
+
+outfile1=$audiopath/3clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.csv
+outfile2=$audiopath/6clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.csv
+
+infile1dot=$audiopath/3.clicks.8.wav
+outfile1dot=$audiopath/3.clicks.8_vamp_vamp-example-plugins_percussiononsets_onsets.csv
+
+outfile3=$audiopath/3clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.csv
+outfile4=$audiopath/3clicks8_vamp_vamp-example-plugins_percussiononsets_detectionfunction.csv
+
+tmpcsv=$mypath/tmp_1_$$.csv
+
+trap "rm -f $tmpcsv $outfile1 $outfile2 $outfile3 $outfile4 $infile1dot $outfile1dot" 0
+
+transformdir=$mypath/transforms
+
+check_csv() {
+    test -f $1 || \
+	fail "Fails to write output to expected location $1 for $2"
+    # every line must contain the same number of commas
+    formats=`awk -F, '{ print NF; }' $1 | sort | uniq | wc | awk '{ print $1 }'`
+    if [ "$formats" != "1" ]; then
+	fail "Output is not consistently formatted comma-separated file for $2"
+    fi
+    rm -f $1
+}    
+
+
+ctx="onsets transform, one audio file, default CSV writer destination"
+
+rm -f $outfile1
+
+$r -t $transformdir/onsets.n3 -w csv $infile1 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_csv $outfile1 "$ctx"
+
+
+ctx="onsets transform, one audio file with dots in filename, default CSV writer destination"
+
+rm -f $outfile1
+
+cp $infile1 $infile1dot
+
+$r -t $transformdir/onsets.n3 -w csv $infile1dot 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_csv $outfile1dot "$ctx"
+
+rm -f $infile1dot $outfile1dot
+
+
+ctx="onsets and df transforms, one audio file, default CSV writer destination"
+
+rm -f $outfile1
+
+$r -t $transformdir/onsets.n3 -t $transformdir/detectionfunction.n3 -w csv $infile1 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_csv $outfile1 "$ctx"
+
+
+ctx="onsets transform, two audio files, default CSV writer destination"
+
+rm -f $outfile1
+rm -f $outfile2
+
+$r -t $transformdir/onsets.n3 -w csv $infile1 $infile2 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_csv $outfile1 "$ctx"
+check_csv $outfile2 "$ctx"
+
+
+ctx="onsets transform, two audio files, one-file CSV writer"
+
+$r -t $transformdir/onsets.n3 -w csv --csv-one-file $tmpcsv $infile1 $infile2 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_csv $tmpcsv "$ctx"
+
+
+ctx="onsets transform, two audio files, stdout CSV writer"
+
+$r -t $transformdir/onsets.n3 -w csv --csv-stdout $infile1 $infile2 2>/dev/null >$tmpcsv || \
+    fail "Fails to run with $ctx"
+
+check_csv $tmpcsv "$ctx"
+
+
+ctx="existing output file and no --csv-force"
+
+touch $outfile1
+
+$r -t $transformdir/onsets.n3 -w csv $infile1 2>/dev/null && \
+    fail "Fails by completing successfully when output file already exists (should refuse and bail out)"
+
+
+ctx="existing output file and --csv-force"
+
+touch $outfile1
+
+$r -t $transformdir/onsets.n3 -w csv --csv-force $infile1 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_csv $outfile1 "$ctx"
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-csv-destinations/transforms/detectionfunction.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,11 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction .
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-csv-destinations/transforms/onsets.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets.
+
+
+
--- a/tests/test-helpfulflags.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-mypath=`dirname $0`
-r=$mypath/../sonic-annotator
-
-testplug=vamp:vamp-example-plugins:percussiononsets
-testplug2=vamp:vamp-test-plugin:vamp-test-plugin
-
-fail() {
-    echo "Test failed: $1"
-    exit 1
-}
-
-$r >/dev/null 2>&1 && \
-    fail "Return code 0 when run without args (should be a failure code)"
-
-$r 2>&1 >/dev/null | grep -q "for help" || \
-    fail "Improper response when run without args"
-
-$r --help 2>&1 | grep -q Copy || \
-    fail "Expected help not printed when run with --help"
-
-$r --list >/dev/null 2>&1 || \
-    fail "Fails to run with --list"
-
-$r --list 2>/dev/null | grep -q $testplug || \
-    fail "Fails to print $testplug in plugin list (if you haven't got it, install it -- it's needed for other tests)"
-
-$r --list 2>/dev/null | grep -q $testplug2 || \
-    fail "Fails to print $testplug2 in plugin list (if you haven't got it, install it -- it's needed for other tests)"
-
-$r --skeleton $testplug >/dev/null || \
-    fail "Fails to run with --skeleton $testplug"
-
-$r -s $testplug >/dev/null || \
-    fail "Fails to run with -s $testplug"
-
-$r --skeleton $testplug >/dev/null || \
-    fail "Fails to run with --skeleton $testplug"
-
-$r --skeleton $testplug | rapper -i turtle - test >/dev/null 2>&1 || \
-    fail "Invalid XML skeleton produced with --skeleton $testplug"
-
-exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-helpfulflags/test-helpfulflags.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+. ../include.sh
+
+$r >/dev/null 2>&1 && \
+    fail "Return code 0 when run without args (should be a failure code)"
+
+$r 2>&1 >/dev/null | grep -q "for help" || \
+    fail "Improper response when run without args"
+
+$r --help 2>&1 | grep -q Copy || \
+    fail "Expected help not printed when run with --help"
+
+$r --list >/dev/null 2>&1 || \
+    fail "Fails to run with --list"
+
+$r --list 2>/dev/null | grep -q $percplug || \
+    fail "Fails to print $percplug in plugin list (if you haven't got it, install it -- it's needed for other tests)"
+
+$r --list 2>/dev/null | grep -q $testplug || \
+    fail "Fails to print $testplug in plugin list (if you haven't got it, install it -- it's needed for other tests)"
+
+$r --skeleton $percplug >/dev/null || \
+    fail "Fails to run with --skeleton $percplug"
+
+$r -s $percplug >/dev/null || \
+    fail "Fails to run with -s $percplug"
+
+$r --skeleton $percplug >/dev/null || \
+    fail "Fails to run with --skeleton $percplug"
+
+$r --skeleton $percplug | rapper -i turtle - test >/dev/null 2>&1 || \
+    fail "Invalid XML skeleton produced with --skeleton $percplug"
+
+$r --minversion $version || \
+    fail "Returned failure code when run with --minversion $version"
+
+$r --minversion ${version}.1 2>/dev/null && \
+    fail "Returned success code when run with --minversion $version"
+
+$r --minversion 63.9 2>/dev/null && \
+    fail "Returned success code when run with --minversion 63.9"
+
+exit 0
--- a/tests/test-include.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-
-fail() {
-    echo "Test failed: $1"
-    exit 1
-}
-
-csvcompare() {
-    # permit some fuzz in final few digits
-    a="$1"
-    b="$2"
-    perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$a" > "${a}__"
-    perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$b" > "${b}__"
-    cmp -s "${a}__" "${b}__"
-    rv=$?
-    rm "${a}__" "${b}__"
-    return $rv
-}
-
-csvcompare_ignorefirst() {
-    # a bit like the above, but ignoring first column (and without temp files)
-    out=`cat "$1" "$2" | cut -d, -f2- | perl -p -e 's/(\d+\.\d{6})\d+/$1/' | sort | uniq -c | grep -v ' 2 '`
-    return `[ -z "$out" ]`
-}
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-multiple-audio/expected/all-files.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,28 @@
+"./../audio/20sec-silence.wav",0.000000000,20.062040815,mean,61.6562,"(mean value, continuous-time average)"
+,0.000000000,20.062040815,median,0,"(median value, continuous-time average)"
+,0.000000000,20.062040815,mode,0,"(modal value, continuous-time average)"
+,0.000000000,20.062040815,mean,895.898,"(mean value, continuous-time average)"
+"./../audio/3clicks.mp3",0.000000000,5.201269840,mean,164.674,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,169,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,680.411,"(mean value, continuous-time average)"
+"./../audio/3clicks.ogg",0.000000000,5.201269840,mean,162.694,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,169,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,174,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,697.732,"(mean value, continuous-time average)"
+"./../audio/3clicks8.wav",0.000000000,5.201269840,mean,162.585,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,168,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,677.241,"(mean value, continuous-time average)"
+"./../audio/3clicks8quiet.wav",0.000000000,5.201269840,mean,162.266,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,169,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,648.857,"(mean value, continuous-time average)"
+"./../audio/6clicks.ogg",0.000000000,10.031020407,mean,166.612,"(mean value, continuous-time average)"
+,0.000000000,10.031020407,median,167,"(median value, continuous-time average)"
+,0.000000000,10.031020407,mode,170,"(modal value, continuous-time average)"
+,0.000000000,10.031020407,mean,713.148,"(mean value, continuous-time average)"
+"./../audio/6clicks8.wav",0.000000000,10.031020407,mean,169.079,"(mean value, continuous-time average)"
+,0.000000000,10.031020407,median,169,"(median value, continuous-time average)"
+,0.000000000,10.031020407,mode,164,"(modal value, continuous-time average)"
+,0.000000000,10.031020407,mean,695.759,"(mean value, continuous-time average)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-multiple-audio/expected/playlist.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,8 @@
+"3clicks.mp3",0.000000000,5.201269840,mean,164.674,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,169,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,680.411,"(mean value, continuous-time average)"
+"6clicks.ogg",0.000000000,10.031020407,mean,166.612,"(mean value, continuous-time average)"
+,0.000000000,10.031020407,median,167,"(median value, continuous-time average)"
+,0.000000000,10.031020407,mode,170,"(modal value, continuous-time average)"
+,0.000000000,10.031020407,mean,713.148,"(mean value, continuous-time average)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-multiple-audio/test-multiple-audio.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+. ../include.sh
+
+tmpfile=$mypath/tmp_1_$$
+
+trap "rm -f $tmpfile" 0
+
+transform=$mypath/transforms/detectionfunction.n3 
+
+urlbase=http://vamp-plugins.org/sonic-annotator/testfiles
+
+
+# 1. Recursive local directory
+
+# Note, the output here depends on all the audio files present -- we
+# would have to regenerate it if we added more test audio files. Note
+# that the -r flag is not supposed to pick up playlist files, only
+# audio files
+$r -t $transform -w csv --csv-stdout -r --summary-only $audiopath > $tmpfile 2>/dev/null || \
+    fail "Fails to run transform $transform with recursive dir option"
+
+expected=$mypath/expected/all-files
+csvcompare $tmpfile $expected.csv || \
+    faildiff "Output mismatch for transform $transform with summaries and recursive dir option" $tmpfile $expected.csv
+
+
+# 2. Local playlist file referring to local audio files
+
+# Here we strip any leading path from the audio file in the output,
+# because the playlist reader will have resolved files to absolute
+# paths and those will differ between systems
+$r -t $transform -w csv --csv-stdout $audiopath/playlist.m3u --summary-only 2>/dev/null | sed 's,^"[^"]*/,",' > $tmpfile || \
+    fail "Fails to run transform $transform with playlist input"
+
+expected=$mypath/expected/playlist
+csvcompare $tmpfile $expected.csv || \
+    faildiff "Output mismatch for transform $transform with summaries and playlist input" $tmpfile $expected.csv
+
+
+# 3. Multiple files supplied directly on command line
+
+# Strip paths again, just so we can use the same output comparison
+# file as above
+$r -t $transform -w csv --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null | sed 's,^"[^"]*/,",' > $tmpfile || \
+    fail "Fails to run transform $transform with 2-file input"
+
+expected=$mypath/expected/playlist
+csvcompare $tmpfile $expected.csv || \
+    faildiff "Output mismatch for transform $transform with summaries and 2-file input" $tmpfile $expected.csv
+
+
+# 4. Multiple files supplied directly on command line, with file: URL
+
+$r -t $transform -w csv --csv-stdout $audiopath/3clicks.mp3 file://`pwd`/$audiopath/6clicks.ogg --summary-only 2>/dev/null | sed 's,^"[^"]*/,",' > $tmpfile || \
+    fail "Fails to run transform $transform with 2-file input"
+
+expected=$mypath/expected/playlist
+csvcompare $tmpfile $expected.csv || \
+    faildiff "Output mismatch for transform $transform with summaries and 2-file input using file:// URL" $tmpfile $expected.csv
+
+
+# 5. Remote playlist file referring to remote audio files
+
+$r -t $transform -w csv --csv-stdout $urlbase/playlist.m3u --summary-only 2>/dev/null | sed 's,^"[^"]*/,",' > $tmpfile || \
+    fail "Fails to run transform $transform with remote playlist input"
+
+expected=$mypath/expected/playlist
+csvcompare $tmpfile $expected.csv || \
+    faildiff "Output mismatch for transform $transform with summaries and remote playlist input" $tmpfile $expected.csv
+
+
+# 6. Local playlist file referring to mixture of remote and local audio files
+
+$r -t $transform -w csv --csv-stdout $audiopath/remote-playlist.m3u --summary-only 2>/dev/null | sed 's,^"[^"]*/,",' > $tmpfile || \
+    fail "Fails to run transform $transform with playlist of remote files"
+
+expected=$mypath/expected/playlist
+csvcompare $tmpfile $expected.csv || \
+    faildiff "Output mismatch for transform $transform with summaries and remote playlist input" $tmpfile $expected.csv
+
+
+# 7. Multiple remote files supplied directly on command line
+
+$r -t $transform -w csv --csv-stdout $urlbase/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null | sed 's,^"[^"]*/,",' > $tmpfile || \
+    fail "Fails to run transform $transform with 2-file remote input"
+
+expected=$mypath/expected/playlist
+csvcompare $tmpfile $expected.csv || \
+    faildiff "Output mismatch for transform $transform with summaries and 2-file input" $tmpfile $expected.csv
+
+
+# 8. Mixture of remote and local files supplied on command line
+
+$r -t $transform -w csv --csv-stdout $audiopath/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null | sed 's,^"[^"]*/,",' > $tmpfile || \
+    fail "Fails to run transform $transform with 2-file remote input"
+
+expected=$mypath/expected/playlist
+csvcompare $tmpfile $expected.csv || \
+    faildiff "Output mismatch for transform $transform with summaries and mixed local/remote 2-file input" $tmpfile $expected.csv
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-multiple-audio/transforms/detectionfunction.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,32 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:summary_type "mean" .
+
+:transform1 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:summary_type "median" .
+
+:transform2 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets .
+
+:transform3 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:summary_type "mode" .
+
+:transform4 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:step_size 2048 ;
+	vamp:block_size 4096 ;
+	vamp:summary_type "mean" .
+
+ 
--- a/tests/test-rdf-destinations.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-#!/bin/bash
-
-mypath=`dirname $0`
-r=$mypath/../sonic-annotator
-
-infile1=$mypath/audio/3clicks8.wav
-infile2=$mypath/audio/6clicks8.wav
-
-outfile1=$mypath/audio/3clicks8.n3
-outfile2=$mypath/audio/6clicks8.n3
-
-infile1dot=$mypath/audio/3.clicks.8.wav
-outfile1dot=$mypath/audio/3.clicks.8.n3
-
-outfile3=$mypath/audio/3clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.n3
-outfile4=$mypath/audio/3clicks8_vamp_vamp-example-plugins_percussiononsets_detectionfunction.n3
-outfile5=$mypath/audio/6clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.n3
-outfile6=$mypath/audio/6clicks8_vamp_vamp-example-plugins_percussiononsets_detectionfunction.n3
-
-testplug=vamp:vamp-example-plugins:percussiononsets
-tmpttl=$mypath/tmp_1_$$.ttl
-
-trap "rm -f $tmpttl $outfile1 $outfile2 $outfile3 $outfile4 $outfile5 $outfile6 $infile1dot $outfile1dot" 0
-
-fail() {
-    echo "Test failed: $1"
-    exit 1
-}
-
-transformpfx=$mypath/transforms/transforms-rdf-writer-percussiononsets
-
-check_rdf() {
-    test -f $1 || \
-	fail "Fails to write output to expected location $1 for $2"
-    rapper -i turtle $1 >/dev/null 2>&1 || \
-	fail "Fails to produce parseable RDF/TTL for $2"
-    rapper -i turtle -c $1 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' || \
-	fail "RDF output contains no triples (?) for $2"
-    rm -f $1
-}    
-
-
-ctx="onsets transform, one audio file, default RDF writer destination"
-
-rm -f $outfile1
-
-$r -t $transformpfx-onsets.n3 -w rdf $infile1 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_rdf $outfile1 "$ctx"
-
-
-ctx="onsets transform, one audio file with dots in filename, default RDF writer destination"
-
-rm -f $outfile1
-
-cp $infile1 $infile1dot
-
-$r -t $transformpfx-onsets.n3 -w rdf $infile1dot 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_rdf $outfile1dot "$ctx"
-
-rm -f $infile1dot $outfile1dot
-
-
-ctx="onsets and df transforms, one audio file, default RDF writer destination"
-
-rm -f $outfile1
-
-$r -t $transformpfx-onsets.n3 -t $transformpfx-detectionfunction.n3 -w rdf $infile1 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_rdf $outfile1 "$ctx"
-
-
-ctx="onsets transform, two audio files, default RDF writer destination"
-
-rm -f $outfile1
-rm -f $outfile2
-
-$r -t $transformpfx-onsets.n3 -w rdf $infile1 $infile2 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_rdf $outfile1 "$ctx"
-check_rdf $outfile2 "$ctx"
-
-
-ctx="onsets transform, two audio files, one-file RDF writer"
-
-$r -t $transformpfx-onsets.n3 -w rdf --rdf-one-file $tmpttl $infile1 $infile2 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_rdf $tmpttl "$ctx"
-
-
-ctx="onsets transform, two audio files, stdout RDF writer"
-
-$r -t $transformpfx-onsets.n3 -w rdf --rdf-stdout $infile1 $infile2 2>/dev/null >$tmpttl || \
-    fail "Fails to run with $ctx"
-
-check_rdf $tmpttl "$ctx"
-
-
-ctx="onsets transform, one audio file, many-files RDF writer"
-
-rm -f $outfile3
-
-$r -t $transformpfx-onsets.n3 -w rdf --rdf-many-files $infile1 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_rdf $outfile3 "$ctx"
-
-
-ctx="onsets transform, two audio files, many-files RDF writer"
-
-rm -f $outfile3
-rm -f $outfile5
-
-$r -t $transformpfx-onsets.n3 -w rdf --rdf-many-files $infile1 $infile2 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_rdf $outfile3 "$ctx"
-check_rdf $outfile5 "$ctx"
-
-
-ctx="onsets and df transforms, two audio files, many-files RDF writer"
-
-rm -f $outfile3
-rm -f $outfile4
-rm -f $outfile5
-rm -f $outfile6
-
-$r -t $transformpfx-onsets.n3 -t $transformpfx-detectionfunction.n3 -w rdf --rdf-many-files $infile1 $infile2 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_rdf $outfile3 "$ctx"
-check_rdf $outfile4 "$ctx"
-check_rdf $outfile5 "$ctx"
-check_rdf $outfile6 "$ctx"
-
-
-ctx="existing output file and no --rdf-force"
-
-touch $outfile1
-
-$r -t $transformpfx-onsets.n3 -w rdf $infile1 2>/dev/null && \
-    fail "Fails by completing successfully when output file already exists (should refuse and bail out)"
-
-
-ctx="existing output file and --rdf-force"
-
-touch $outfile1
-
-$r -t $transformpfx-onsets.n3 -w rdf --rdf-force $infile1 2>/dev/null || \
-    fail "Fails to run with $ctx"
-
-check_rdf $outfile1 "$ctx"
-
-
-exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rdf-destinations/test-rdf-destinations.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,154 @@
+#!/bin/bash
+
+. ../include.sh
+
+infile1=$audiopath/3clicks8.wav
+infile2=$audiopath/6clicks8.wav
+
+outfile1=$audiopath/3clicks8.n3
+outfile2=$audiopath/6clicks8.n3
+
+infile1dot=$audiopath/3.clicks.8.wav
+outfile1dot=$audiopath/3.clicks.8.n3
+
+outfile3=$audiopath/3clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.n3
+outfile4=$audiopath/3clicks8_vamp_vamp-example-plugins_percussiononsets_detectionfunction.n3
+outfile5=$audiopath/6clicks8_vamp_vamp-example-plugins_percussiononsets_onsets.n3
+outfile6=$audiopath/6clicks8_vamp_vamp-example-plugins_percussiononsets_detectionfunction.n3
+
+tmpttl=$mypath/tmp_1_$$.ttl
+
+trap "rm -f $tmpttl $outfile1 $outfile2 $outfile3 $outfile4 $outfile5 $outfile6 $infile1dot $outfile1dot" 0
+
+transformdir=$mypath/transforms
+
+check_rdf() {
+    test -f $1 || \
+	fail "Fails to write output to expected location $1 for $2"
+    rapper -i turtle $1 >/dev/null 2>&1 || \
+	fail "Fails to produce parseable RDF/TTL for $2"
+    rapper -i turtle -c $1 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' || \
+	fail "RDF output contains no triples (?) for $2"
+    rm -f $1
+}    
+
+
+ctx="onsets transform, one audio file, default RDF writer destination"
+
+rm -f $outfile1
+
+$r -t $transformdir/onsets.n3 -w rdf $infile1 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_rdf $outfile1 "$ctx"
+
+
+ctx="onsets transform, one audio file with dots in filename, default RDF writer destination"
+
+rm -f $outfile1
+
+cp $infile1 $infile1dot
+
+$r -t $transformdir/onsets.n3 -w rdf $infile1dot 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_rdf $outfile1dot "$ctx"
+
+rm -f $infile1dot $outfile1dot
+
+
+ctx="onsets and df transforms, one audio file, default RDF writer destination"
+
+rm -f $outfile1
+
+$r -t $transformdir/onsets.n3 -t $transformdir/detectionfunction.n3 -w rdf $infile1 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_rdf $outfile1 "$ctx"
+
+
+ctx="onsets transform, two audio files, default RDF writer destination"
+
+rm -f $outfile1
+rm -f $outfile2
+
+$r -t $transformdir/onsets.n3 -w rdf $infile1 $infile2 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_rdf $outfile1 "$ctx"
+check_rdf $outfile2 "$ctx"
+
+
+ctx="onsets transform, two audio files, one-file RDF writer"
+
+$r -t $transformdir/onsets.n3 -w rdf --rdf-one-file $tmpttl $infile1 $infile2 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_rdf $tmpttl "$ctx"
+
+
+ctx="onsets transform, two audio files, stdout RDF writer"
+
+$r -t $transformdir/onsets.n3 -w rdf --rdf-stdout $infile1 $infile2 2>/dev/null >$tmpttl || \
+    fail "Fails to run with $ctx"
+
+check_rdf $tmpttl "$ctx"
+
+
+ctx="onsets transform, one audio file, many-files RDF writer"
+
+rm -f $outfile3
+
+$r -t $transformdir/onsets.n3 -w rdf --rdf-many-files $infile1 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_rdf $outfile3 "$ctx"
+
+
+ctx="onsets transform, two audio files, many-files RDF writer"
+
+rm -f $outfile3
+rm -f $outfile5
+
+$r -t $transformdir/onsets.n3 -w rdf --rdf-many-files $infile1 $infile2 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_rdf $outfile3 "$ctx"
+check_rdf $outfile5 "$ctx"
+
+
+ctx="onsets and df transforms, two audio files, many-files RDF writer"
+
+rm -f $outfile3
+rm -f $outfile4
+rm -f $outfile5
+rm -f $outfile6
+
+$r -t $transformdir/onsets.n3 -t $transformdir/detectionfunction.n3 -w rdf --rdf-many-files $infile1 $infile2 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_rdf $outfile3 "$ctx"
+check_rdf $outfile4 "$ctx"
+check_rdf $outfile5 "$ctx"
+check_rdf $outfile6 "$ctx"
+
+
+ctx="existing output file and no --rdf-force"
+
+touch $outfile1
+
+$r -t $transformdir/onsets.n3 -w rdf $infile1 2>/dev/null && \
+    fail "Fails by completing successfully when output file already exists (should refuse and bail out)"
+
+
+ctx="existing output file and --rdf-force"
+
+touch $outfile1
+
+$r -t $transformdir/onsets.n3 -w rdf --rdf-force $infile1 2>/dev/null || \
+    fail "Fails to run with $ctx"
+
+check_rdf $outfile1 "$ctx"
+
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rdf-destinations/transforms/detectionfunction.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,11 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction .
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rdf-destinations/transforms/onsets.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets.
+
+
+
--- a/tests/test-rdf-writer.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-#!/bin/bash
-
-mypath=`dirname $0`
-r=$mypath/../sonic-annotator
-
-infile=$mypath/audio/3clicks8.wav
-testplug=vamp:vamp-example-plugins:percussiononsets
-tmpttl=$mypath/tmp_1_$$.ttl
-
-trap "rm -f $tmpttl" 0
-
-fail() {
-    echo "Test failed: $1"
-    exit 1
-}
-
-transformpfx=$mypath/transforms/transforms-rdf-writer-percussiononsets
-
-for rdfarg in "" "--rdf-plain" ; do
-
-    note=""
-    [ -n "$rdfarg" ] && note=" with $rdfarg"
-
-    rm -f $tmpttl
-
-    $r -t $transformpfx-onsets.n3 -w rdf $infile $rdfarg --rdf-one-file $tmpttl 2>/dev/null || \
-	fail "Fails to run with onsets transform and RDF writer$note"
-
-    rapper -i turtle $tmpttl >/dev/null 2>&1 || \
-	fail "Fails to produce parseable RDF/TTL for onsets transform$note"
-
-    rapper -i turtle -c $tmpttl 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' ||
-	fail "RDF output contains no triples (?) for onsets transform$note"
-
-    rm -f $tmpttl
-    
-    $r -t $transformpfx-detectionfunction.n3 -w rdf $infile $rdfarg --rdf-one-file $tmpttl 2>/dev/null || \
-	fail "Fails to run with detectionfunction transform and RDF writer$note"
-
-    rapper -i turtle $tmpttl >/dev/null 2>&1 || \
-	fail "Fails to produce parseable RDF/TTL for detectionfunction transform$note"
-
-    rapper -i turtle -c $tmpttl 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' ||
-	fail "RDF output contains no triples (?) for detectionfunction transform$note"
-
-    rm -f $tmpttl
-
-    $r -t $transformpfx-onsets.n3 -t $transformpfx-detectionfunction.n3 -w rdf $infile $rdfarg --rdf-one-file $tmpttl 2>/dev/null || \
-	fail "Fails to run with detectionfunction and onsets transforms together and RDF writer$note"
-
-    rapper -i turtle $tmpttl >/dev/null 2>&1 || \
-	fail "Fails to produce parseable RDF/TTL for detectionfunction and onsets transforms together$note"
-
-    rapper -i turtle -c $tmpttl 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' ||
-	fail "RDF output contains no triples (?) for detectionfunction and onsets transforms together$note"
-
-done
-
-exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rdf-writer/test-rdf-writer.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+. ../include.sh
+
+infile=$audiopath/3clicks8.wav
+tmpttl=$mypath/tmp_1_$$.ttl
+
+trap "rm -f $tmpttl" 0
+
+transformdir=$mypath/transforms
+
+for rdfarg in "" "--rdf-plain" ; do
+
+    note=""
+    [ -n "$rdfarg" ] && note=" with $rdfarg"
+
+    rm -f $tmpttl
+
+    $r -t $transformdir/onsets.n3 -w rdf $infile $rdfarg --rdf-one-file $tmpttl 2>/dev/null || \
+	fail "Fails to run with onsets transform and RDF writer$note"
+
+    rapper -i turtle $tmpttl >/dev/null 2>&1 || \
+	fail "Fails to produce parseable RDF/TTL for onsets transform$note"
+
+    rapper -i turtle -c $tmpttl 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' ||
+	fail "RDF output contains no triples (?) for onsets transform$note"
+
+    rm -f $tmpttl
+    
+    $r -t $transformdir/detectionfunction.n3 -w rdf $infile $rdfarg --rdf-one-file $tmpttl 2>/dev/null || \
+	fail "Fails to run with detectionfunction transform and RDF writer$note"
+
+    rapper -i turtle $tmpttl >/dev/null 2>&1 || \
+	fail "Fails to produce parseable RDF/TTL for detectionfunction transform$note"
+
+    rapper -i turtle -c $tmpttl 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' ||
+	fail "RDF output contains no triples (?) for detectionfunction transform$note"
+
+    rm -f $tmpttl
+
+    $r -t $transformdir/onsets.n3 -t $transformdir/detectionfunction.n3 -w rdf $infile $rdfarg --rdf-one-file $tmpttl 2>/dev/null || \
+	fail "Fails to run with detectionfunction and onsets transforms together and RDF writer$note"
+
+    rapper -i turtle $tmpttl >/dev/null 2>&1 || \
+	fail "Fails to produce parseable RDF/TTL for detectionfunction and onsets transforms together$note"
+
+    rapper -i turtle -c $tmpttl 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' ||
+	fail "RDF output contains no triples (?) for detectionfunction and onsets transforms together$note"
+
+done
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rdf-writer/transforms/detectionfunction.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,11 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction .
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rdf-writer/transforms/onsets.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets.
+
+
+
--- a/tests/test-summaries.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-#!/bin/bash
-
-mypath=`dirname $0`
-r=$mypath/../sonic-annotator
-
-infile=$mypath/audio/3clicks8.wav
-tmpfile=$mypath/tmp_1_$$
-tmpcanonical=$mypath/tmp_2_$$
-expcanonical=$mypath/tmp_exp_2_$$
-tmpcmp1=$mypath/tmp_3_$$
-tmpcmp2=$mypath/tmp_4_$$
-
-trap "rm -f $tmpfile $tmpcanonical $expcanonical $tmpcmp1 $tmpcmp2" 0
-
-. test-include.sh
-
-faildiff() {
-    echo "Test failed: $1"
-    if [ -n "$2" -a -n "$3" ]; then
-	echo "Output follows:"
-	echo "--"
-	cat $2
-	echo "--"
-	echo "Expected output follows:"
-	echo "--"
-	cat $3
-	echo "--"
-	echo "Diff:"
-	echo "--"
-	sdiff -w78 $2 $3
-	echo "--"
-    fi
-    exit 1
-}
-
-compare() {
-    a=$1
-    b=$2
-    sort $a > $tmpcmp1
-    sort $b > $tmpcmp2
-    csvcompare $tmpcmp1 $tmpcmp2
-}
-
-# transform to which we have to add summarisation on command line
-transform=$mypath/transforms/transforms-nosummaries-percussiononsets-detectionfunction.n3 
-expected=$mypath/expected/transforms-summaries-percussiononsets
-
-stransform=$mypath/transforms/transforms-summaries-percussiononsets-detectionfunction.n3 
-sexpected=$mypath/expected/transforms-summaries-percussiononsets-from-rdf
-
-$r -t $transform -w csv --csv-stdout $infile > $tmpfile 2>/dev/null || \
-    fail "Fails to run transform $transform"
-
-compare $tmpfile ${expected}.csv || \
-    faildiff "Output mismatch for transform $transform" $tmpfile ${expected}.csv
-
-$r -t $transform -w csv --csv-stdout -S mean $infile > $tmpfile 2>/dev/null || \
-    fail "Fails to run transform $transform with summary type mean"
-
-compare $tmpfile ${expected}-with-mean.csv || \
-    faildiff "Output mismatch for transform $transform with summary type mean" $tmpfile ${expected}-with-mean.csv
-
-$r -t $transform -w csv --csv-stdout -S min -S max -S mean -S median -S mode -S sum -S variance -S sd -S count --summary-only $infile > $tmpfile 2>/dev/null || \
-    fail "Fails to run transform $transform with all summary types and summary-only"
-
-compare $tmpfile ${expected}-all-summaries-only.csv || \
-    faildiff "Output mismatch for transform $transform with all summary types and summary-only" $tmpfile ${expected}-all-summaries-only.csv
-
-$r -t $stransform -w csv --csv-stdout $infile > $tmpfile 2>/dev/null || \
-    fail "Fails to run transform $stransform with CSV output"
-
-compare $tmpfile ${sexpected}.csv || \
-    faildiff "Output mismatch for transform $stransform" $tmpfile ${sexpected}.csv
-
-$r -t $stransform -w rdf --rdf-stdout $infile > $tmpfile 2>/dev/null || \
-    fail "Fails to run transform $stransform with RDF output"
-
-rapper -i turtle $tmpfile -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $tmpcanonical ||
-    fail "Fails to produce parseable RDF/TTL for transform $stransform"
-
-rapper -i turtle ${sexpected}.n3 -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $expcanonical ||
-    fail "Internal error: Failed to canonicalise expected output file $expected.n3"
-
-compare $tmpcanonical $expcanonical || \
-    faildiff "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical $expcanonical
-
-exit 0
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries-all-files.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,24 @@
+"./../audio/20sec-silence.wav",0.000000000,20.062040815,mean,61.6562,"(mean value, continuous-time average)"
+,0.000000000,20.062040815,median,0,"(median value, continuous-time average)"
+,0.000000000,20.062040815,mode,0,"(modal value, continuous-time average)"
+,0.000000000,20.062040815,mean,895.898,"(mean value, continuous-time average)"
+"./../audio/3clicks.mp3",0.000000000,5.201269840,mean,164.674,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,169,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,680.411,"(mean value, continuous-time average)"
+"./../audio/3clicks.ogg",0.000000000,5.201269840,mean,162.694,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,169,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,174,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,697.732,"(mean value, continuous-time average)"
+"./../audio/3clicks8.wav",0.000000000,5.201269840,mean,162.585,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,168,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,677.241,"(mean value, continuous-time average)"
+"./../audio/6clicks.ogg",0.000000000,10.031020407,mean,166.612,"(mean value, continuous-time average)"
+,0.000000000,10.031020407,median,167,"(median value, continuous-time average)"
+,0.000000000,10.031020407,mode,170,"(modal value, continuous-time average)"
+,0.000000000,10.031020407,mean,713.148,"(mean value, continuous-time average)"
+"./../audio/6clicks8.wav",0.000000000,10.031020407,mean,169.079,"(mean value, continuous-time average)"
+,0.000000000,10.031020407,median,169,"(median value, continuous-time average)"
+,0.000000000,10.031020407,mode,164,"(modal value, continuous-time average)"
+,0.000000000,10.031020407,mean,695.759,"(mean value, continuous-time average)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries-all-summaries-only.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,9 @@
+"./../audio/3clicks8.wav",0.000000000,5.201269840,count,448,"(count)"
+,0.000000000,5.201269840,max,503,"(maximum value)"
+,0.000000000,5.201269840,mean,162.585,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,168,"(median value, continuous-time average)"
+,0.000000000,5.201269840,min,0,"(minimum value)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,sd,46.2356,"(standard deviation, continuous-time average)"
+,0.000000000,5.201269840,sum,72838,"(sum)"
+,0.000000000,5.201269840,variance,2137.73,"(variance, continuous-time average)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries-from-rdf-summaries-only.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,4 @@
+"./../audio/3clicks8.wav",0.000000000,5.201269840,mean,162.585,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,168,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,677.241,"(mean value, continuous-time average)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries-from-rdf.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,7 @@
+"./../audio/3clicks8.wav",0.777868481
+,1.648616780
+,2.414875283
+,0.000000000,5.201269840,mean,162.585,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,168,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,677.241,"(mean value, continuous-time average)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries-from-rdf.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,169 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix dc: <http://purl.org/dc/elements/1.1/> .
+@prefix mo: <http://purl.org/ontology/mo/> .
+@prefix af: <http://purl.org/ontology/af/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix event: <http://purl.org/NET/c4dm/event.owl#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix tl: <http://purl.org/NET/c4dm/timeline.owl#> .
+@prefix vamp: <http://purl.org/ontology/vamp/> .
+@prefix : <> .
+
+:transform_0_onsets
+    vamp:block_size "1024"^^xsd:int ;
+    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_onsets> ;
+    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
+    vamp:sample_rate "44100"^^xsd:float ;
+    vamp:step_size "512"^^xsd:int ;
+    a vamp:Transform .
+
+<file://example.wav>
+    mo:encodes :signal_1 ;
+    a mo:AudioFile .
+
+:signal_1
+    mo:time [
+        tl:onTimeLine :signal_timeline_1 ;
+        a tl:Interval
+    ] ;
+    a mo:Signal .
+
+:signal_timeline_1
+    a tl:Timeline .
+
+:event_2
+    event:time [
+        tl:at "PT0.777868481S"^^xsd:duration ;
+        tl:onTimeLine :signal_timeline_1 ;
+        a tl:Instant
+    ] ;
+    vamp:computed_by :transform_0_onsets ;
+    a af:Onset .
+
+:event_3
+    event:time [
+        tl:at "PT1.648616780S"^^xsd:duration ;
+        tl:onTimeLine :signal_timeline_1 ;
+        a tl:Instant
+    ] ;
+    vamp:computed_by :transform_0_onsets ;
+    a af:Onset .
+
+:event_4
+    event:time [
+        tl:at "PT2.414875283S"^^xsd:duration ;
+        tl:onTimeLine :signal_timeline_1 ;
+        a tl:Instant
+    ] ;
+    vamp:computed_by :transform_0_onsets ;
+    a af:Onset .
+
+:transform_5_detectionfunction
+    vamp:block_size "4096"^^xsd:int ;
+    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_detectionfunction> ;
+    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
+    vamp:sample_rate "44100"^^xsd:float ;
+    vamp:step_size "2048"^^xsd:int ;
+    vamp:summary_type "mean" ;
+    a vamp:Transform .
+
+:event_type_6
+    dc:description "Broadband energy rise detection function" ;
+    dc:format "" ;
+    dc:title "Detection Function" ;
+    rdfs:subClassOf event:Event .
+
+:event_7
+    event:time [
+        tl:beginsAt "PT0.000000000S"^^xsd:duration ;
+        tl:duration "PT5.201269840S"^^xsd:duration ;
+        tl:onTimeLine :signal_timeline_1 ;
+        a tl:Interval
+    ] ;
+    af:feature "677.241" ;
+    vamp:computed_by :transform_5_detectionfunction ;
+    a :event_type_6 ;
+    rdfs:label "(mean value, continuous-time average)" .
+
+:transform_8_detectionfunction
+    vamp:block_size "1024"^^xsd:int ;
+    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_detectionfunction> ;
+    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
+    vamp:sample_rate "44100"^^xsd:float ;
+    vamp:step_size "512"^^xsd:int ;
+    vamp:summary_type "mean" ;
+    a vamp:Transform .
+
+:event_type_9
+    dc:description "Broadband energy rise detection function" ;
+    dc:format "" ;
+    dc:title "Detection Function" ;
+    rdfs:subClassOf event:Event .
+
+:event_10
+    event:time [
+        tl:beginsAt "PT0.000000000S"^^xsd:duration ;
+        tl:duration "PT5.201269840S"^^xsd:duration ;
+        tl:onTimeLine :signal_timeline_1 ;
+        a tl:Interval
+    ] ;
+    af:feature "162.585" ;
+    vamp:computed_by :transform_8_detectionfunction ;
+    a :event_type_9 ;
+    rdfs:label "(mean value, continuous-time average)" .
+
+:transform_11_detectionfunction
+    vamp:block_size "1024"^^xsd:int ;
+    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_detectionfunction> ;
+    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
+    vamp:sample_rate "44100"^^xsd:float ;
+    vamp:step_size "512"^^xsd:int ;
+    vamp:summary_type "median" ;
+    a vamp:Transform .
+
+:event_type_12
+    dc:description "Broadband energy rise detection function" ;
+    dc:format "" ;
+    dc:title "Detection Function" ;
+    rdfs:subClassOf event:Event .
+
+:event_13
+    event:time [
+        tl:beginsAt "PT0.000000000S"^^xsd:duration ;
+        tl:duration "PT5.201269840S"^^xsd:duration ;
+        tl:onTimeLine :signal_timeline_1 ;
+        a tl:Interval
+    ] ;
+    af:feature "168" ;
+    vamp:computed_by :transform_11_detectionfunction ;
+    a :event_type_12 ;
+    rdfs:label "(median value, continuous-time average)" .
+
+:transform_14_detectionfunction
+    vamp:block_size "1024"^^xsd:int ;
+    vamp:output <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets_output_detectionfunction> ;
+    vamp:plugin <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#percussiononsets> ;
+    vamp:sample_rate "44100"^^xsd:float ;
+    vamp:step_size "512"^^xsd:int ;
+    vamp:summary_type "mode" ;
+    a vamp:Transform .
+
+:event_type_15
+    dc:description "Broadband energy rise detection function" ;
+    dc:format "" ;
+    dc:title "Detection Function" ;
+    rdfs:subClassOf event:Event .
+
+:event_16
+    event:time [
+        tl:beginsAt "PT0.000000000S"^^xsd:duration ;
+        tl:duration "PT5.201269840S"^^xsd:duration ;
+        tl:onTimeLine :signal_timeline_1 ;
+        a tl:Interval
+    ] ;
+    af:feature "0" ;
+    vamp:computed_by :transform_14_detectionfunction ;
+    a :event_type_15 ;
+    rdfs:label "(modal value, continuous-time average)" .
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries-playlist.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,8 @@
+"3clicks.mp3",0.000000000,5.201269840,mean,164.674,"(mean value, continuous-time average)"
+,0.000000000,5.201269840,median,169,"(median value, continuous-time average)"
+,0.000000000,5.201269840,mode,0,"(modal value, continuous-time average)"
+,0.000000000,5.201269840,mean,680.411,"(mean value, continuous-time average)"
+"6clicks.ogg",0.000000000,10.031020407,mean,166.612,"(mean value, continuous-time average)"
+,0.000000000,10.031020407,median,167,"(median value, continuous-time average)"
+,0.000000000,10.031020407,mode,170,"(modal value, continuous-time average)"
+,0.000000000,10.031020407,mean,713.148,"(mean value, continuous-time average)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries-segments.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,2 @@
+"./../audio/6clicks8.wav",0.000000000,9.900000000,median,169,"(median value, continuous-time average)"
+,9.900000000,0.131020407,median,75,"(median value, continuous-time average)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries-start-and-duration.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,1 @@
+"./../audio/3clicks8.wav"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries-with-mean.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,449 @@
+"./../audio/3clicks8.wav",0.000000000,0
+,0.011609977,207
+,0.023219954,170
+,0.034829931,184
+,0.046439909,166
+,0.058049886,174
+,0.069659863,179
+,0.081269841,162
+,0.092879818,157
+,0.104489795,156
+,0.116099773,182
+,0.127709750,168
+,0.139319727,168
+,0.150929705,155
+,0.162539682,200
+,0.174149659,163
+,0.185759637,178
+,0.197369614,164
+,0.208979591,166
+,0.220589569,137
+,0.232199546,155
+,0.243809523,177
+,0.255419501,145
+,0.267029478,172
+,0.278639455,155
+,0.290249433,201
+,0.301859410,166
+,0.313469387,169
+,0.325079365,158
+,0.336689342,169
+,0.348299319,155
+,0.359909297,187
+,0.371519274,177
+,0.383129251,149
+,0.394739229,196
+,0.406349206,160
+,0.417959183,174
+,0.429569160,165
+,0.441179138,149
+,0.452789115,181
+,0.464399092,180
+,0.476009070,156
+,0.487619047,163
+,0.499229024,188
+,0.510839002,173
+,0.522448979,160
+,0.534058956,168
+,0.545668934,154
+,0.557278911,155
+,0.568888888,161
+,0.580498866,163
+,0.592108843,172
+,0.603718820,168
+,0.615328798,181
+,0.626938775,167
+,0.638548752,172
+,0.650158730,158
+,0.661768707,172
+,0.673378684,167
+,0.684988662,180
+,0.696598639,188
+,0.708208616,160
+,0.719818594,166
+,0.731428571,158
+,0.743038548,176
+,0.754648526,153
+,0.766258503,173
+,0.777868480,449
+,0.789478458,30
+,0.801088435,70
+,0.812698412,181
+,0.824308390,165
+,0.835918367,174
+,0.847528344,181
+,0.859138321,179
+,0.870748299,154
+,0.882358276,169
+,0.893968253,150
+,0.905578231,189
+,0.917188208,159
+,0.928798185,172
+,0.940408163,157
+,0.952018140,167
+,0.963628117,169
+,0.975238095,155
+,0.986848072,189
+,0.998458049,178
+,1.010068027,168
+,1.021678004,169
+,1.033287981,178
+,1.044897959,157
+,1.056507936,166
+,1.068117913,162
+,1.079727891,170
+,1.091337868,186
+,1.102947845,178
+,1.114557823,178
+,1.126167800,155
+,1.137777777,173
+,1.149387755,156
+,1.160997732,158
+,1.172607709,170
+,1.184217687,167
+,1.195827664,160
+,1.207437641,180
+,1.219047619,153
+,1.230657596,154
+,1.242267573,171
+,1.253877551,159
+,1.265487528,194
+,1.277097505,170
+,1.288707482,157
+,1.300317460,184
+,1.311927437,156
+,1.323537414,173
+,1.335147392,184
+,1.346757369,168
+,1.358367346,182
+,1.369977324,147
+,1.381587301,164
+,1.393197278,163
+,1.404807256,165
+,1.416417233,181
+,1.428027210,172
+,1.439637188,169
+,1.451247165,165
+,1.462857142,166
+,1.474467120,158
+,1.486077097,162
+,1.497687074,188
+,1.509297052,176
+,1.520907029,176
+,1.532517006,159
+,1.544126984,183
+,1.555736961,178
+,1.567346938,168
+,1.578956916,171
+,1.590566893,158
+,1.602176870,153
+,1.613786848,189
+,1.625396825,171
+,1.637006802,142
+,1.648616780,503
+,1.660226757,0
+,1.671836734,30
+,1.683446712,189
+,1.695056689,146
+,1.706666666,174
+,1.718276643,171
+,1.729886621,169
+,1.741496598,164
+,1.753106575,181
+,1.764716553,180
+,1.776326530,163
+,1.787936507,174
+,1.799546485,135
+,1.811156462,193
+,1.822766439,187
+,1.834376417,176
+,1.845986394,172
+,1.857596371,155
+,1.869206349,185
+,1.880816326,167
+,1.892426303,173
+,1.904036281,162
+,1.915646258,166
+,1.927256235,167
+,1.938866213,179
+,1.950476190,170
+,1.962086167,158
+,1.973696145,168
+,1.985306122,162
+,1.996916099,182
+,2.008526077,167
+,2.020136054,185
+,2.031746031,165
+,2.043356009,184
+,2.054965986,157
+,2.066575963,167
+,2.078185941,164
+,2.089795918,160
+,2.101405895,181
+,2.113015873,165
+,2.124625850,181
+,2.136235827,161
+,2.147845804,176
+,2.159455782,177
+,2.171065759,150
+,2.182675736,185
+,2.194285714,173
+,2.205895691,162
+,2.217505668,169
+,2.229115646,171
+,2.240725623,140
+,2.252335600,196
+,2.263945578,155
+,2.275555555,171
+,2.287165532,186
+,2.298775510,157
+,2.310385487,166
+,2.321995464,169
+,2.333605442,183
+,2.345215419,186
+,2.356825396,138
+,2.368435374,162
+,2.380045351,180
+,2.391655328,165
+,2.403265306,181
+,2.414875283,444
+,2.426485260,27
+,2.438095238,150
+,2.449705215,166
+,2.461315192,177
+,2.472925170,174
+,2.484535147,165
+,2.496145124,158
+,2.507755102,178
+,2.519365079,177
+,2.530975056,172
+,2.542585034,174
+,2.554195011,168
+,2.565804988,165
+,2.577414965,168
+,2.589024943,149
+,2.600634920,171
+,2.612244897,164
+,2.623854875,163
+,2.635464852,182
+,2.647074829,162
+,2.658684807,156
+,2.670294784,173
+,2.681904761,188
+,2.693514739,166
+,2.705124716,157
+,2.716734693,170
+,2.728344671,167
+,2.739954648,191
+,2.751564625,154
+,2.763174603,175
+,2.774784580,157
+,2.786394557,169
+,2.798004535,160
+,2.809614512,163
+,2.821224489,191
+,2.832834467,158
+,2.844444444,184
+,2.856054421,164
+,2.867664399,176
+,2.879274376,182
+,2.890884353,180
+,2.902494331,138
+,2.914104308,170
+,2.925714285,172
+,2.937324263,172
+,2.948934240,168
+,2.960544217,186
+,2.972154195,171
+,2.983764172,154
+,2.995374149,185
+,3.006984126,172
+,3.018594104,164
+,3.030204081,176
+,3.041814058,195
+,3.053424036,160
+,3.065034013,124
+,3.076643990,181
+,3.088253968,170
+,3.099863945,178
+,3.111473922,165
+,3.123083900,164
+,3.134693877,194
+,3.146303854,157
+,3.157913832,205
+,3.169523809,163
+,3.181133786,159
+,3.192743764,184
+,3.204353741,145
+,3.215963718,170
+,3.227573696,155
+,3.239183673,161
+,3.250793650,164
+,3.262403628,184
+,3.274013605,175
+,3.285623582,155
+,3.297233560,164
+,3.308843537,181
+,3.320453514,182
+,3.332063492,145
+,3.343673469,177
+,3.355283446,162
+,3.366893424,153
+,3.378503401,185
+,3.390113378,174
+,3.401723356,167
+,3.413333333,187
+,3.424943310,157
+,3.436553287,170
+,3.448163265,169
+,3.459773242,166
+,3.471383219,171
+,3.482993197,165
+,3.494603174,158
+,3.506213151,181
+,3.517823129,168
+,3.529433106,175
+,3.541043083,162
+,3.552653061,167
+,3.564263038,179
+,3.575873015,167
+,3.587482993,156
+,3.599092970,209
+,3.610702947,179
+,3.622312925,159
+,3.633922902,180
+,3.645532879,152
+,3.657142857,169
+,3.668752834,189
+,3.680362811,170
+,3.691972789,156
+,3.703582766,165
+,3.715192743,179
+,3.726802721,173
+,3.738412698,163
+,3.750022675,170
+,3.761632653,181
+,3.773242630,177
+,3.784852607,181
+,3.796462585,166
+,3.808072562,153
+,3.819682539,164
+,3.831292517,209
+,3.842902494,159
+,3.854512471,194
+,3.866122448,164
+,3.877732426,184
+,3.889342403,163
+,3.900952380,173
+,3.912562358,165
+,3.924172335,164
+,3.935782312,182
+,3.947392290,170
+,3.959002267,160
+,3.970612244,173
+,3.982222222,160
+,3.993832199,174
+,4.005442176,179
+,4.017052154,179
+,4.028662131,145
+,4.040272108,196
+,4.051882086,155
+,4.063492063,170
+,4.075102040,180
+,4.086712018,156
+,4.098321995,159
+,4.109931972,182
+,4.121541950,175
+,4.133151927,173
+,4.144761904,164
+,4.156371882,186
+,4.167981859,160
+,4.179591836,175
+,4.191201814,178
+,4.202811791,159
+,4.214421768,177
+,4.226031746,181
+,4.237641723,177
+,4.249251700,163
+,4.260861678,158
+,4.272471655,188
+,4.284081632,163
+,4.295691609,158
+,4.307301587,164
+,4.318911564,164
+,4.330521541,183
+,4.342131519,160
+,4.353741496,182
+,4.365351473,172
+,4.376961451,172
+,4.388571428,179
+,4.400181405,154
+,4.411791383,166
+,4.423401360,174
+,4.435011337,156
+,4.446621315,174
+,4.458231292,169
+,4.469841269,169
+,4.481451247,178
+,4.493061224,175
+,4.504671201,193
+,4.516281179,153
+,4.527891156,160
+,4.539501133,176
+,4.551111111,167
+,4.562721088,184
+,4.574331065,163
+,4.585941043,150
+,4.597551020,156
+,4.609160997,182
+,4.620770975,168
+,4.632380952,168
+,4.643990929,152
+,4.655600907,174
+,4.667210884,186
+,4.678820861,168
+,4.690430839,173
+,4.702040816,184
+,4.713650793,169
+,4.725260770,166
+,4.736870748,164
+,4.748480725,193
+,4.760090702,155
+,4.771700680,164
+,4.783310657,181
+,4.794920634,142
+,4.806530612,183
+,4.818140589,181
+,4.829750566,185
+,4.841360544,171
+,4.852970521,184
+,4.864580498,156
+,4.876190476,162
+,4.887800453,182
+,4.899410430,161
+,4.911020408,175
+,4.922630385,168
+,4.934240362,172
+,4.945850340,151
+,4.957460317,176
+,4.969070294,171
+,4.980680272,93
+,4.992290249,0
+,5.003900226,0
+,5.015510204,0
+,5.027120181,0
+,5.038730158,0
+,5.050340136,0
+,5.061950113,0
+,5.073560090,0
+,5.085170068,0
+,5.096780045,0
+,5.108390022,0
+,5.120000000,0
+,5.131609977,0
+,5.143219954,0
+,5.154829931,0
+,5.166439909,0
+,5.178049886,0
+,5.189659863,0
+,0.000000000,5.201269840,mean,162.585,"(mean value, continuous-time average)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/expected/summaries.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,448 @@
+"./../audio/3clicks8.wav",0.000000000,0
+,0.011609977,207
+,0.023219954,170
+,0.034829931,184
+,0.046439909,166
+,0.058049886,174
+,0.069659863,179
+,0.081269841,162
+,0.092879818,157
+,0.104489795,156
+,0.116099773,182
+,0.127709750,168
+,0.139319727,168
+,0.150929705,155
+,0.162539682,200
+,0.174149659,163
+,0.185759637,178
+,0.197369614,164
+,0.208979591,166
+,0.220589569,137
+,0.232199546,155
+,0.243809523,177
+,0.255419501,145
+,0.267029478,172
+,0.278639455,155
+,0.290249433,201
+,0.301859410,166
+,0.313469387,169
+,0.325079365,158
+,0.336689342,169
+,0.348299319,155
+,0.359909297,187
+,0.371519274,177
+,0.383129251,149
+,0.394739229,196
+,0.406349206,160
+,0.417959183,174
+,0.429569160,165
+,0.441179138,149
+,0.452789115,181
+,0.464399092,180
+,0.476009070,156
+,0.487619047,163
+,0.499229024,188
+,0.510839002,173
+,0.522448979,160
+,0.534058956,168
+,0.545668934,154
+,0.557278911,155
+,0.568888888,161
+,0.580498866,163
+,0.592108843,172
+,0.603718820,168
+,0.615328798,181
+,0.626938775,167
+,0.638548752,172
+,0.650158730,158
+,0.661768707,172
+,0.673378684,167
+,0.684988662,180
+,0.696598639,188
+,0.708208616,160
+,0.719818594,166
+,0.731428571,158
+,0.743038548,176
+,0.754648526,153
+,0.766258503,173
+,0.777868480,449
+,0.789478458,30
+,0.801088435,70
+,0.812698412,181
+,0.824308390,165
+,0.835918367,174
+,0.847528344,181
+,0.859138321,179
+,0.870748299,154
+,0.882358276,169
+,0.893968253,150
+,0.905578231,189
+,0.917188208,159
+,0.928798185,172
+,0.940408163,157
+,0.952018140,167
+,0.963628117,169
+,0.975238095,155
+,0.986848072,189
+,0.998458049,178
+,1.010068027,168
+,1.021678004,169
+,1.033287981,178
+,1.044897959,157
+,1.056507936,166
+,1.068117913,162
+,1.079727891,170
+,1.091337868,186
+,1.102947845,178
+,1.114557823,178
+,1.126167800,155
+,1.137777777,173
+,1.149387755,156
+,1.160997732,158
+,1.172607709,170
+,1.184217687,167
+,1.195827664,160
+,1.207437641,180
+,1.219047619,153
+,1.230657596,154
+,1.242267573,171
+,1.253877551,159
+,1.265487528,194
+,1.277097505,170
+,1.288707482,157
+,1.300317460,184
+,1.311927437,156
+,1.323537414,173
+,1.335147392,184
+,1.346757369,168
+,1.358367346,182
+,1.369977324,147
+,1.381587301,164
+,1.393197278,163
+,1.404807256,165
+,1.416417233,181
+,1.428027210,172
+,1.439637188,169
+,1.451247165,165
+,1.462857142,166
+,1.474467120,158
+,1.486077097,162
+,1.497687074,188
+,1.509297052,176
+,1.520907029,176
+,1.532517006,159
+,1.544126984,183
+,1.555736961,178
+,1.567346938,168
+,1.578956916,171
+,1.590566893,158
+,1.602176870,153
+,1.613786848,189
+,1.625396825,171
+,1.637006802,142
+,1.648616780,503
+,1.660226757,0
+,1.671836734,30
+,1.683446712,189
+,1.695056689,146
+,1.706666666,174
+,1.718276643,171
+,1.729886621,169
+,1.741496598,164
+,1.753106575,181
+,1.764716553,180
+,1.776326530,163
+,1.787936507,174
+,1.799546485,135
+,1.811156462,193
+,1.822766439,187
+,1.834376417,176
+,1.845986394,172
+,1.857596371,155
+,1.869206349,185
+,1.880816326,167
+,1.892426303,173
+,1.904036281,162
+,1.915646258,166
+,1.927256235,167
+,1.938866213,179
+,1.950476190,170
+,1.962086167,158
+,1.973696145,168
+,1.985306122,162
+,1.996916099,182
+,2.008526077,167
+,2.020136054,185
+,2.031746031,165
+,2.043356009,184
+,2.054965986,157
+,2.066575963,167
+,2.078185941,164
+,2.089795918,160
+,2.101405895,181
+,2.113015873,165
+,2.124625850,181
+,2.136235827,161
+,2.147845804,176
+,2.159455782,177
+,2.171065759,150
+,2.182675736,185
+,2.194285714,173
+,2.205895691,162
+,2.217505668,169
+,2.229115646,171
+,2.240725623,140
+,2.252335600,196
+,2.263945578,155
+,2.275555555,171
+,2.287165532,186
+,2.298775510,157
+,2.310385487,166
+,2.321995464,169
+,2.333605442,183
+,2.345215419,186
+,2.356825396,138
+,2.368435374,162
+,2.380045351,180
+,2.391655328,165
+,2.403265306,181
+,2.414875283,444
+,2.426485260,27
+,2.438095238,150
+,2.449705215,166
+,2.461315192,177
+,2.472925170,174
+,2.484535147,165
+,2.496145124,158
+,2.507755102,178
+,2.519365079,177
+,2.530975056,172
+,2.542585034,174
+,2.554195011,168
+,2.565804988,165
+,2.577414965,168
+,2.589024943,149
+,2.600634920,171
+,2.612244897,164
+,2.623854875,163
+,2.635464852,182
+,2.647074829,162
+,2.658684807,156
+,2.670294784,173
+,2.681904761,188
+,2.693514739,166
+,2.705124716,157
+,2.716734693,170
+,2.728344671,167
+,2.739954648,191
+,2.751564625,154
+,2.763174603,175
+,2.774784580,157
+,2.786394557,169
+,2.798004535,160
+,2.809614512,163
+,2.821224489,191
+,2.832834467,158
+,2.844444444,184
+,2.856054421,164
+,2.867664399,176
+,2.879274376,182
+,2.890884353,180
+,2.902494331,138
+,2.914104308,170
+,2.925714285,172
+,2.937324263,172
+,2.948934240,168
+,2.960544217,186
+,2.972154195,171
+,2.983764172,154
+,2.995374149,185
+,3.006984126,172
+,3.018594104,164
+,3.030204081,176
+,3.041814058,195
+,3.053424036,160
+,3.065034013,124
+,3.076643990,181
+,3.088253968,170
+,3.099863945,178
+,3.111473922,165
+,3.123083900,164
+,3.134693877,194
+,3.146303854,157
+,3.157913832,205
+,3.169523809,163
+,3.181133786,159
+,3.192743764,184
+,3.204353741,145
+,3.215963718,170
+,3.227573696,155
+,3.239183673,161
+,3.250793650,164
+,3.262403628,184
+,3.274013605,175
+,3.285623582,155
+,3.297233560,164
+,3.308843537,181
+,3.320453514,182
+,3.332063492,145
+,3.343673469,177
+,3.355283446,162
+,3.366893424,153
+,3.378503401,185
+,3.390113378,174
+,3.401723356,167
+,3.413333333,187
+,3.424943310,157
+,3.436553287,170
+,3.448163265,169
+,3.459773242,166
+,3.471383219,171
+,3.482993197,165
+,3.494603174,158
+,3.506213151,181
+,3.517823129,168
+,3.529433106,175
+,3.541043083,162
+,3.552653061,167
+,3.564263038,179
+,3.575873015,167
+,3.587482993,156
+,3.599092970,209
+,3.610702947,179
+,3.622312925,159
+,3.633922902,180
+,3.645532879,152
+,3.657142857,169
+,3.668752834,189
+,3.680362811,170
+,3.691972789,156
+,3.703582766,165
+,3.715192743,179
+,3.726802721,173
+,3.738412698,163
+,3.750022675,170
+,3.761632653,181
+,3.773242630,177
+,3.784852607,181
+,3.796462585,166
+,3.808072562,153
+,3.819682539,164
+,3.831292517,209
+,3.842902494,159
+,3.854512471,194
+,3.866122448,164
+,3.877732426,184
+,3.889342403,163
+,3.900952380,173
+,3.912562358,165
+,3.924172335,164
+,3.935782312,182
+,3.947392290,170
+,3.959002267,160
+,3.970612244,173
+,3.982222222,160
+,3.993832199,174
+,4.005442176,179
+,4.017052154,179
+,4.028662131,145
+,4.040272108,196
+,4.051882086,155
+,4.063492063,170
+,4.075102040,180
+,4.086712018,156
+,4.098321995,159
+,4.109931972,182
+,4.121541950,175
+,4.133151927,173
+,4.144761904,164
+,4.156371882,186
+,4.167981859,160
+,4.179591836,175
+,4.191201814,178
+,4.202811791,159
+,4.214421768,177
+,4.226031746,181
+,4.237641723,177
+,4.249251700,163
+,4.260861678,158
+,4.272471655,188
+,4.284081632,163
+,4.295691609,158
+,4.307301587,164
+,4.318911564,164
+,4.330521541,183
+,4.342131519,160
+,4.353741496,182
+,4.365351473,172
+,4.376961451,172
+,4.388571428,179
+,4.400181405,154
+,4.411791383,166
+,4.423401360,174
+,4.435011337,156
+,4.446621315,174
+,4.458231292,169
+,4.469841269,169
+,4.481451247,178
+,4.493061224,175
+,4.504671201,193
+,4.516281179,153
+,4.527891156,160
+,4.539501133,176
+,4.551111111,167
+,4.562721088,184
+,4.574331065,163
+,4.585941043,150
+,4.597551020,156
+,4.609160997,182
+,4.620770975,168
+,4.632380952,168
+,4.643990929,152
+,4.655600907,174
+,4.667210884,186
+,4.678820861,168
+,4.690430839,173
+,4.702040816,184
+,4.713650793,169
+,4.725260770,166
+,4.736870748,164
+,4.748480725,193
+,4.760090702,155
+,4.771700680,164
+,4.783310657,181
+,4.794920634,142
+,4.806530612,183
+,4.818140589,181
+,4.829750566,185
+,4.841360544,171
+,4.852970521,184
+,4.864580498,156
+,4.876190476,162
+,4.887800453,182
+,4.899410430,161
+,4.911020408,175
+,4.922630385,168
+,4.934240362,172
+,4.945850340,151
+,4.957460317,176
+,4.969070294,171
+,4.980680272,93
+,4.992290249,0
+,5.003900226,0
+,5.015510204,0
+,5.027120181,0
+,5.038730158,0
+,5.050340136,0
+,5.061950113,0
+,5.073560090,0
+,5.085170068,0
+,5.096780045,0
+,5.108390022,0
+,5.120000000,0
+,5.131609977,0
+,5.143219954,0
+,5.154829931,0
+,5.166439909,0
+,5.178049886,0
+,5.189659863,0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/test-summaries.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+. ../include.sh
+
+infile=$audiopath/3clicks8.wav
+infile2=$audiopath/6clicks8.wav
+tmpfile=$mypath/tmp_1_$$
+tmpcanonical=$mypath/tmp_2_$$
+expcanonical=$mypath/tmp_exp_2_$$
+tmpcmp1=$mypath/tmp_3_$$
+tmpcmp2=$mypath/tmp_4_$$
+
+trap "rm -f $tmpfile $tmpcanonical $expcanonical $tmpcmp1 $tmpcmp2" 0
+
+compare() {
+    a=$1
+    b=$2
+    sort $a > $tmpcmp1
+    sort $b > $tmpcmp2
+    csvcompare $tmpcmp1 $tmpcmp2
+}
+
+# transform to which we have to add summarisation on command line
+transform=$mypath/transforms/detectionfunction-nosummaries.n3 
+expected=$mypath/expected/summaries
+
+stransform=$mypath/transforms/detectionfunction.n3 
+sexpected=$mypath/expected/summaries-from-rdf
+
+$r -t $transform -w csv --csv-stdout $infile > $tmpfile 2>/dev/null || \
+    fail "Fails to run transform $transform"
+
+compare $tmpfile ${expected}.csv || \
+    faildiff "Output mismatch for transform $transform" $tmpfile ${expected}.csv
+
+$r -t $transform -w csv --csv-stdout -S mean $infile > $tmpfile 2>/dev/null || \
+    fail "Fails to run transform $transform with summary type mean"
+
+compare $tmpfile ${expected}-with-mean.csv || \
+    faildiff "Output mismatch for transform $transform with summary type mean" $tmpfile ${expected}-with-mean.csv
+
+$r -t $transform -w csv --csv-stdout -S min -S max -S mean -S median -S mode -S sum -S variance -S sd -S count --summary-only $infile > $tmpfile 2>/dev/null || \
+    fail "Fails to run transform $transform with all summary types and summary-only"
+
+compare $tmpfile ${expected}-all-summaries-only.csv || \
+    faildiff "Output mismatch for transform $transform with all summary types and summary-only" $tmpfile ${expected}-all-summaries-only.csv
+
+$r -t $stransform -w csv --csv-stdout $infile > $tmpfile 2>/dev/null || \
+    fail "Fails to run transform $stransform with CSV output"
+
+compare $tmpfile ${sexpected}.csv || \
+    faildiff "Output mismatch for transform $stransform" $tmpfile ${sexpected}.csv
+
+$r -t $stransform -w csv --csv-stdout --summary-only $infile > $tmpfile 2>/dev/null || \
+    fail "Fails to run transform $stransform with CSV output and summary-only"
+
+compare $tmpfile ${expected}-from-rdf-summaries-only.csv || \
+    faildiff "Output mismatch for transform $stransform with summary-only" $tmpfile ${expected}-from-rdf-summaries-only.csv
+
+$r -t $transform -w csv --csv-stdout --summary-only -S median --segments 0,9.9 $infile2 > $tmpfile 2>/dev/null || \
+    fail "Fails to run transform $stransform with CSV output and segments"
+
+compare $tmpfile ${expected}-segments.csv || \
+    faildiff "Output mismatch for transform $stransform with segments" $tmpfile ${expected}-segments.csv
+
+$r -t $stransform -w rdf --rdf-stdout $infile > $tmpfile 2>/dev/null || \
+    fail "Fails to run transform $stransform with RDF output"
+
+rapper -i turtle $tmpfile -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $tmpcanonical ||
+    fail "Fails to produce parseable RDF/TTL for transform $stransform"
+
+rapper -i turtle ${sexpected}.n3 -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $expcanonical ||
+    fail "Internal error: Failed to canonicalise expected output file $expected.n3"
+
+compare $tmpcanonical $expcanonical || \
+    faildiff "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical $expcanonical
+
+exit 0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/transforms/detectionfunction-nosummaries.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,9 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction .
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-summaries/transforms/detectionfunction.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,32 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:summary_type "mean" .
+
+:transform1 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:summary_type "median" .
+
+:transform2 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets .
+
+:transform3 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:summary_type "mode" .
+
+:transform4 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:step_size 2048 ;
+	vamp:block_size 4096 ;
+	vamp:summary_type "mean" .
+
+ 
--- a/tests/test-supportprogs.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-fail() {
-    echo "Test failed: $1"
-    exit 1
-}
-
-xmllint --version 2>/dev/null || \
-    fail "Can't find required xmllint program"
-
-rapper --version >/dev/null || \
-    fail "Can't find required rapper program"
-
-exit 0
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-supportprogs/test-supportprogs.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+fail() {
+    echo "Test failed: $1"
+    exit 1
+}
+
+xmllint --version 2>/dev/null || \
+    fail "Can't find required xmllint program"
+
+rapper --version >/dev/null || \
+    fail "Can't find required rapper program"
+
+exit 0
+
--- a/tests/test-transforms-basic.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-#!/bin/bash
-
-mypath=`dirname $0`
-r=$mypath/../sonic-annotator
-
-infile=$mypath/audio/3clicks8.wav
-testplug=vamp:vamp-example-plugins:percussiononsets
-tmpfile1=$mypath/tmp_1_$$
-tmpfile2=$mypath/tmp_2_$$
-
-trap "rm -f $tmpfile1 $tmpfile2" 0
-
-. test-include.sh
-
-$r --skeleton $testplug > $tmpfile1 2>/dev/null || \
-    fail "Fails to run with --skeleton $testplug"
-
-$r -t $tmpfile1 -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
-    fail "Fails to run with -t $tmpfile -w csv --csv-stdout $infile"
-
-csvcompare $tmpfile2 $mypath/expected/transforms-basic-skeleton-1.csv || \
-    fail "Output mismatch for transforms-basic-skeleton-1.csv"
-
-for suffix in \
-    -no-parameters-default-output \
-    -no-parameters \
-    "" \
-    -set-parameters \
-    -set-step-and-block-size \
-    -set-sample-rate \
-    -df-windowtype-default \
-    -df-windowtype-hanning \
-    -df-windowtype-hamming \
-    -multiple-outputs \
-    ; do
-
-    for type in xml n3 ; do 
-
-	transform=$mypath/transforms/transforms-basic-percussiononsets$suffix.$type
-	expected=$mypath/expected/transforms-basic-percussiononsets$suffix.csv
-
-	if [ ! -f $transform ]; then
-	    if [ $type = "xml" ]; then
-		continue # not everything can be expressed in the XML
-			 # format, e.g. the multiple output test can't
-	    fi
-	fi
-
-	test -f $transform || \
-	    fail "Internal error: no transforms file for suffix $suffix (looking for $transform)"
-
-	test -f $expected || \
-	    fail "Internal error: no expected output file for suffix $suffix (looking for $expected)"
-
-	$r -t $transform -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
-	    fail "Fails to run transform $transform"
-
-	csvcompare $tmpfile2 $expected || \
-	    fail "Output mismatch for transform $transform"
-    done
-done
-
-exit 0
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/multiple.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,18 @@
+"./../audio/3clicks8.wav",0.011609977
+,0.162539682
+,0.290249433
+,0.394739229
+,0.777868481
+,0.782312925
+,1.648616780
+,1.650680272
+,2.414875283
+,2.417346939
+,2.414875283
+,3.041814059
+,3.134693877
+,3.157913832
+,3.599092970
+,3.831292517
+,4.504671202
+,4.748480725
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-df-start-and-duration.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,192 @@
+"./../audio/3clicks8.wav",2.000000000,0
+,2.011609977,227
+,2.023219954,180
+,2.034829931,163
+,2.046439909,188
+,2.058049886,156
+,2.069659863,177
+,2.081269841,162
+,2.092879818,187
+,2.104489795,175
+,2.116099773,183
+,2.127709750,177
+,2.139319727,159
+,2.150929705,176
+,2.162539682,170
+,2.174149659,146
+,2.185759637,181
+,2.197369614,170
+,2.208979591,165
+,2.220589569,184
+,2.232199546,170
+,2.243809523,160
+,2.255419501,167
+,2.267029478,183
+,2.278639455,170
+,2.290249433,174
+,2.301859410,159
+,2.313469387,165
+,2.325079365,163
+,2.336689342,185
+,2.348299319,180
+,2.359909297,153
+,2.371519274,159
+,2.383129251,159
+,2.394739229,181
+,2.406349206,386
+,2.417959183,432
+,2.429569160,37
+,2.441179138,170
+,2.452789115,166
+,2.464399092,183
+,2.476009070,161
+,2.487619047,157
+,2.499229024,142
+,2.510839002,177
+,2.522448979,184
+,2.534058956,165
+,2.545668934,177
+,2.557278911,178
+,2.568888888,197
+,2.580498866,172
+,2.592108843,159
+,2.603718820,173
+,2.615328798,145
+,2.626938775,183
+,2.638548752,184
+,2.650158730,157
+,2.661768707,170
+,2.673378684,160
+,2.684988662,178
+,2.696598639,168
+,2.708208616,163
+,2.719818594,166
+,2.731428571,182
+,2.743038548,179
+,2.754648526,168
+,2.766258503,172
+,2.777868480,151
+,2.789478458,180
+,2.801088435,158
+,2.812698412,174
+,2.824308390,184
+,2.835918367,161
+,2.847528344,190
+,2.859138321,161
+,2.870748299,174
+,2.882358276,162
+,2.893968253,183
+,2.905578231,151
+,2.917188208,186
+,2.928798185,162
+,2.940408163,176
+,2.952018140,173
+,2.963628117,159
+,2.975238095,193
+,2.986848072,147
+,2.998458049,189
+,3.010068027,165
+,3.021678004,161
+,3.033287981,169
+,3.044897959,183
+,3.056507936,163
+,3.068117913,149
+,3.079727891,181
+,3.091337868,158
+,3.102947845,179
+,3.114557823,178
+,3.126167800,160
+,3.137777777,205
+,3.149387755,145
+,3.160997732,201
+,3.172607709,159
+,3.184217687,144
+,3.195827664,194
+,3.207437641,168
+,3.219047619,150
+,3.230657596,149
+,3.242267573,183
+,3.253877551,173
+,3.265487528,179
+,3.277097505,176
+,3.288707482,157
+,3.300317460,157
+,3.311927437,194
+,3.323537414,167
+,3.335147392,150
+,3.346757369,183
+,3.358367346,169
+,3.369977324,142
+,3.381587301,191
+,3.393197278,178
+,3.404807256,168
+,3.416417233,190
+,3.428027210,156
+,3.439637188,167
+,3.451247165,166
+,3.462857142,158
+,3.474467120,161
+,3.486077097,170
+,3.497687074,162
+,3.509297052,164
+,3.520907029,177
+,3.532517006,156
+,3.544126984,173
+,3.555736961,168
+,3.567346938,162
+,3.578956916,151
+,3.590566893,164
+,3.602176870,186
+,3.613786848,180
+,3.625396825,156
+,3.637006802,183
+,3.648616780,165
+,3.660226757,154
+,3.671836734,178
+,3.683446712,164
+,3.695056689,167
+,3.706666666,178
+,3.718276643,166
+,3.729886621,164
+,3.741496598,180
+,3.753106575,186
+,3.764716553,174
+,3.776326530,166
+,3.787936507,198
+,3.799546485,171
+,3.811156462,144
+,3.822766439,169
+,3.834376417,180
+,3.845986394,168
+,3.857596371,181
+,3.869206349,171
+,3.880816326,188
+,3.892426303,169
+,3.904036281,165
+,3.915646258,152
+,3.927256235,165
+,3.938866213,185
+,3.950476190,158
+,3.962086167,168
+,3.973696145,163
+,3.985306122,144
+,3.996916099,173
+,4.008526077,174
+,4.020136054,167
+,4.031746031,159
+,4.043356009,164
+,4.054965986,162
+,4.066575963,178
+,4.078185941,187
+,4.089795918,145
+,4.101405895,159
+,4.113015873,162
+,4.124625850,181
+,4.136235827,167
+,4.147845804,158
+,4.159455782,173
+,4.171065759,169
+,4.182675736,158
+,4.194285714,194
+,4.205895691,157
+,4.217505668,166
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-df-windowtype-default.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,448 @@
+"./../audio/3clicks8.wav",0.000000000,0
+,0.011609977,207
+,0.023219954,170
+,0.034829931,184
+,0.046439909,166
+,0.058049886,174
+,0.069659863,179
+,0.081269841,162
+,0.092879818,157
+,0.104489795,156
+,0.116099773,182
+,0.127709750,168
+,0.139319727,168
+,0.150929705,155
+,0.162539682,200
+,0.174149659,163
+,0.185759637,178
+,0.197369614,164
+,0.208979591,166
+,0.220589569,137
+,0.232199546,155
+,0.243809523,177
+,0.255419501,145
+,0.267029478,172
+,0.278639455,155
+,0.290249433,201
+,0.301859410,166
+,0.313469387,169
+,0.325079365,158
+,0.336689342,169
+,0.348299319,155
+,0.359909297,187
+,0.371519274,177
+,0.383129251,149
+,0.394739229,196
+,0.406349206,160
+,0.417959183,174
+,0.429569160,165
+,0.441179138,149
+,0.452789115,181
+,0.464399092,180
+,0.476009070,156
+,0.487619047,163
+,0.499229024,188
+,0.510839002,173
+,0.522448979,160
+,0.534058956,168
+,0.545668934,154
+,0.557278911,155
+,0.568888888,161
+,0.580498866,163
+,0.592108843,172
+,0.603718820,168
+,0.615328798,181
+,0.626938775,167
+,0.638548752,172
+,0.650158730,158
+,0.661768707,172
+,0.673378684,167
+,0.684988662,180
+,0.696598639,188
+,0.708208616,160
+,0.719818594,166
+,0.731428571,158
+,0.743038548,176
+,0.754648526,153
+,0.766258503,173
+,0.777868480,449
+,0.789478458,30
+,0.801088435,70
+,0.812698412,181
+,0.824308390,165
+,0.835918367,174
+,0.847528344,181
+,0.859138321,179
+,0.870748299,154
+,0.882358276,169
+,0.893968253,150
+,0.905578231,189
+,0.917188208,159
+,0.928798185,172
+,0.940408163,157
+,0.952018140,167
+,0.963628117,169
+,0.975238095,155
+,0.986848072,189
+,0.998458049,178
+,1.010068027,168
+,1.021678004,169
+,1.033287981,178
+,1.044897959,157
+,1.056507936,166
+,1.068117913,162
+,1.079727891,170
+,1.091337868,186
+,1.102947845,178
+,1.114557823,178
+,1.126167800,155
+,1.137777777,173
+,1.149387755,156
+,1.160997732,158
+,1.172607709,170
+,1.184217687,167
+,1.195827664,160
+,1.207437641,180
+,1.219047619,153
+,1.230657596,154
+,1.242267573,171
+,1.253877551,159
+,1.265487528,194
+,1.277097505,170
+,1.288707482,157
+,1.300317460,184
+,1.311927437,156
+,1.323537414,173
+,1.335147392,184
+,1.346757369,168
+,1.358367346,182
+,1.369977324,147
+,1.381587301,164
+,1.393197278,163
+,1.404807256,165
+,1.416417233,181
+,1.428027210,172
+,1.439637188,169
+,1.451247165,165
+,1.462857142,166
+,1.474467120,158
+,1.486077097,162
+,1.497687074,188
+,1.509297052,176
+,1.520907029,176
+,1.532517006,159
+,1.544126984,183
+,1.555736961,178
+,1.567346938,168
+,1.578956916,171
+,1.590566893,158
+,1.602176870,153
+,1.613786848,189
+,1.625396825,171
+,1.637006802,142
+,1.648616780,503
+,1.660226757,0
+,1.671836734,30
+,1.683446712,189
+,1.695056689,146
+,1.706666666,174
+,1.718276643,171
+,1.729886621,169
+,1.741496598,164
+,1.753106575,181
+,1.764716553,180
+,1.776326530,163
+,1.787936507,174
+,1.799546485,135
+,1.811156462,193
+,1.822766439,187
+,1.834376417,176
+,1.845986394,172
+,1.857596371,155
+,1.869206349,185
+,1.880816326,167
+,1.892426303,173
+,1.904036281,162
+,1.915646258,166
+,1.927256235,167
+,1.938866213,179
+,1.950476190,170
+,1.962086167,158
+,1.973696145,168
+,1.985306122,162
+,1.996916099,182
+,2.008526077,167
+,2.020136054,185
+,2.031746031,165
+,2.043356009,184
+,2.054965986,157
+,2.066575963,167
+,2.078185941,164
+,2.089795918,160
+,2.101405895,181
+,2.113015873,165
+,2.124625850,181
+,2.136235827,161
+,2.147845804,176
+,2.159455782,177
+,2.171065759,150
+,2.182675736,185
+,2.194285714,173
+,2.205895691,162
+,2.217505668,169
+,2.229115646,171
+,2.240725623,140
+,2.252335600,196
+,2.263945578,155
+,2.275555555,171
+,2.287165532,186
+,2.298775510,157
+,2.310385487,166
+,2.321995464,169
+,2.333605442,183
+,2.345215419,186
+,2.356825396,138
+,2.368435374,162
+,2.380045351,180
+,2.391655328,165
+,2.403265306,181
+,2.414875283,444
+,2.426485260,27
+,2.438095238,150
+,2.449705215,166
+,2.461315192,177
+,2.472925170,174
+,2.484535147,165
+,2.496145124,158
+,2.507755102,178
+,2.519365079,177
+,2.530975056,172
+,2.542585034,174
+,2.554195011,168
+,2.565804988,165
+,2.577414965,168
+,2.589024943,149
+,2.600634920,171
+,2.612244897,164
+,2.623854875,163
+,2.635464852,182
+,2.647074829,162
+,2.658684807,156
+,2.670294784,173
+,2.681904761,188
+,2.693514739,166
+,2.705124716,157
+,2.716734693,170
+,2.728344671,167
+,2.739954648,191
+,2.751564625,154
+,2.763174603,175
+,2.774784580,157
+,2.786394557,169
+,2.798004535,160
+,2.809614512,163
+,2.821224489,191
+,2.832834467,158
+,2.844444444,184
+,2.856054421,164
+,2.867664399,176
+,2.879274376,182
+,2.890884353,180
+,2.902494331,138
+,2.914104308,170
+,2.925714285,172
+,2.937324263,172
+,2.948934240,168
+,2.960544217,186
+,2.972154195,171
+,2.983764172,154
+,2.995374149,185
+,3.006984126,172
+,3.018594104,164
+,3.030204081,176
+,3.041814058,195
+,3.053424036,160
+,3.065034013,124
+,3.076643990,181
+,3.088253968,170
+,3.099863945,178
+,3.111473922,165
+,3.123083900,164
+,3.134693877,194
+,3.146303854,157
+,3.157913832,205
+,3.169523809,163
+,3.181133786,159
+,3.192743764,184
+,3.204353741,145
+,3.215963718,170
+,3.227573696,155
+,3.239183673,161
+,3.250793650,164
+,3.262403628,184
+,3.274013605,175
+,3.285623582,155
+,3.297233560,164
+,3.308843537,181
+,3.320453514,182
+,3.332063492,145
+,3.343673469,177
+,3.355283446,162
+,3.366893424,153
+,3.378503401,185
+,3.390113378,174
+,3.401723356,167
+,3.413333333,187
+,3.424943310,157
+,3.436553287,170
+,3.448163265,169
+,3.459773242,166
+,3.471383219,171
+,3.482993197,165
+,3.494603174,158
+,3.506213151,181
+,3.517823129,168
+,3.529433106,175
+,3.541043083,162
+,3.552653061,167
+,3.564263038,179
+,3.575873015,167
+,3.587482993,156
+,3.599092970,209
+,3.610702947,179
+,3.622312925,159
+,3.633922902,180
+,3.645532879,152
+,3.657142857,169
+,3.668752834,189
+,3.680362811,170
+,3.691972789,156
+,3.703582766,165
+,3.715192743,179
+,3.726802721,173
+,3.738412698,163
+,3.750022675,170
+,3.761632653,181
+,3.773242630,177
+,3.784852607,181
+,3.796462585,166
+,3.808072562,153
+,3.819682539,164
+,3.831292517,209
+,3.842902494,159
+,3.854512471,194
+,3.866122448,164
+,3.877732426,184
+,3.889342403,163
+,3.900952380,173
+,3.912562358,165
+,3.924172335,164
+,3.935782312,182
+,3.947392290,170
+,3.959002267,160
+,3.970612244,173
+,3.982222222,160
+,3.993832199,174
+,4.005442176,179
+,4.017052154,179
+,4.028662131,145
+,4.040272108,196
+,4.051882086,155
+,4.063492063,170
+,4.075102040,180
+,4.086712018,156
+,4.098321995,159
+,4.109931972,182
+,4.121541950,175
+,4.133151927,173
+,4.144761904,164
+,4.156371882,186
+,4.167981859,160
+,4.179591836,175
+,4.191201814,178
+,4.202811791,159
+,4.214421768,177
+,4.226031746,181
+,4.237641723,177
+,4.249251700,163
+,4.260861678,158
+,4.272471655,188
+,4.284081632,163
+,4.295691609,158
+,4.307301587,164
+,4.318911564,164
+,4.330521541,183
+,4.342131519,160
+,4.353741496,182
+,4.365351473,172
+,4.376961451,172
+,4.388571428,179
+,4.400181405,154
+,4.411791383,166
+,4.423401360,174
+,4.435011337,156
+,4.446621315,174
+,4.458231292,169
+,4.469841269,169
+,4.481451247,178
+,4.493061224,175
+,4.504671201,193
+,4.516281179,153
+,4.527891156,160
+,4.539501133,176
+,4.551111111,167
+,4.562721088,184
+,4.574331065,163
+,4.585941043,150
+,4.597551020,156
+,4.609160997,182
+,4.620770975,168
+,4.632380952,168
+,4.643990929,152
+,4.655600907,174
+,4.667210884,186
+,4.678820861,168
+,4.690430839,173
+,4.702040816,184
+,4.713650793,169
+,4.725260770,166
+,4.736870748,164
+,4.748480725,193
+,4.760090702,155
+,4.771700680,164
+,4.783310657,181
+,4.794920634,142
+,4.806530612,183
+,4.818140589,181
+,4.829750566,185
+,4.841360544,171
+,4.852970521,184
+,4.864580498,156
+,4.876190476,162
+,4.887800453,182
+,4.899410430,161
+,4.911020408,175
+,4.922630385,168
+,4.934240362,172
+,4.945850340,151
+,4.957460317,176
+,4.969070294,171
+,4.980680272,93
+,4.992290249,0
+,5.003900226,0
+,5.015510204,0
+,5.027120181,0
+,5.038730158,0
+,5.050340136,0
+,5.061950113,0
+,5.073560090,0
+,5.085170068,0
+,5.096780045,0
+,5.108390022,0
+,5.120000000,0
+,5.131609977,0
+,5.143219954,0
+,5.154829931,0
+,5.166439909,0
+,5.178049886,0
+,5.189659863,0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-df-windowtype-hamming.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,448 @@
+"./../audio/3clicks8.wav",0.000000000,0
+,0.011609977,209
+,0.023219954,168
+,0.034829931,177
+,0.046439909,164
+,0.058049886,169
+,0.069659863,176
+,0.081269841,162
+,0.092879818,154
+,0.104489795,160
+,0.116099773,181
+,0.127709750,172
+,0.139319727,165
+,0.150929705,151
+,0.162539682,200
+,0.174149659,161
+,0.185759637,171
+,0.197369614,164
+,0.208979591,165
+,0.220589569,138
+,0.232199546,150
+,0.243809523,176
+,0.255419501,151
+,0.267029478,168
+,0.278639455,157
+,0.290249433,201
+,0.301859410,171
+,0.313469387,171
+,0.325079365,166
+,0.336689342,169
+,0.348299319,161
+,0.359909297,191
+,0.371519274,179
+,0.383129251,148
+,0.394739229,189
+,0.406349206,157
+,0.417959183,176
+,0.429569160,163
+,0.441179138,153
+,0.452789115,178
+,0.464399092,185
+,0.476009070,163
+,0.487619047,152
+,0.499229024,186
+,0.510839002,168
+,0.522448979,161
+,0.534058956,170
+,0.545668934,158
+,0.557278911,150
+,0.568888888,161
+,0.580498866,163
+,0.592108843,173
+,0.603718820,169
+,0.615328798,188
+,0.626938775,165
+,0.638548752,177
+,0.650158730,156
+,0.661768707,172
+,0.673378684,164
+,0.684988662,178
+,0.696598639,184
+,0.708208616,161
+,0.719818594,169
+,0.731428571,157
+,0.743038548,176
+,0.754648526,155
+,0.766258503,173
+,0.777868480,450
+,0.789478458,29
+,0.801088435,55
+,0.812698412,184
+,0.824308390,155
+,0.835918367,168
+,0.847528344,184
+,0.859138321,175
+,0.870748299,156
+,0.882358276,166
+,0.893968253,148
+,0.905578231,183
+,0.917188208,160
+,0.928798185,174
+,0.940408163,161
+,0.952018140,170
+,0.963628117,167
+,0.975238095,156
+,0.986848072,189
+,0.998458049,181
+,1.010068027,169
+,1.021678004,168
+,1.033287981,171
+,1.044897959,160
+,1.056507936,164
+,1.068117913,168
+,1.079727891,170
+,1.091337868,181
+,1.102947845,177
+,1.114557823,162
+,1.126167800,158
+,1.137777777,180
+,1.149387755,156
+,1.160997732,150
+,1.172607709,170
+,1.184217687,169
+,1.195827664,160
+,1.207437641,175
+,1.219047619,159
+,1.230657596,152
+,1.242267573,169
+,1.253877551,159
+,1.265487528,190
+,1.277097505,166
+,1.288707482,152
+,1.300317460,183
+,1.311927437,162
+,1.323537414,169
+,1.335147392,176
+,1.346757369,168
+,1.358367346,180
+,1.369977324,147
+,1.381587301,164
+,1.393197278,160
+,1.404807256,165
+,1.416417233,181
+,1.428027210,171
+,1.439637188,165
+,1.451247165,167
+,1.462857142,167
+,1.474467120,154
+,1.486077097,167
+,1.497687074,189
+,1.509297052,172
+,1.520907029,169
+,1.532517006,153
+,1.544126984,179
+,1.555736961,175
+,1.567346938,178
+,1.578956916,169
+,1.590566893,156
+,1.602176870,157
+,1.613786848,183
+,1.625396825,171
+,1.637006802,142
+,1.648616780,503
+,1.660226757,0
+,1.671836734,23
+,1.683446712,181
+,1.695056689,147
+,1.706666666,174
+,1.718276643,174
+,1.729886621,156
+,1.741496598,161
+,1.753106575,171
+,1.764716553,185
+,1.776326530,167
+,1.787936507,170
+,1.799546485,126
+,1.811156462,191
+,1.822766439,185
+,1.834376417,176
+,1.845986394,175
+,1.857596371,153
+,1.869206349,176
+,1.880816326,165
+,1.892426303,177
+,1.904036281,165
+,1.915646258,158
+,1.927256235,163
+,1.938866213,175
+,1.950476190,169
+,1.962086167,158
+,1.973696145,170
+,1.985306122,161
+,1.996916099,188
+,2.008526077,168
+,2.020136054,187
+,2.031746031,168
+,2.043356009,193
+,2.054965986,160
+,2.066575963,166
+,2.078185941,164
+,2.089795918,164
+,2.101405895,182
+,2.113015873,167
+,2.124625850,174
+,2.136235827,165
+,2.147845804,171
+,2.159455782,173
+,2.171065759,153
+,2.182675736,179
+,2.194285714,178
+,2.205895691,158
+,2.217505668,165
+,2.229115646,173
+,2.240725623,137
+,2.252335600,186
+,2.263945578,154
+,2.275555555,164
+,2.287165532,187
+,2.298775510,155
+,2.310385487,162
+,2.321995464,166
+,2.333605442,180
+,2.345215419,184
+,2.356825396,143
+,2.368435374,161
+,2.380045351,175
+,2.391655328,162
+,2.403265306,253
+,2.414875283,435
+,2.426485260,33
+,2.438095238,56
+,2.449705215,166
+,2.461315192,173
+,2.472925170,170
+,2.484535147,155
+,2.496145124,154
+,2.507755102,175
+,2.519365079,181
+,2.530975056,172
+,2.542585034,169
+,2.554195011,164
+,2.565804988,174
+,2.577414965,169
+,2.589024943,142
+,2.600634920,166
+,2.612244897,164
+,2.623854875,165
+,2.635464852,185
+,2.647074829,166
+,2.658684807,155
+,2.670294784,172
+,2.681904761,181
+,2.693514739,161
+,2.705124716,160
+,2.716734693,163
+,2.728344671,160
+,2.739954648,189
+,2.751564625,148
+,2.763174603,175
+,2.774784580,154
+,2.786394557,169
+,2.798004535,159
+,2.809614512,162
+,2.821224489,189
+,2.832834467,160
+,2.844444444,182
+,2.856054421,158
+,2.867664399,181
+,2.879274376,182
+,2.890884353,178
+,2.902494331,146
+,2.914104308,171
+,2.925714285,167
+,2.937324263,167
+,2.948934240,169
+,2.960544217,182
+,2.972154195,174
+,2.983764172,156
+,2.995374149,186
+,3.006984126,169
+,3.018594104,166
+,3.030204081,169
+,3.041814058,189
+,3.053424036,161
+,3.065034013,127
+,3.076643990,182
+,3.088253968,163
+,3.099863945,172
+,3.111473922,162
+,3.123083900,155
+,3.134693877,191
+,3.146303854,152
+,3.157913832,205
+,3.169523809,165
+,3.181133786,152
+,3.192743764,181
+,3.204353741,155
+,3.215963718,174
+,3.227573696,151
+,3.239183673,156
+,3.250793650,168
+,3.262403628,178
+,3.274013605,178
+,3.285623582,159
+,3.297233560,163
+,3.308843537,181
+,3.320453514,184
+,3.332063492,146
+,3.343673469,176
+,3.355283446,160
+,3.366893424,138
+,3.378503401,189
+,3.390113378,174
+,3.401723356,164
+,3.413333333,184
+,3.424943310,161
+,3.436553287,167
+,3.448163265,164
+,3.459773242,167
+,3.471383219,166
+,3.482993197,168
+,3.494603174,163
+,3.506213151,177
+,3.517823129,163
+,3.529433106,170
+,3.541043083,160
+,3.552653061,175
+,3.564263038,178
+,3.575873015,159
+,3.587482993,151
+,3.599092970,204
+,3.610702947,175
+,3.622312925,161
+,3.633922902,178
+,3.645532879,146
+,3.657142857,170
+,3.668752834,187
+,3.680362811,167
+,3.691972789,163
+,3.703582766,172
+,3.715192743,174
+,3.726802721,170
+,3.738412698,158
+,3.750022675,173
+,3.761632653,180
+,3.773242630,173
+,3.784852607,183
+,3.796462585,168
+,3.808072562,150
+,3.819682539,162
+,3.831292517,205
+,3.842902494,159
+,3.854512471,186
+,3.866122448,163
+,3.877732426,182
+,3.889342403,158
+,3.900952380,174
+,3.912562358,163
+,3.924172335,159
+,3.935782312,171
+,3.947392290,167
+,3.959002267,154
+,3.970612244,173
+,3.982222222,162
+,3.993832199,170
+,4.005442176,180
+,4.017052154,182
+,4.028662131,146
+,4.040272108,196
+,4.051882086,151
+,4.063492063,171
+,4.075102040,180
+,4.086712018,163
+,4.098321995,155
+,4.109931972,177
+,4.121541950,172
+,4.133151927,176
+,4.144761904,163
+,4.156371882,184
+,4.167981859,162
+,4.179591836,165
+,4.191201814,182
+,4.202811791,162
+,4.214421768,171
+,4.226031746,180
+,4.237641723,176
+,4.249251700,161
+,4.260861678,167
+,4.272471655,181
+,4.284081632,163
+,4.295691609,155
+,4.307301587,161
+,4.318911564,164
+,4.330521541,186
+,4.342131519,163
+,4.353741496,180
+,4.365351473,170
+,4.376961451,168
+,4.388571428,173
+,4.400181405,156
+,4.411791383,163
+,4.423401360,176
+,4.435011337,151
+,4.446621315,170
+,4.458231292,171
+,4.469841269,169
+,4.481451247,178
+,4.493061224,174
+,4.504671201,191
+,4.516281179,156
+,4.527891156,163
+,4.539501133,176
+,4.551111111,166
+,4.562721088,178
+,4.574331065,160
+,4.585941043,150
+,4.597551020,162
+,4.609160997,179
+,4.620770975,170
+,4.632380952,165
+,4.643990929,151
+,4.655600907,178
+,4.667210884,188
+,4.678820861,162
+,4.690430839,172
+,4.702040816,179
+,4.713650793,170
+,4.725260770,166
+,4.736870748,155
+,4.748480725,198
+,4.760090702,162
+,4.771700680,162
+,4.783310657,184
+,4.794920634,142
+,4.806530612,183
+,4.818140589,184
+,4.829750566,185
+,4.841360544,171
+,4.852970521,177
+,4.864580498,155
+,4.876190476,158
+,4.887800453,178
+,4.899410430,162
+,4.911020408,174
+,4.922630385,174
+,4.934240362,175
+,4.945850340,151
+,4.957460317,177
+,4.969070294,170
+,4.980680272,90
+,4.992290249,0
+,5.003900226,0
+,5.015510204,0
+,5.027120181,0
+,5.038730158,0
+,5.050340136,0
+,5.061950113,0
+,5.073560090,0
+,5.085170068,0
+,5.096780045,0
+,5.108390022,0
+,5.120000000,0
+,5.131609977,0
+,5.143219954,0
+,5.154829931,0
+,5.166439909,0
+,5.178049886,0
+,5.189659863,0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-df-windowtype-hanning.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,448 @@
+"./../audio/3clicks8.wav",0.000000000,0
+,0.011609977,207
+,0.023219954,170
+,0.034829931,184
+,0.046439909,166
+,0.058049886,174
+,0.069659863,179
+,0.081269841,162
+,0.092879818,157
+,0.104489795,156
+,0.116099773,182
+,0.127709750,168
+,0.139319727,168
+,0.150929705,155
+,0.162539682,200
+,0.174149659,163
+,0.185759637,178
+,0.197369614,164
+,0.208979591,166
+,0.220589569,137
+,0.232199546,155
+,0.243809523,177
+,0.255419501,145
+,0.267029478,172
+,0.278639455,155
+,0.290249433,201
+,0.301859410,166
+,0.313469387,169
+,0.325079365,158
+,0.336689342,169
+,0.348299319,155
+,0.359909297,187
+,0.371519274,177
+,0.383129251,149
+,0.394739229,196
+,0.406349206,160
+,0.417959183,174
+,0.429569160,165
+,0.441179138,149
+,0.452789115,181
+,0.464399092,180
+,0.476009070,156
+,0.487619047,163
+,0.499229024,188
+,0.510839002,173
+,0.522448979,160
+,0.534058956,168
+,0.545668934,154
+,0.557278911,155
+,0.568888888,161
+,0.580498866,163
+,0.592108843,172
+,0.603718820,168
+,0.615328798,181
+,0.626938775,167
+,0.638548752,172
+,0.650158730,158
+,0.661768707,172
+,0.673378684,167
+,0.684988662,180
+,0.696598639,188
+,0.708208616,160
+,0.719818594,166
+,0.731428571,158
+,0.743038548,176
+,0.754648526,153
+,0.766258503,173
+,0.777868480,449
+,0.789478458,30
+,0.801088435,70
+,0.812698412,181
+,0.824308390,165
+,0.835918367,174
+,0.847528344,181
+,0.859138321,179
+,0.870748299,154
+,0.882358276,169
+,0.893968253,150
+,0.905578231,189
+,0.917188208,159
+,0.928798185,172
+,0.940408163,157
+,0.952018140,167
+,0.963628117,169
+,0.975238095,155
+,0.986848072,189
+,0.998458049,178
+,1.010068027,168
+,1.021678004,169
+,1.033287981,178
+,1.044897959,157
+,1.056507936,166
+,1.068117913,162
+,1.079727891,170
+,1.091337868,186
+,1.102947845,178
+,1.114557823,178
+,1.126167800,155
+,1.137777777,173
+,1.149387755,156
+,1.160997732,158
+,1.172607709,170
+,1.184217687,167
+,1.195827664,160
+,1.207437641,180
+,1.219047619,153
+,1.230657596,154
+,1.242267573,171
+,1.253877551,159
+,1.265487528,194
+,1.277097505,170
+,1.288707482,157
+,1.300317460,184
+,1.311927437,156
+,1.323537414,173
+,1.335147392,184
+,1.346757369,168
+,1.358367346,182
+,1.369977324,147
+,1.381587301,164
+,1.393197278,163
+,1.404807256,165
+,1.416417233,181
+,1.428027210,172
+,1.439637188,169
+,1.451247165,165
+,1.462857142,166
+,1.474467120,158
+,1.486077097,162
+,1.497687074,188
+,1.509297052,176
+,1.520907029,176
+,1.532517006,159
+,1.544126984,183
+,1.555736961,178
+,1.567346938,168
+,1.578956916,171
+,1.590566893,158
+,1.602176870,153
+,1.613786848,189
+,1.625396825,171
+,1.637006802,142
+,1.648616780,503
+,1.660226757,0
+,1.671836734,30
+,1.683446712,189
+,1.695056689,146
+,1.706666666,174
+,1.718276643,171
+,1.729886621,169
+,1.741496598,164
+,1.753106575,181
+,1.764716553,180
+,1.776326530,163
+,1.787936507,174
+,1.799546485,135
+,1.811156462,193
+,1.822766439,187
+,1.834376417,176
+,1.845986394,172
+,1.857596371,155
+,1.869206349,185
+,1.880816326,167
+,1.892426303,173
+,1.904036281,162
+,1.915646258,166
+,1.927256235,167
+,1.938866213,179
+,1.950476190,170
+,1.962086167,158
+,1.973696145,168
+,1.985306122,162
+,1.996916099,182
+,2.008526077,167
+,2.020136054,185
+,2.031746031,165
+,2.043356009,184
+,2.054965986,157
+,2.066575963,167
+,2.078185941,164
+,2.089795918,160
+,2.101405895,181
+,2.113015873,165
+,2.124625850,181
+,2.136235827,161
+,2.147845804,176
+,2.159455782,177
+,2.171065759,150
+,2.182675736,185
+,2.194285714,173
+,2.205895691,162
+,2.217505668,169
+,2.229115646,171
+,2.240725623,140
+,2.252335600,196
+,2.263945578,155
+,2.275555555,171
+,2.287165532,186
+,2.298775510,157
+,2.310385487,166
+,2.321995464,169
+,2.333605442,183
+,2.345215419,186
+,2.356825396,138
+,2.368435374,162
+,2.380045351,180
+,2.391655328,165
+,2.403265306,181
+,2.414875283,444
+,2.426485260,27
+,2.438095238,150
+,2.449705215,166
+,2.461315192,177
+,2.472925170,174
+,2.484535147,165
+,2.496145124,158
+,2.507755102,178
+,2.519365079,177
+,2.530975056,172
+,2.542585034,174
+,2.554195011,168
+,2.565804988,165
+,2.577414965,168
+,2.589024943,149
+,2.600634920,171
+,2.612244897,164
+,2.623854875,163
+,2.635464852,182
+,2.647074829,162
+,2.658684807,156
+,2.670294784,173
+,2.681904761,188
+,2.693514739,166
+,2.705124716,157
+,2.716734693,170
+,2.728344671,167
+,2.739954648,191
+,2.751564625,154
+,2.763174603,175
+,2.774784580,157
+,2.786394557,169
+,2.798004535,160
+,2.809614512,163
+,2.821224489,191
+,2.832834467,158
+,2.844444444,184
+,2.856054421,164
+,2.867664399,176
+,2.879274376,182
+,2.890884353,180
+,2.902494331,138
+,2.914104308,170
+,2.925714285,172
+,2.937324263,172
+,2.948934240,168
+,2.960544217,186
+,2.972154195,171
+,2.983764172,154
+,2.995374149,185
+,3.006984126,172
+,3.018594104,164
+,3.030204081,176
+,3.041814058,195
+,3.053424036,160
+,3.065034013,124
+,3.076643990,181
+,3.088253968,170
+,3.099863945,178
+,3.111473922,165
+,3.123083900,164
+,3.134693877,194
+,3.146303854,157
+,3.157913832,205
+,3.169523809,163
+,3.181133786,159
+,3.192743764,184
+,3.204353741,145
+,3.215963718,170
+,3.227573696,155
+,3.239183673,161
+,3.250793650,164
+,3.262403628,184
+,3.274013605,175
+,3.285623582,155
+,3.297233560,164
+,3.308843537,181
+,3.320453514,182
+,3.332063492,145
+,3.343673469,177
+,3.355283446,162
+,3.366893424,153
+,3.378503401,185
+,3.390113378,174
+,3.401723356,167
+,3.413333333,187
+,3.424943310,157
+,3.436553287,170
+,3.448163265,169
+,3.459773242,166
+,3.471383219,171
+,3.482993197,165
+,3.494603174,158
+,3.506213151,181
+,3.517823129,168
+,3.529433106,175
+,3.541043083,162
+,3.552653061,167
+,3.564263038,179
+,3.575873015,167
+,3.587482993,156
+,3.599092970,209
+,3.610702947,179
+,3.622312925,159
+,3.633922902,180
+,3.645532879,152
+,3.657142857,169
+,3.668752834,189
+,3.680362811,170
+,3.691972789,156
+,3.703582766,165
+,3.715192743,179
+,3.726802721,173
+,3.738412698,163
+,3.750022675,170
+,3.761632653,181
+,3.773242630,177
+,3.784852607,181
+,3.796462585,166
+,3.808072562,153
+,3.819682539,164
+,3.831292517,209
+,3.842902494,159
+,3.854512471,194
+,3.866122448,164
+,3.877732426,184
+,3.889342403,163
+,3.900952380,173
+,3.912562358,165
+,3.924172335,164
+,3.935782312,182
+,3.947392290,170
+,3.959002267,160
+,3.970612244,173
+,3.982222222,160
+,3.993832199,174
+,4.005442176,179
+,4.017052154,179
+,4.028662131,145
+,4.040272108,196
+,4.051882086,155
+,4.063492063,170
+,4.075102040,180
+,4.086712018,156
+,4.098321995,159
+,4.109931972,182
+,4.121541950,175
+,4.133151927,173
+,4.144761904,164
+,4.156371882,186
+,4.167981859,160
+,4.179591836,175
+,4.191201814,178
+,4.202811791,159
+,4.214421768,177
+,4.226031746,181
+,4.237641723,177
+,4.249251700,163
+,4.260861678,158
+,4.272471655,188
+,4.284081632,163
+,4.295691609,158
+,4.307301587,164
+,4.318911564,164
+,4.330521541,183
+,4.342131519,160
+,4.353741496,182
+,4.365351473,172
+,4.376961451,172
+,4.388571428,179
+,4.400181405,154
+,4.411791383,166
+,4.423401360,174
+,4.435011337,156
+,4.446621315,174
+,4.458231292,169
+,4.469841269,169
+,4.481451247,178
+,4.493061224,175
+,4.504671201,193
+,4.516281179,153
+,4.527891156,160
+,4.539501133,176
+,4.551111111,167
+,4.562721088,184
+,4.574331065,163
+,4.585941043,150
+,4.597551020,156
+,4.609160997,182
+,4.620770975,168
+,4.632380952,168
+,4.643990929,152
+,4.655600907,174
+,4.667210884,186
+,4.678820861,168
+,4.690430839,173
+,4.702040816,184
+,4.713650793,169
+,4.725260770,166
+,4.736870748,164
+,4.748480725,193
+,4.760090702,155
+,4.771700680,164
+,4.783310657,181
+,4.794920634,142
+,4.806530612,183
+,4.818140589,181
+,4.829750566,185
+,4.841360544,171
+,4.852970521,184
+,4.864580498,156
+,4.876190476,162
+,4.887800453,182
+,4.899410430,161
+,4.911020408,175
+,4.922630385,168
+,4.934240362,172
+,4.945850340,151
+,4.957460317,176
+,4.969070294,171
+,4.980680272,93
+,4.992290249,0
+,5.003900226,0
+,5.015510204,0
+,5.027120181,0
+,5.038730158,0
+,5.050340136,0
+,5.061950113,0
+,5.073560090,0
+,5.085170068,0
+,5.096780045,0
+,5.108390022,0
+,5.120000000,0
+,5.131609977,0
+,5.143219954,0
+,5.154829931,0
+,5.166439909,0
+,5.178049886,0
+,5.189659863,0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-multiple-outputs-start-and-duration.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,226 @@
+"./../audio/3clicks8.wav",1.650158730
+,1.743038548,0
+,1.754648526,255
+,1.766258503,181
+,1.777868480,173
+,1.789478458,164
+,1.801088435,143
+,1.812698412,187
+,1.824308390,191
+,1.835918367,184
+,1.847528344,169
+,1.859138321,156
+,1.870748299,178
+,1.882358276,162
+,1.893968253,172
+,1.905578231,166
+,1.917188208,150
+,1.928798185,178
+,1.940408163,166
+,1.952018140,177
+,1.963628117,154
+,1.975238095,155
+,1.986848072,158
+,1.998458049,191
+,2.010068027,167
+,2.021678004,192
+,2.033287981,164
+,2.044897959,192
+,2.056507936,160
+,2.068117913,179
+,2.079727891,162
+,2.091337868,168
+,2.416417233
+,2.102947845,177
+,2.114557823,179
+,2.126167800,169
+,2.137777777,161
+,2.149387755,166
+,2.160997732,175
+,2.172607709,149
+,2.184217687,189
+,2.195827664,172
+,2.207437641,157
+,2.219047619,173
+,2.230657596,171
+,2.242267573,147
+,2.253877551,180
+,2.265487528,158
+,2.277097505,159
+,2.288707482,193
+,2.300317460,153
+,2.311927437,157
+,2.323537414,165
+,2.335147392,198
+,2.346757369,181
+,2.358367346,146
+,2.369977324,158
+,2.381587301,166
+,2.393197278,171
+,2.404807256,288
+,2.416417233,438
+,2.428027210,29
+,2.439637188,161
+,2.451247165,166
+,2.462857142,189
+,2.474467120,167
+,2.486077097,166
+,2.497687074,150
+,2.509297052,190
+,2.520907029,185
+,2.532517006,169
+,2.544126984,172
+,2.555736961,170
+,2.567346938,182
+,2.578956916,171
+,2.590566893,157
+,2.602176870,177
+,2.613786848,160
+,2.625396825,175
+,2.637006802,182
+,2.648616780,160
+,2.660226757,160
+,2.671836734,172
+,2.683446712,177
+,2.695056689,157
+,2.706666666,167
+,2.718276643,172
+,2.729886621,181
+,2.741496598,182
+,2.753106575,158
+,2.764716553,169
+,2.776326530,149
+,2.787936507,182
+,2.799546485,158
+,2.811156462,160
+,2.822766439,192
+,2.834376417,160
+,2.845986394,182
+,2.857596371,149
+,2.869206349,174
+,2.880816326,169
+,2.892426303,187
+,2.904036281,157
+,2.915646258,181
+,2.927256235,170
+,2.938866213,186
+,2.950476190,180
+,2.962086167,177
+,2.973696145,181
+,2.985306122,152
+,2.996916099,199
+,3.008526077,174
+,3.020136054,170
+,3.031746031,169
+,3.043356009,195
+,3.054965986,169
+,3.066575963,142
+,3.078185941,184
+,3.089795918,159
+,3.101405895,181
+,3.113015873,179
+,3.124625850,158
+,3.136235827,212
+,3.147845804,152
+,3.159455782,211
+,3.171065759,163
+,3.182675736,141
+,3.194285714,190
+,3.205895691,167
+,3.217505668,168
+,3.229115646,146
+,3.240725623,164
+,3.252335600,167
+,3.263945578,186
+,3.275555555,179
+,3.287165532,158
+,3.298775510,164
+,3.310385487,182
+,3.321995464,180
+,3.333605442,138
+,3.345215419,180
+,3.356825396,173
+,3.368435374,154
+,3.380045351,198
+,3.391655328,178
+,3.403265306,164
+,3.414875283,193
+,3.426485260,159
+,3.438095238,171
+,3.449705215,165
+,3.461315192,174
+,3.472925170,162
+,3.484535147,175
+,3.496145124,160
+,3.507755102,184
+,3.519365079,169
+,3.530975056,168
+,3.542585034,171
+,3.554195011,166
+,3.565804988,169
+,3.577414965,151
+,3.589024943,154
+,3.600634920,194
+,3.612244897,178
+,3.623854875,153
+,3.635464852,186
+,3.647074829,156
+,3.658684807,162
+,3.670294784,183
+,3.681904761,172
+,3.693514739,163
+,3.705124716,172
+,3.716734693,172
+,3.728344671,167
+,3.739954648,168
+,3.751564625,175
+,3.763174603,179
+,3.774784580,163
+,3.786394557,192
+,3.798004535,169
+,3.809614512,147
+,3.821224489,158
+,3.832834467,202
+,3.844444444,162
+,3.856054421,196
+,3.867664399,158
+,3.879274376,194
+,3.890884353,168
+,3.902494331,171
+,3.914104308,151
+,3.925714285,159
+,3.937324263,172
+,3.948934240,164
+,3.960544217,151
+,3.972154195,163
+,3.983764172,159
+,3.995374149,180
+,4.006984126,163
+,4.018594104,182
+,4.030204081,148
+,4.041814058,183
+,4.053424036,159
+,4.065034013,181
+,4.076643990,184
+,4.088253968,143
+,4.099863945,154
+,4.111473922,165
+,4.123083900,175
+,4.134693877,176
+,4.146303854,158
+,4.157913832,189
+,4.169523809,157
+,4.181133786,163
+,4.192743764,196
+,4.204353741,160
+,4.215963718,168
+,4.227573696,184
+,4.239183673,155
+,4.250793650,168
+,4.262403628,169
+,4.274013605,191
+,4.285623582,155
+,4.297233560,169
+,4.308843537,161
+,4.320453514,172
+,4.332063492,181
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-multiple-outputs.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,451 @@
+"./../audio/3clicks8.wav",0.000000000,0
+,0.011609977,207
+,0.023219954,170
+,0.034829931,184
+,0.046439909,166
+,0.058049886,174
+,0.069659863,179
+,0.081269841,162
+,0.092879818,157
+,0.104489795,156
+,0.116099773,182
+,0.127709750,168
+,0.139319727,168
+,0.150929705,155
+,0.162539682,200
+,0.174149659,163
+,0.185759637,178
+,0.197369614,164
+,0.208979591,166
+,0.220589569,137
+,0.232199546,155
+,0.243809523,177
+,0.255419501,145
+,0.267029478,172
+,0.278639455,155
+,0.290249433,201
+,0.301859410,166
+,0.313469387,169
+,0.325079365,158
+,0.336689342,169
+,0.348299319,155
+,0.359909297,187
+,0.371519274,177
+,0.383129251,149
+,0.394739229,196
+,0.406349206,160
+,0.417959183,174
+,0.429569160,165
+,0.441179138,149
+,0.452789115,181
+,0.464399092,180
+,0.476009070,156
+,0.487619047,163
+,0.499229024,188
+,0.510839002,173
+,0.522448979,160
+,0.534058956,168
+,0.545668934,154
+,0.557278911,155
+,0.568888888,161
+,0.580498866,163
+,0.592108843,172
+,0.603718820,168
+,0.615328798,181
+,0.626938775,167
+,0.638548752,172
+,0.650158730,158
+,0.661768707,172
+,0.673378684,167
+,0.684988662,180
+,0.696598639,188
+,0.708208616,160
+,0.719818594,166
+,0.731428571,158
+,0.743038548,176
+,0.754648526,153
+,0.766258503,173
+,0.777868480,449
+,0.789478458,30
+,0.801088435,70
+,0.812698412,181
+,0.824308390,165
+,0.835918367,174
+,0.847528344,181
+,0.859138321,179
+,0.870748299,154
+,0.882358276,169
+,0.893968253,150
+,0.905578231,189
+,0.917188208,159
+,0.928798185,172
+,0.940408163,157
+,0.952018140,167
+,0.963628117,169
+,0.975238095,155
+,0.986848072,189
+,0.998458049,178
+,1.010068027,168
+,1.021678004,169
+,1.033287981,178
+,1.044897959,157
+,1.056507936,166
+,1.068117913,162
+,1.079727891,170
+,1.091337868,186
+,0.777868481
+,1.102947845,178
+,1.114557823,178
+,1.126167800,155
+,1.137777777,173
+,1.149387755,156
+,1.160997732,158
+,1.172607709,170
+,1.184217687,167
+,1.195827664,160
+,1.207437641,180
+,1.219047619,153
+,1.230657596,154
+,1.242267573,171
+,1.253877551,159
+,1.265487528,194
+,1.277097505,170
+,1.288707482,157
+,1.300317460,184
+,1.311927437,156
+,1.323537414,173
+,1.335147392,184
+,1.346757369,168
+,1.358367346,182
+,1.369977324,147
+,1.381587301,164
+,1.393197278,163
+,1.404807256,165
+,1.416417233,181
+,1.428027210,172
+,1.439637188,169
+,1.451247165,165
+,1.462857142,166
+,1.474467120,158
+,1.486077097,162
+,1.497687074,188
+,1.509297052,176
+,1.520907029,176
+,1.532517006,159
+,1.544126984,183
+,1.555736961,178
+,1.567346938,168
+,1.578956916,171
+,1.590566893,158
+,1.602176870,153
+,1.613786848,189
+,1.625396825,171
+,1.637006802,142
+,1.648616780,503
+,1.660226757,0
+,1.671836734,30
+,1.683446712,189
+,1.695056689,146
+,1.706666666,174
+,1.718276643,171
+,1.729886621,169
+,1.741496598,164
+,1.753106575,181
+,1.764716553,180
+,1.776326530,163
+,1.787936507,174
+,1.799546485,135
+,1.811156462,193
+,1.822766439,187
+,1.834376417,176
+,1.648616780
+,1.845986394,172
+,1.857596371,155
+,1.869206349,185
+,1.880816326,167
+,1.892426303,173
+,1.904036281,162
+,1.915646258,166
+,1.927256235,167
+,1.938866213,179
+,1.950476190,170
+,1.962086167,158
+,1.973696145,168
+,1.985306122,162
+,1.996916099,182
+,2.008526077,167
+,2.020136054,185
+,2.031746031,165
+,2.043356009,184
+,2.054965986,157
+,2.066575963,167
+,2.078185941,164
+,2.089795918,160
+,2.101405895,181
+,2.113015873,165
+,2.124625850,181
+,2.136235827,161
+,2.147845804,176
+,2.159455782,177
+,2.171065759,150
+,2.182675736,185
+,2.194285714,173
+,2.205895691,162
+,2.217505668,169
+,2.229115646,171
+,2.240725623,140
+,2.252335600,196
+,2.263945578,155
+,2.275555555,171
+,2.287165532,186
+,2.298775510,157
+,2.310385487,166
+,2.321995464,169
+,2.333605442,183
+,2.345215419,186
+,2.356825396,138
+,2.368435374,162
+,2.380045351,180
+,2.391655328,165
+,2.403265306,181
+,2.414875283,444
+,2.426485260,27
+,2.438095238,150
+,2.449705215,166
+,2.461315192,177
+,2.472925170,174
+,2.484535147,165
+,2.496145124,158
+,2.507755102,178
+,2.519365079,177
+,2.530975056,172
+,2.542585034,174
+,2.554195011,168
+,2.565804988,165
+,2.577414965,168
+,2.414875283
+,2.589024943,149
+,2.600634920,171
+,2.612244897,164
+,2.623854875,163
+,2.635464852,182
+,2.647074829,162
+,2.658684807,156
+,2.670294784,173
+,2.681904761,188
+,2.693514739,166
+,2.705124716,157
+,2.716734693,170
+,2.728344671,167
+,2.739954648,191
+,2.751564625,154
+,2.763174603,175
+,2.774784580,157
+,2.786394557,169
+,2.798004535,160
+,2.809614512,163
+,2.821224489,191
+,2.832834467,158
+,2.844444444,184
+,2.856054421,164
+,2.867664399,176
+,2.879274376,182
+,2.890884353,180
+,2.902494331,138
+,2.914104308,170
+,2.925714285,172
+,2.937324263,172
+,2.948934240,168
+,2.960544217,186
+,2.972154195,171
+,2.983764172,154
+,2.995374149,185
+,3.006984126,172
+,3.018594104,164
+,3.030204081,176
+,3.041814058,195
+,3.053424036,160
+,3.065034013,124
+,3.076643990,181
+,3.088253968,170
+,3.099863945,178
+,3.111473922,165
+,3.123083900,164
+,3.134693877,194
+,3.146303854,157
+,3.157913832,205
+,3.169523809,163
+,3.181133786,159
+,3.192743764,184
+,3.204353741,145
+,3.215963718,170
+,3.227573696,155
+,3.239183673,161
+,3.250793650,164
+,3.262403628,184
+,3.274013605,175
+,3.285623582,155
+,3.297233560,164
+,3.308843537,181
+,3.320453514,182
+,3.332063492,145
+,3.343673469,177
+,3.355283446,162
+,3.366893424,153
+,3.378503401,185
+,3.390113378,174
+,3.401723356,167
+,3.413333333,187
+,3.424943310,157
+,3.436553287,170
+,3.448163265,169
+,3.459773242,166
+,3.471383219,171
+,3.482993197,165
+,3.494603174,158
+,3.506213151,181
+,3.517823129,168
+,3.529433106,175
+,3.541043083,162
+,3.552653061,167
+,3.564263038,179
+,3.575873015,167
+,3.587482993,156
+,3.599092970,209
+,3.610702947,179
+,3.622312925,159
+,3.633922902,180
+,3.645532879,152
+,3.657142857,169
+,3.668752834,189
+,3.680362811,170
+,3.691972789,156
+,3.703582766,165
+,3.715192743,179
+,3.726802721,173
+,3.738412698,163
+,3.750022675,170
+,3.761632653,181
+,3.773242630,177
+,3.784852607,181
+,3.796462585,166
+,3.808072562,153
+,3.819682539,164
+,3.831292517,209
+,3.842902494,159
+,3.854512471,194
+,3.866122448,164
+,3.877732426,184
+,3.889342403,163
+,3.900952380,173
+,3.912562358,165
+,3.924172335,164
+,3.935782312,182
+,3.947392290,170
+,3.959002267,160
+,3.970612244,173
+,3.982222222,160
+,3.993832199,174
+,4.005442176,179
+,4.017052154,179
+,4.028662131,145
+,4.040272108,196
+,4.051882086,155
+,4.063492063,170
+,4.075102040,180
+,4.086712018,156
+,4.098321995,159
+,4.109931972,182
+,4.121541950,175
+,4.133151927,173
+,4.144761904,164
+,4.156371882,186
+,4.167981859,160
+,4.179591836,175
+,4.191201814,178
+,4.202811791,159
+,4.214421768,177
+,4.226031746,181
+,4.237641723,177
+,4.249251700,163
+,4.260861678,158
+,4.272471655,188
+,4.284081632,163
+,4.295691609,158
+,4.307301587,164
+,4.318911564,164
+,4.330521541,183
+,4.342131519,160
+,4.353741496,182
+,4.365351473,172
+,4.376961451,172
+,4.388571428,179
+,4.400181405,154
+,4.411791383,166
+,4.423401360,174
+,4.435011337,156
+,4.446621315,174
+,4.458231292,169
+,4.469841269,169
+,4.481451247,178
+,4.493061224,175
+,4.504671201,193
+,4.516281179,153
+,4.527891156,160
+,4.539501133,176
+,4.551111111,167
+,4.562721088,184
+,4.574331065,163
+,4.585941043,150
+,4.597551020,156
+,4.609160997,182
+,4.620770975,168
+,4.632380952,168
+,4.643990929,152
+,4.655600907,174
+,4.667210884,186
+,4.678820861,168
+,4.690430839,173
+,4.702040816,184
+,4.713650793,169
+,4.725260770,166
+,4.736870748,164
+,4.748480725,193
+,4.760090702,155
+,4.771700680,164
+,4.783310657,181
+,4.794920634,142
+,4.806530612,183
+,4.818140589,181
+,4.829750566,185
+,4.841360544,171
+,4.852970521,184
+,4.864580498,156
+,4.876190476,162
+,4.887800453,182
+,4.899410430,161
+,4.911020408,175
+,4.922630385,168
+,4.934240362,172
+,4.945850340,151
+,4.957460317,176
+,4.969070294,171
+,4.980680272,93
+,4.992290249,0
+,5.003900226,0
+,5.015510204,0
+,5.027120181,0
+,5.038730158,0
+,5.050340136,0
+,5.061950113,0
+,5.073560090,0
+,5.085170068,0
+,5.096780045,0
+,5.108390022,0
+,5.120000000,0
+,5.131609977,0
+,5.143219954,0
+,5.154829931,0
+,5.166439909,0
+,5.178049886,0
+,5.189659863,0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-no-parameters-default-output.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,3 @@
+"./../audio/3clicks8.wav",0.777868480
+,1.648616780
+,2.414875283
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-no-parameters.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,3 @@
+"./../audio/3clicks8.wav",0.777868480
+,1.648616780
+,2.414875283
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-set-parameters.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,14 @@
+"./../audio/3clicks8.wav",0.011609977
+,0.162539682
+,0.290249433
+,0.394739229
+,0.777868481
+,1.648616780
+,2.414875283
+,3.041814059
+,3.134693877
+,3.157913832
+,3.599092970
+,3.831292517
+,4.504671202
+,4.748480725
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-set-sample-rate.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,3 @@
+"./../audio/3clicks8.wav",0.766258503
+,1.648616780
+,2.414875283
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-set-step-and-block-size.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,3 @@
+"./../audio/3clicks8.wav",0.782312925
+,1.650680272
+,2.417346939
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets-start-and-duration.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,1 @@
+"./../audio/3clicks8.wav",2.417959183
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/percussiononsets.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,3 @@
+"./../audio/3clicks8.wav",0.777868480
+,1.648616780
+,2.414875283
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/skeleton-1.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,3 @@
+"./../audio/3clicks8.wav",0.777868480
+,1.648616780
+,2.414875283
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/test-transforms-basic.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+. ../include.sh
+
+infile=$audiopath/3clicks8.wav
+tmpfile1=$mypath/tmp_1_$$
+tmpfile2=$mypath/tmp_2_$$
+
+trap "rm -f $tmpfile1 $tmpfile2" 0
+
+$r --skeleton $percplug > $tmpfile1 2>/dev/null || \
+    fail "Fails to run with --skeleton $percplug"
+
+$r -t $tmpfile1 -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
+    fail "Fails to run with -t $tmpfile1 -w csv --csv-stdout $infile"
+
+csvcompare $tmpfile2 $mypath/expected/skeleton-1.csv || \
+    faildiff "Output mismatch for skeleton-1.csv" $tmpfile2 $mypath/expected/skeleton-1.csv
+
+for suffix in \
+    -no-parameters-default-output \
+    -no-parameters \
+    "" \
+    -start-and-duration \
+    -set-parameters \
+    -set-step-and-block-size \
+    -set-sample-rate \
+    -df-windowtype-default \
+    -df-windowtype-hanning \
+    -df-windowtype-hamming \
+    -df-start-and-duration \
+    -multiple-outputs \
+    -multiple-outputs-start-and-duration \
+    ; do
+
+    for type in xml n3 ; do 
+
+	transform=$mypath/transforms/percussiononsets$suffix.$type
+	expected=$mypath/expected/percussiononsets$suffix.csv
+
+	if [ ! -f $transform ]; then
+	    if [ $type = "xml" ]; then
+		continue # not everything can be expressed in the XML
+			 # format, e.g. the multiple output test can't
+	    fi
+	fi
+
+	test -f $transform || \
+	    fail "Internal error: no transforms file for suffix $suffix (looking for $transform)"
+
+	test -f $expected || \
+	    fail "Internal error: no expected output file for suffix $suffix (looking for $expected)"
+
+	$r -t $transform -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
+	    fail "Fails to run transform $transform"
+
+	csvcompare $tmpfile2 $expected || \
+	    faildiff "Output mismatch for transform $transform" $tmpfile2 $expected
+    done
+done
+
+# Check we can't run with multiple transforms if one or more is missing!
+
+$r -t $mypath/transforms/percussiononsets-set-step-and-block-size.n3 \
+   -t $mypath/transforms/squiggly.n3 \
+   -t $mypath/transforms/percussiononsets-start-and-duration.n3 \
+    -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null && \
+    fail "Incorrectly seems to succeed in running with a missing transform file"
+
+
+# Check we can run with multiple transforms if they're all present
+
+$r -t $mypath/transforms/percussiononsets-set-step-and-block-size.n3 \
+   -t $mypath/transforms/percussiononsets-set-parameters.xml \
+   -t $mypath/transforms/percussiononsets-start-and-duration.n3 \
+    -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
+    fail "Fails to run with multiple transforms"
+
+csvcompare $tmpfile2 $mypath/expected/multiple.csv || \
+    faildiff "Output mismatch for multiple transforms" $tmpfile2 $mypath/expected/multiple.csv
+
+exit 0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-df-start-and-duration.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,25 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:step_size "512";
+ 	vamp:block_size "1024";
+	vamp:parameter_binding :param0 ;
+	vamp:parameter_binding :param1 ;
+	vamp:start "PT2.0S"^^xsd:duration ;
+	vamp:duration "PT2.0S"^^xsd:duration .
+
+:param0 a vamp:ParameterBinding;
+	vamp:parameter [ vamp:identifier "sensitivity" ];
+	vamp:value "40".
+
+:param1 a vamp:ParameterBinding;
+	vamp:parameter examples:percussiononsets_param_threshold;
+	vamp:value "3".
+
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-df-start-and-duration.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,13 @@
+<transform
+    id="vamp:vamp-example-plugins:percussiononsets:detectionfunction"
+    pluginVersion="2"
+    program=""
+    stepSize="512"
+    blockSize="1024"
+    windowType="hanning"
+    startTime="2.000000000"
+    duration="2.000000000"
+    sampleRate="0">
+  <parameter name="sensitivity" value="40"/>
+  <parameter name="threshold" value="3"/>
+</transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-df-windowtype-default.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets;
+	vamp:output examples:percussiononsets_output_detectionfunction.
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-df-windowtype-default.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,12 @@
+<transform
+    id="vamp:vamp-example-plugins:percussiononsets:detectionfunction"
+    pluginVersion="2"
+    program=""
+    stepSize="512"
+    blockSize="1024"
+    startTime="0.000000000"
+    duration="0.000000000"
+    sampleRate="0">
+  <parameter name="sensitivity" value="40"/>
+  <parameter name="threshold" value="3"/>
+</transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-df-windowtype-hamming.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,11 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets;
+	vamp:window_type "hamming" ;
+	vamp:output examples:percussiononsets_output_detectionfunction.
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-df-windowtype-hamming.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,13 @@
+<transform
+    id="vamp:vamp-example-plugins:percussiononsets:detectionfunction"
+    pluginVersion="2"
+    program=""
+    stepSize="512"
+    blockSize="1024"
+    windowType="hamming"
+    startTime="0.000000000"
+    duration="0.000000000"
+    sampleRate="0">
+  <parameter name="sensitivity" value="40"/>
+  <parameter name="threshold" value="3"/>
+</transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-df-windowtype-hanning.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,11 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets;
+	vamp:window_type "hanning" ;
+	vamp:output examples:percussiononsets_output_detectionfunction.
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-df-windowtype-hanning.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,13 @@
+<transform
+    id="vamp:vamp-example-plugins:percussiononsets:detectionfunction"
+    pluginVersion="2"
+    program=""
+    stepSize="512"
+    blockSize="1024"
+    windowType="hanning"
+    startTime="0.000000000"
+    duration="0.000000000"
+    sampleRate="0">
+  <parameter name="sensitivity" value="40"/>
+  <parameter name="threshold" value="3"/>
+</transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-multiple-outputs-start-and-duration.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,20 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets ;
+	vamp:start "PT1.0S"^^xsd:duration ;
+	vamp:duration "PT3.0S"^^xsd:duration .
+
+:transform1 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction ;
+	vamp:start "PT2.0S"^^xsd:duration ;
+	vamp:duration "PT1.0S"^^xsd:duration .
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-multiple-outputs.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,15 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets .
+
+:transform1 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_detectionfunction .
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-no-parameters-default-output.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets.
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-no-parameters-default-output.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,2 @@
+<transform id="vamp:vamp-example-plugins:percussiononsets"/>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-no-parameters.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,11 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets .
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-no-parameters.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,1 @@
+<transform id="vamp:vamp-example-plugins:percussiononsets:onsets"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-set-parameters.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,22 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets ;
+	vamp:step_size "512";
+ 	vamp:block_size "1024";
+	vamp:parameter_binding :param0 ;
+	vamp:parameter_binding :param1 .
+
+:param0 a vamp:ParameterBinding;
+	vamp:parameter [ vamp:identifier "sensitivity" ];
+	vamp:value "60".
+
+:param1 a vamp:ParameterBinding;
+	vamp:parameter examples:percussiononsets_param_threshold;
+	vamp:value "2.6".
+
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-set-parameters.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,7 @@
+<transform
+    id="vamp:vamp-example-plugins:percussiononsets:onsets"
+    stepSize="512"
+    blockSize="1024">
+  <parameter name="sensitivity" value="60"/>
+  <parameter name="threshold" value="2.6"/>
+</transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-set-sample-rate.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,11 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets ;
+	vamp:sample_rate "22050" .
+
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-set-sample-rate.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,4 @@
+<transform
+    id="vamp:vamp-example-plugins:percussiononsets:onsets"
+    sampleRate="22050">
+</transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-set-step-and-block-size.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,11 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets ;
+	vamp:step_size "345";
+ 	vamp:block_size "512".
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-set-step-and-block-size.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,5 @@
+<transform
+    id="vamp:vamp-example-plugins:percussiononsets:onsets"
+    stepSize="345"
+    blockSize="512"
+   />
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-start-and-duration.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,25 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets ;
+	vamp:step_size "512";
+ 	vamp:block_size "1024";
+	vamp:parameter_binding :param0 ;
+	vamp:parameter_binding :param1 ;
+	vamp:start "PT2.0S"^^xsd:duration ;
+	vamp:duration "PT2.0S"^^xsd:duration .
+
+:param0 a vamp:ParameterBinding;
+	vamp:parameter [ vamp:identifier "sensitivity" ];
+	vamp:value "40".
+
+:param1 a vamp:ParameterBinding;
+	vamp:parameter examples:percussiononsets_param_threshold;
+	vamp:value "3".
+
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets-start-and-duration.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,13 @@
+<transform
+    id="vamp:vamp-example-plugins:percussiononsets:onsets"
+    pluginVersion="2"
+    program=""
+    stepSize="512"
+    blockSize="1024"
+    windowType="hanning"
+    startTime="2.000000000"
+    duration="2.000000000"
+    sampleRate="0">
+  <parameter name="sensitivity" value="40"/>
+  <parameter name="threshold" value="3"/>
+</transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets.n3	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,22 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix vamp: <http://purl.org/ontology/vamp/>.
+@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
+@prefix : <#>.
+
+:transform0 a vamp:Transform;
+	vamp:plugin examples:percussiononsets ;
+	vamp:output examples:percussiononsets_output_onsets ;
+	vamp:step_size "512";
+ 	vamp:block_size "1024";
+	vamp:parameter_binding :param0 ;
+	vamp:parameter_binding :param1 .
+
+:param0 a vamp:ParameterBinding;
+	vamp:parameter [ vamp:identifier "sensitivity" ];
+	vamp:value "40".
+
+:param1 a vamp:ParameterBinding;
+	vamp:parameter examples:percussiononsets_param_threshold;
+	vamp:value "3".
+
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/transforms/percussiononsets.xml	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,13 @@
+<transform
+    id="vamp:vamp-example-plugins:percussiononsets:onsets"
+    pluginVersion="2"
+    program=""
+    stepSize="512"
+    blockSize="1024"
+    windowType="hanning"
+    startTime="0.000000000"
+    duration="0.000000000"
+    sampleRate="0">
+  <parameter name="sensitivity" value="40"/>
+  <parameter name="threshold" value="3"/>
+</transform>
--- a/tests/test-vamp-test-plugin.sh	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-mypath=`dirname $0`
-r=$mypath/../sonic-annotator
-
-infile=$mypath/audio/20sec-silence.wav
-testplug=vamp:vamp-test-plugin:vamp-test-plugin
-tmpcsv=$mypath/tmp_1_$$.csv
-
-trap "rm -f $tmpcsv" 0
-
-. test-include.sh
-
-fail() {
-    echo "Test failed: $1"
-    exit 1
-}
-
-for output in instants curve-oss curve-fsr curve-fsr-timed curve-vsr grid-oss grid-fsr notes-regions; do
-    
-    $r -d "$testplug:$output" -w csv --csv-one-file "$tmpcsv" --csv-force "$infile" 2>/dev/null || \
-	fail "Failed to run for plugin $testplug with output $output"
-
-    csvcompare_ignorefirst "$tmpcsv" "$mypath/expected/vamp-test-plugin-$output.csv" || \
-	fail "Output differs from expected for $output"
-
-done
-
-exit 0
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-vamp-test-plugin/expected/vamp-test-plugin-curve-fsr-timed.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+,0.000000000,0,"1 of 10: 0 at 0 snap to 0"
+,0.000000000,0.1,"2 of 10: 0.1 at 0 snap to 0"
+,0.000000000,0.2,"3 of 10: 0.2 at 0.166 snap to 0"
+,0.400000000,0.3,"4 of 10: 0.3 at 0.333 snap to 0.4"
+,2.000000000,0.4,"5 of 10: 0.4 at 2 snap to 2"
+,2.000000000,0.5,"6 of 10: 0.5 at 2 snap to 2"
+,2.000000000,0.6,"7 of 10: 0.6 at 2.166 snap to 2"
+,2.400000000,0.7,"8 of 10: 0.7 at 2.333 snap to 2.4"
+,4.000000000,0.8,"9 of 10: 0.8 at 4 snap to 4"
+,4.000000000,0.9,"10 of 10: 0.9 at 4 snap to 4"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-vamp-test-plugin/expected/vamp-test-plugin-curve-fsr.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+,0.000000000,0,"1 of 10: 0 at 0"
+,0.400000000,0.1,"2 of 10: 0.1 at 0.4"
+,0.800000000,0.2,"3 of 10: 0.2 at 0.8"
+,1.200000000,0.3,"4 of 10: 0.3 at 1.2"
+,1.600000000,0.4,"5 of 10: 0.4 at 1.6"
+,2.000000000,0.5,"6 of 10: 0.5 at 2"
+,2.400000000,0.6,"7 of 10: 0.6 at 2.4"
+,2.800000000,0.7,"8 of 10: 0.7 at 2.8"
+,3.200000000,0.8,"9 of 10: 0.8 at 3.2"
+,3.600000000,0.9,"10 of 10: 0.9 at 3.6"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-vamp-test-plugin/expected/vamp-test-plugin-curve-oss.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,20 @@
+,0.000000000,0,"1 of 20: 0 at 0"
+,0.023219954,0.05,"2 of 20: 0.05 at 0.023"
+,0.046439909,0.1,"3 of 20: 0.1 at 0.046"
+,0.069659863,0.15,"4 of 20: 0.15 at 0.069"
+,0.092879818,0.2,"5 of 20: 0.2 at 0.092"
+,0.116099773,0.25,"6 of 20: 0.25 at 0.116"
+,0.139319727,0.3,"7 of 20: 0.3 at 0.139"
+,0.162539682,0.35,"8 of 20: 0.35 at 0.162"
+,0.185759637,0.4,"9 of 20: 0.4 at 0.185"
+,0.208979591,0.45,"10 of 20: 0.45 at 0.208"
+,0.232199546,0.5,"11 of 20: 0.5 at 0.232"
+,0.255419501,0.55,"12 of 20: 0.55 at 0.255"
+,0.278639455,0.6,"13 of 20: 0.6 at 0.278"
+,0.301859410,0.65,"14 of 20: 0.65 at 0.301"
+,0.325079365,0.7,"15 of 20: 0.7 at 0.325"
+,0.348299319,0.75,"16 of 20: 0.75 at 0.348"
+,0.371519274,0.8,"17 of 20: 0.8 at 0.371"
+,0.394739229,0.85,"18 of 20: 0.85 at 0.394"
+,0.417959183,0.9,"19 of 20: 0.9 at 0.417"
+,0.441179138,0.95,"20 of 20: 0.95 at 0.441"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-vamp-test-plugin/expected/vamp-test-plugin-curve-vsr.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+,0.000000000,0,"1 of 10: 0 at 0"
+,0.750000000,0.1,"2 of 10: 0.1 at 0.75"
+,1.500000000,0.2,"3 of 10: 0.2 at 1.5"
+,2.250000000,0.3,"4 of 10: 0.3 at 2.25"
+,3.000000000,0.4,"5 of 10: 0.4 at 3"
+,3.750000000,0.5,"6 of 10: 0.5 at 3.75"
+,4.500000000,0.6,"7 of 10: 0.6 at 4.5"
+,5.250000000,0.7,"8 of 10: 0.7 at 5.25"
+,6.000000000,0.8,"9 of 10: 0.8 at 6"
+,6.750000000,0.9,"10 of 10: 0.9 at 6.75"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-vamp-test-plugin/expected/vamp-test-plugin-grid-fsr.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+,0.000000000,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,"1 of 10 at 0"
+,0.400000000,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,"2 of 10 at 0.4"
+,0.800000000,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,"3 of 10 at 0.8"
+,1.200000000,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,"4 of 10 at 1.2"
+,1.600000000,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,"5 of 10 at 1.6"
+,2.000000000,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,"6 of 10 at 2"
+,2.400000000,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,"7 of 10 at 2.4"
+,2.800000000,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,"8 of 10 at 2.8"
+,3.200000000,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,"9 of 10 at 3.2"
+,3.600000000,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1,"10 of 10 at 3.6"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-vamp-test-plugin/expected/vamp-test-plugin-grid-oss.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,20 @@
+,0.000000000,0.0666667,0.1,0.133333,0.166667,0.2,0.233333,0.266667,0.3,0.333333,0.366667,"1 of 20 at 0"
+,0.023219954,0.1,0.133333,0.166667,0.2,0.233333,0.266667,0.3,0.333333,0.366667,0.4,"2 of 20 at 0.023"
+,0.046439909,0.133333,0.166667,0.2,0.233333,0.266667,0.3,0.333333,0.366667,0.4,0.433333,"3 of 20 at 0.046"
+,0.069659863,0.166667,0.2,0.233333,0.266667,0.3,0.333333,0.366667,0.4,0.433333,0.466667,"4 of 20 at 0.069"
+,0.092879818,0.2,0.233333,0.266667,0.3,0.333333,0.366667,0.4,0.433333,0.466667,0.5,"5 of 20 at 0.092"
+,0.116099773,0.233333,0.266667,0.3,0.333333,0.366667,0.4,0.433333,0.466667,0.5,0.533333,"6 of 20 at 0.116"
+,0.139319727,0.266667,0.3,0.333333,0.366667,0.4,0.433333,0.466667,0.5,0.533333,0.566667,"7 of 20 at 0.139"
+,0.162539682,0.3,0.333333,0.366667,0.4,0.433333,0.466667,0.5,0.533333,0.566667,0.6,"8 of 20 at 0.162"
+,0.185759637,0.333333,0.366667,0.4,0.433333,0.466667,0.5,0.533333,0.566667,0.6,0.633333,"9 of 20 at 0.185"
+,0.208979591,0.366667,0.4,0.433333,0.466667,0.5,0.533333,0.566667,0.6,0.633333,0.666667,"10 of 20 at 0.208"
+,0.232199546,0.4,0.433333,0.466667,0.5,0.533333,0.566667,0.6,0.633333,0.666667,0.7,"11 of 20 at 0.232"
+,0.255419501,0.433333,0.466667,0.5,0.533333,0.566667,0.6,0.633333,0.666667,0.7,0.733333,"12 of 20 at 0.255"
+,0.278639455,0.466667,0.5,0.533333,0.566667,0.6,0.633333,0.666667,0.7,0.733333,0.766667,"13 of 20 at 0.278"
+,0.301859410,0.5,0.533333,0.566667,0.6,0.633333,0.666667,0.7,0.733333,0.766667,0.8,"14 of 20 at 0.301"
+,0.325079365,0.533333,0.566667,0.6,0.633333,0.666667,0.7,0.733333,0.766667,0.8,0.833333,"15 of 20 at 0.325"
+,0.348299319,0.566667,0.6,0.633333,0.666667,0.7,0.733333,0.766667,0.8,0.833333,0.866667,"16 of 20 at 0.348"
+,0.371519274,0.6,0.633333,0.666667,0.7,0.733333,0.766667,0.8,0.833333,0.866667,0.9,"17 of 20 at 0.371"
+,0.394739229,0.633333,0.666667,0.7,0.733333,0.766667,0.8,0.833333,0.866667,0.9,0.933333,"18 of 20 at 0.394"
+,0.417959183,0.666667,0.7,0.733333,0.766667,0.8,0.833333,0.866667,0.9,0.933333,0.966667,"19 of 20 at 0.417"
+,0.441179138,0.7,0.733333,0.766667,0.8,0.833333,0.866667,0.9,0.933333,0.966667,1,"20 of 20 at 0.441"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-vamp-test-plugin/expected/vamp-test-plugin-instants.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+,0.000000000,"1 of 10 at 0"
+,1.500000000,"2 of 10 at 1.5"
+,3.000000000,"3 of 10 at 3"
+,4.500000000,"4 of 10 at 4.5"
+,6.000000000,"5 of 10 at 6"
+,7.500000000,"6 of 10 at 7.5"
+,9.000000000,"7 of 10 at 9"
+,10.500000000,"8 of 10 at 10.5"
+,12.000000000,"9 of 10 at 12"
+,13.500000000,"10 of 10 at 13.5"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-vamp-test-plugin/expected/vamp-test-plugin-notes-regions.csv	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,10 @@
+,0.000000000,1.750000000,0,"1 of 10: 0 at 0 dur. 1.75"
+,1.000000000,0.500000000,0.1,"2 of 10: 0.1 at 1 dur. 0.5"
+,2.000000000,1.750000000,0.2,"3 of 10: 0.2 at 2 dur. 1.75"
+,3.000000000,0.500000000,0.3,"4 of 10: 0.3 at 3 dur. 0.5"
+,4.000000000,1.750000000,0.4,"5 of 10: 0.4 at 4 dur. 1.75"
+,5.000000000,0.500000000,0.5,"6 of 10: 0.5 at 5 dur. 0.5"
+,6.000000000,1.750000000,0.6,"7 of 10: 0.6 at 6 dur. 1.75"
+,7.000000000,0.500000000,0.7,"8 of 10: 0.7 at 7 dur. 0.5"
+,8.000000000,1.750000000,0.8,"9 of 10: 0.8 at 8 dur. 1.75"
+,9.000000000,0.500000000,0.9,"10 of 10: 0.9 at 9 dur. 0.5"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-vamp-test-plugin/test-vamp-test-plugin.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+. ../include.sh
+
+infile=$audiopath/20sec-silence.wav
+tmpcsv=$mypath/tmp_1_$$.csv
+
+trap "rm -f $tmpcsv" 0
+
+for output in instants curve-oss curve-fsr curve-fsr-timed curve-vsr grid-oss grid-fsr notes-regions; do
+    
+    $r -d "$testplug:$output" -w csv --csv-one-file "$tmpcsv" --csv-force "$infile" 2>/dev/null || \
+	fail "Failed to run for plugin $testplug with output $output"
+
+    csvcompare_ignorefirst "$tmpcsv" "$mypath/expected/vamp-test-plugin-$output.csv" || \
+	fail "Output differs from expected for $output"
+
+done
+
+exit 0
+
--- a/tests/test.sh	Thu May 09 13:55:11 2013 +0100
+++ b/tests/test.sh	Mon Oct 13 10:16:37 2014 +0100
@@ -2,8 +2,6 @@
 
 mypath=`dirname $0`
 
-
-
 for x in \
     supportprogs \
     helpfulflags \
@@ -15,10 +13,11 @@
     rdf-destinations \
     csv-destinations \
     summaries \
+    multiple-audio \
     ; do
 
     echo -n "$x: "
-    if ( cd $mypath ; bash ./test-$x.sh ); then
+    if ( cd $mypath/test-$x ; bash ./test-$x.sh ); then
 	echo test succeeded
     else
 	echo "*** Test FAILED"
--- a/tests/transforms/transforms-as-advertised-percussiononsets-detectionfunction.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets;
-	vamp:output examples:percussiononsets_output_detectionfunction.
-
-
-
--- a/tests/transforms/transforms-as-advertised-percussiononsets-onsets.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets.
-
-
-
--- a/tests/transforms/transforms-audioformat-percussiononsets.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets.
-
-
-
--- a/tests/transforms/transforms-basic-percussiononsets-df-windowtype-default.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets;
-	vamp:output examples:percussiononsets_output_detectionfunction.
-
-
--- a/tests/transforms/transforms-basic-percussiononsets-df-windowtype-default.xml	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<transform
-    id="vamp:vamp-example-plugins:percussiononsets:detectionfunction"
-    pluginVersion="2"
-    program=""
-    stepSize="512"
-    blockSize="1024"
-    startTime="0.000000000"
-    duration="0.000000000"
-    sampleRate="0">
-  <parameter name="sensitivity" value="40"/>
-  <parameter name="threshold" value="3"/>
-</transform>
--- a/tests/transforms/transforms-basic-percussiononsets-df-windowtype-hamming.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets;
-	vamp:window_type "hamming" ;
-	vamp:output examples:percussiononsets_output_detectionfunction.
-
-
--- a/tests/transforms/transforms-basic-percussiononsets-df-windowtype-hamming.xml	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<transform
-    id="vamp:vamp-example-plugins:percussiononsets:detectionfunction"
-    pluginVersion="2"
-    program=""
-    stepSize="512"
-    blockSize="1024"
-    windowType="hamming"
-    startTime="0.000000000"
-    duration="0.000000000"
-    sampleRate="0">
-  <parameter name="sensitivity" value="40"/>
-  <parameter name="threshold" value="3"/>
-</transform>
--- a/tests/transforms/transforms-basic-percussiononsets-df-windowtype-hanning.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets;
-	vamp:window_type "hanning" ;
-	vamp:output examples:percussiononsets_output_detectionfunction.
-
-
--- a/tests/transforms/transforms-basic-percussiononsets-df-windowtype-hanning.xml	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<transform
-    id="vamp:vamp-example-plugins:percussiononsets:detectionfunction"
-    pluginVersion="2"
-    program=""
-    stepSize="512"
-    blockSize="1024"
-    windowType="hanning"
-    startTime="0.000000000"
-    duration="0.000000000"
-    sampleRate="0">
-  <parameter name="sensitivity" value="40"/>
-  <parameter name="threshold" value="3"/>
-</transform>
--- a/tests/transforms/transforms-basic-percussiononsets-multiple-outputs.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_onsets .
-
-:transform1 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_detectionfunction .
-
-
-
--- a/tests/transforms/transforms-basic-percussiononsets-no-parameters-default-output.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets.
-
-
-
--- a/tests/transforms/transforms-basic-percussiononsets-no-parameters-default-output.xml	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<transform id="vamp:vamp-example-plugins:percussiononsets"/>
-
--- a/tests/transforms/transforms-basic-percussiononsets-no-parameters.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_onsets .
-
-
-
--- a/tests/transforms/transforms-basic-percussiononsets-no-parameters.xml	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<transform id="vamp:vamp-example-plugins:percussiononsets:onsets"/>
--- a/tests/transforms/transforms-basic-percussiononsets-set-parameters.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_onsets ;
-	vamp:step_size "512";
- 	vamp:block_size "1024";
-	vamp:parameter_binding :param0 ;
-	vamp:parameter_binding :param1 .
-
-:param0 a vamp:ParameterBinding;
-	vamp:parameter [ vamp:identifier "sensitivity" ];
-	vamp:value "60".
-
-:param1 a vamp:ParameterBinding;
-	vamp:parameter examples:percussiononsets_param_threshold;
-	vamp:value "2.6".
-
- 
--- a/tests/transforms/transforms-basic-percussiononsets-set-parameters.xml	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<transform
-    id="vamp:vamp-example-plugins:percussiononsets:onsets"
-    stepSize="512"
-    blockSize="1024">
-  <parameter name="sensitivity" value="60"/>
-  <parameter name="threshold" value="2.6"/>
-</transform>
--- a/tests/transforms/transforms-basic-percussiononsets-set-sample-rate.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_onsets ;
-	vamp:sample_rate "22050" .
-
- 
--- a/tests/transforms/transforms-basic-percussiononsets-set-sample-rate.xml	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<transform
-    id="vamp:vamp-example-plugins:percussiononsets:onsets"
-    sampleRate="22050">
-</transform>
--- a/tests/transforms/transforms-basic-percussiononsets-set-step-and-block-size.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_onsets ;
-	vamp:step_size "345";
- 	vamp:block_size "512".
- 
--- a/tests/transforms/transforms-basic-percussiononsets-set-step-and-block-size.xml	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<transform
-    id="vamp:vamp-example-plugins:percussiononsets:onsets"
-    stepSize="345"
-    blockSize="512"
-   />
--- a/tests/transforms/transforms-basic-percussiononsets.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_onsets ;
-	vamp:step_size "512";
- 	vamp:block_size "1024";
-	vamp:parameter_binding :param0 ;
-	vamp:parameter_binding :param1 .
-
-:param0 a vamp:ParameterBinding;
-	vamp:parameter [ vamp:identifier "sensitivity" ];
-	vamp:value "40".
-
-:param1 a vamp:ParameterBinding;
-	vamp:parameter examples:percussiononsets_param_threshold;
-	vamp:value "3".
-
- 
--- a/tests/transforms/transforms-basic-percussiononsets.xml	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<transform
-    id="vamp:vamp-example-plugins:percussiononsets:onsets"
-    pluginVersion="2"
-    program=""
-    stepSize="512"
-    blockSize="1024"
-    windowType="hanning"
-    startTime="0.000000000"
-    duration="0.000000000"
-    sampleRate="0">
-  <parameter name="sensitivity" value="40"/>
-  <parameter name="threshold" value="3"/>
-</transform>
--- a/tests/transforms/transforms-nosummaries-percussiononsets-detectionfunction.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_detectionfunction .
- 
--- a/tests/transforms/transforms-rdf-writer-percussiononsets-detectionfunction.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_detectionfunction .
-
-
-
--- a/tests/transforms/transforms-rdf-writer-percussiononsets-onsets.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets.
-
-
-
--- a/tests/transforms/transforms-summaries-percussiononsets-detectionfunction.n3	Thu May 09 13:55:11 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix vamp: <http://purl.org/ontology/vamp/>.
-@prefix examples: <http://vamp-plugins.org/rdf/plugins/vamp-example-plugins#>.
-@prefix : <#>.
-
-:transform0 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_detectionfunction ;
-	vamp:summary_type "mean" .
-
-:transform1 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_detectionfunction ;
-	vamp:summary_type "median" .
-
-:transform2 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_onsets .
-
-:transform3 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_detectionfunction ;
-	vamp:summary_type "mode" .
-
-:transform4 a vamp:Transform;
-	vamp:plugin examples:percussiononsets ;
-	vamp:output examples:percussiononsets_output_detectionfunction ;
-	vamp:step_size 2048 ;
-	vamp:block_size 4096 ;
-	vamp:summary_type "mean" .
-
- 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/version.h	Mon Oct 13 10:16:37 2014 +0100
@@ -0,0 +1,1 @@
+#define RUNNER_VERSION "1.1-hg"