changeset 204:1f8fef5c6ea2

Add digits option to JAMS output, for number of sig figs
author Chris Cannam
date Tue, 03 Nov 2015 11:36:24 +0000
parents 08d492f861e9
children 7a287e5d5df6
files .hgsubstate runner/JAMSFeatureWriter.cpp runner/JAMSFeatureWriter.h tests/include.sh tests/test-jams-writer/expected/af-0.json tests/test-jams-writer/expected/af-2.json tests/test-jams-writer/expected/af-6.json tests/test-jams-writer/expected/curve-fsr.json tests/test-jams-writer/expected/grid-oss.json tests/test-jams-writer/expected/instants.json tests/test-jams-writer/expected/notes-regions.json tests/test-jams-writer/test-jams-writer.sh tests/test-jams-writer/transforms/af.n3 tests/test-jams-writer/transforms/detectionfunction.n3 version.h
diffstat 15 files changed, 966 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Tue Nov 03 11:36:00 2015 +0000
+++ b/.hgsubstate	Tue Nov 03 11:36:24 2015 +0000
@@ -1,4 +1,4 @@
 d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay
 55ece8862b6d3a54aad271a53f9c1615e5d3bcf8 sv-dependency-builds
-1cc96e03a903c36f2f9496532fff616c85a22b80 svcore
+c7f1300dbf64bcd7ba790ad36b2b53bbb3f84123 svcore
 632d90c185ecc8655f7a85ba58dc568351449dfd vamp-plugin-sdk
--- a/runner/JAMSFeatureWriter.cpp	Tue Nov 03 11:36:00 2015 +0000
+++ b/runner/JAMSFeatureWriter.cpp	Tue Nov 03 11:36:24 2015 +0000
@@ -36,7 +36,8 @@
     m_network(false),
     m_networkRetrieved(false),
     m_n(1),
-    m_m(1)
+    m_m(1),
+    m_digits(6)
 {
 }
 
@@ -56,6 +57,11 @@
     ParameterList pl = FileFeatureWriter::getSupportedParameters();
     Parameter p;
 
+    p.name = "digits";
+    p.description = "Specify the number of significant digits to use when printing transform outputs. Outputs are represented internally using single-precision floating-point, so digits beyond the 8th or 9th place are usually meaningless. The default is 6.";
+    p.hasArg = true;
+    pl.push_back(p);
+
     p.name = "network";
     p.description = "Attempt to retrieve RDF descriptions of plugins from network, if not available locally.";
     p.hasArg = false;
@@ -73,6 +79,14 @@
          i != params.end(); ++i) {
         if (i->first == "network") {
             m_network = true;
+        } else if (i->first == "digits") {
+            int digits = atoi(i->second.c_str());
+            if (digits <= 0 || digits > 100) {
+                cerr << "JAMSFeatureWriter: ERROR: Invalid or out-of-range value for number of significant digits: " << i->second << endl;
+                cerr << "JAMSFeatureWriter: NOTE: Continuing with default settings" << endl;
+            } else {
+                m_digits = digits;
+            }
         }
     }
 }
@@ -125,17 +139,19 @@
 	
         Plugin::Feature f(features[i]);
 
+        QString timestr = f.timestamp.toString().c_str();
+        timestr.replace(QRegExp("^ +"), "");
+
         if (f.hasDuration) {
+
+            QString endstr = (f.timestamp + f.duration).toString().c_str();
+            endstr.replace(QRegExp("^ +"), "");
+        
             d += QString
                 ("\"start\": { \"value\": %1 }, "
-                 "\"end\": { \"value\": %2 }")
-                .arg(realTime2Sec(f.timestamp))
-                .arg(realTime2Sec
-                     (f.timestamp +
-                      (f.hasDuration ? f.duration : Vamp::RealTime::zeroTime)));
+                 "\"end\": { \"value\": %2 }").arg(timestr).arg(endstr);
         } else {
-            d += QString("\"time\": { \"value\": %1 }")
-                .arg(realTime2Sec(f.timestamp));
+            d += QString("\"time\": { \"value\": %1 }").arg(timestr);
         }
         
         if (f.label != "") {
@@ -151,7 +167,7 @@
                 } else if (isinf(f.values[j])) {
                     d += "\"Inf\"";
                 } else {
-                    d += QString("%1").arg(f.values[j]);
+                    d += QString("%1").arg(f.values[j], 0, 'g', m_digits);
                 }
                 if (j + 1 < int(f.values.size())) {
                     d += ", ";
@@ -439,11 +455,13 @@
     }
 
     if (t.getStartTime() != RealTime::zeroTime) {
-        json += ntpl.arg("start").arg(t.getStartTime().toDouble());
+        json += ntpl.arg("start")
+            .arg(t.getStartTime().toDouble(), 0, 'g', 9);
     }
 
     if (t.getDuration() != RealTime::zeroTime) {
-        json += ntpl.arg("duration").arg(t.getDuration().toDouble());
+        json += ntpl.arg("duration")
+            .arg(t.getDuration().toDouble(), 0, 'g', 9);
     }
 
     if (t.getSampleRate() != 0) {
@@ -460,7 +478,9 @@
             }
             QString name = i->first;
             float value = i->second;
-            json += QString("        \"%1\": %2").arg(name).arg(value);
+            json += QString("        \"%1\": %2")
+                .arg(name)
+                .arg(value, 0, 'g', 8); // parameter values always to high precision
         }
         json += QString("\n      },\n");
     }
--- a/runner/JAMSFeatureWriter.h	Tue Nov 03 11:36:00 2015 +0000
+++ b/runner/JAMSFeatureWriter.h	Tue Nov 03 11:36:24 2015 +0000
@@ -100,6 +100,7 @@
     bool m_networkRetrieved;
     int m_n;
     int m_m;
+    int m_digits;
 };
 
 #endif
--- a/tests/include.sh	Tue Nov 03 11:36:00 2015 +0000
+++ b/tests/include.sh	Tue Nov 03 11:36:24 2015 +0000
@@ -13,8 +13,8 @@
     ;;
 esac
 
-version=1.2
-nextversion=1.3
+version=1.3
+nextversion=1.4
 
 testdir=$mypath/..
 r=$testdir/../sonic-annotator
@@ -59,6 +59,12 @@
     return $rv
 }
 
+jsoncompare() {
+    a="$1"
+    b="$2"
+    cmp -s "$a" "$b"
+}
+
 faildiff() {
     echo "Test failed: $1"
     if [ -n "$2" -a -n "$3" ]; then
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-jams-writer/expected/af-0.json	Tue Nov 03 11:36:24 2015 +0000
@@ -0,0 +1,238 @@
+{
+"file_metadata": {
+  "filename": "3clicks8.wav"
+},
+"unknown": [
+{ 
+  "annotation_metadata": {
+    "annotation_tools": "Sonic Annotator v1.3",
+    "data_source": "Automatic feature extraction",
+    "annotator": {
+      "plugin_id": "vamp:vamp-example-plugins:amplitudefollower",
+      "output_id": "amplitude",
+      "step_size": 1024,
+      "block_size": 1024,
+      "sample_rate": 44100,
+      "transform_id": "vamp:vamp-example-plugins:amplitudefollower:amplitude"
+    }
+  },
+  "data": [
+    { "time": { "value": 0.000000000 }, "value": [ 0.00359596 ] },
+    { "time": { "value": 0.023219954 }, "value": [ 0.00351864 ] },
+    { "time": { "value": 0.046439909 }, "value": [ 0.00357167 ] },
+    { "time": { "value": 0.069659863 }, "value": [ 0.00358918 ] },
+    { "time": { "value": 0.092879818 }, "value": [ 0.00359586 ] },
+    { "time": { "value": 0.116099773 }, "value": [ 0.00352171 ] },
+    { "time": { "value": 0.139319727 }, "value": [ 0.00353074 ] },
+    { "time": { "value": 0.162539682 }, "value": [ 0.00354993 ] },
+    { "time": { "value": 0.185759637 }, "value": [ 0.00354264 ] },
+    { "time": { "value": 0.208979591 }, "value": [ 0.00352689 ] },
+    { "time": { "value": 0.232199546 }, "value": [ 0.00360165 ] },
+    { "time": { "value": 0.255419501 }, "value": [ 0.00361172 ] },
+    { "time": { "value": 0.278639455 }, "value": [ 0.00361564 ] },
+    { "time": { "value": 0.301859410 }, "value": [ 0.0035339 ] },
+    { "time": { "value": 0.325079365 }, "value": [ 0.00361025 ] },
+    { "time": { "value": 0.348299319 }, "value": [ 0.00352643 ] },
+    { "time": { "value": 0.371519274 }, "value": [ 0.00355937 ] },
+    { "time": { "value": 0.394739229 }, "value": [ 0.00353683 ] },
+    { "time": { "value": 0.417959183 }, "value": [ 0.00358946 ] },
+    { "time": { "value": 0.441179138 }, "value": [ 0.00363629 ] },
+    { "time": { "value": 0.464399092 }, "value": [ 0.00354152 ] },
+    { "time": { "value": 0.487619047 }, "value": [ 0.00348666 ] },
+    { "time": { "value": 0.510839002 }, "value": [ 0.00352516 ] },
+    { "time": { "value": 0.534058956 }, "value": [ 0.00352261 ] },
+    { "time": { "value": 0.557278911 }, "value": [ 0.00350301 ] },
+    { "time": { "value": 0.580498866 }, "value": [ 0.00352414 ] },
+    { "time": { "value": 0.603718820 }, "value": [ 0.00351352 ] },
+    { "time": { "value": 0.626938775 }, "value": [ 0.00345411 ] },
+    { "time": { "value": 0.650158730 }, "value": [ 0.00363914 ] },
+    { "time": { "value": 0.673378684 }, "value": [ 0.00370925 ] },
+    { "time": { "value": 0.696598639 }, "value": [ 0.00348075 ] },
+    { "time": { "value": 0.719818594 }, "value": [ 0.0034814 ] },
+    { "time": { "value": 0.743038548 }, "value": [ 0.00362525 ] },
+    { "time": { "value": 0.766258503 }, "value": [ 0.0146151 ] },
+    { "time": { "value": 0.789478458 }, "value": [ 0.00458446 ] },
+    { "time": { "value": 0.812698412 }, "value": [ 0.00342316 ] },
+    { "time": { "value": 0.835918367 }, "value": [ 0.0036135 ] },
+    { "time": { "value": 0.859138321 }, "value": [ 0.00352045 ] },
+    { "time": { "value": 0.882358276 }, "value": [ 0.0036266 ] },
+    { "time": { "value": 0.905578231 }, "value": [ 0.00357805 ] },
+    { "time": { "value": 0.928798185 }, "value": [ 0.00355937 ] },
+    { "time": { "value": 0.952018140 }, "value": [ 0.00350579 ] },
+    { "time": { "value": 0.975238095 }, "value": [ 0.00359969 ] },
+    { "time": { "value": 0.998458049 }, "value": [ 0.00352854 ] },
+    { "time": { "value": 1.021678004 }, "value": [ 0.00353486 ] },
+    { "time": { "value": 1.044897959 }, "value": [ 0.00355259 ] },
+    { "time": { "value": 1.068117913 }, "value": [ 0.00347951 ] },
+    { "time": { "value": 1.091337868 }, "value": [ 0.00361734 ] },
+    { "time": { "value": 1.114557823 }, "value": [ 0.00351861 ] },
+    { "time": { "value": 1.137777777 }, "value": [ 0.00351437 ] },
+    { "time": { "value": 1.160997732 }, "value": [ 0.00352971 ] },
+    { "time": { "value": 1.184217687 }, "value": [ 0.00360414 ] },
+    { "time": { "value": 1.207437641 }, "value": [ 0.0034343 ] },
+    { "time": { "value": 1.230657596 }, "value": [ 0.00358201 ] },
+    { "time": { "value": 1.253877551 }, "value": [ 0.00361252 ] },
+    { "time": { "value": 1.277097505 }, "value": [ 0.00361165 ] },
+    { "time": { "value": 1.300317460 }, "value": [ 0.00355763 ] },
+    { "time": { "value": 1.323537414 }, "value": [ 0.00353226 ] },
+    { "time": { "value": 1.346757369 }, "value": [ 0.00349109 ] },
+    { "time": { "value": 1.369977324 }, "value": [ 0.00352628 ] },
+    { "time": { "value": 1.393197278 }, "value": [ 0.00348415 ] },
+    { "time": { "value": 1.416417233 }, "value": [ 0.00354576 ] },
+    { "time": { "value": 1.439637188 }, "value": [ 0.00369414 ] },
+    { "time": { "value": 1.462857142 }, "value": [ 0.00367139 ] },
+    { "time": { "value": 1.486077097 }, "value": [ 0.00342798 ] },
+    { "time": { "value": 1.509297052 }, "value": [ 0.00338209 ] },
+    { "time": { "value": 1.532517006 }, "value": [ 0.00351023 ] },
+    { "time": { "value": 1.555736961 }, "value": [ 0.00346643 ] },
+    { "time": { "value": 1.578956916 }, "value": [ 0.00346979 ] },
+    { "time": { "value": 1.602176870 }, "value": [ 0.00348269 ] },
+    { "time": { "value": 1.625396825 }, "value": [ 0.00348368 ] },
+    { "time": { "value": 1.648616780 }, "value": [ 0.01162 ] },
+    { "time": { "value": 1.671836734 }, "value": [ 0.00359211 ] },
+    { "time": { "value": 1.695056689 }, "value": [ 0.00360249 ] },
+    { "time": { "value": 1.718276643 }, "value": [ 0.00352957 ] },
+    { "time": { "value": 1.741496598 }, "value": [ 0.00349559 ] },
+    { "time": { "value": 1.764716553 }, "value": [ 0.00344387 ] },
+    { "time": { "value": 1.787936507 }, "value": [ 0.00352666 ] },
+    { "time": { "value": 1.811156462 }, "value": [ 0.0035248 ] },
+    { "time": { "value": 1.834376417 }, "value": [ 0.00353289 ] },
+    { "time": { "value": 1.857596371 }, "value": [ 0.00353361 ] },
+    { "time": { "value": 1.880816326 }, "value": [ 0.00348838 ] },
+    { "time": { "value": 1.904036281 }, "value": [ 0.00355124 ] },
+    { "time": { "value": 1.927256235 }, "value": [ 0.00349487 ] },
+    { "time": { "value": 1.950476190 }, "value": [ 0.0036614 ] },
+    { "time": { "value": 1.973696145 }, "value": [ 0.00358802 ] },
+    { "time": { "value": 1.996916099 }, "value": [ 0.00351078 ] },
+    { "time": { "value": 2.020136054 }, "value": [ 0.00351788 ] },
+    { "time": { "value": 2.043356009 }, "value": [ 0.00345998 ] },
+    { "time": { "value": 2.066575963 }, "value": [ 0.00359541 ] },
+    { "time": { "value": 2.089795918 }, "value": [ 0.00363803 ] },
+    { "time": { "value": 2.113015873 }, "value": [ 0.00341127 ] },
+    { "time": { "value": 2.136235827 }, "value": [ 0.00358579 ] },
+    { "time": { "value": 2.159455782 }, "value": [ 0.00358391 ] },
+    { "time": { "value": 2.182675736 }, "value": [ 0.00349291 ] },
+    { "time": { "value": 2.205895691 }, "value": [ 0.00350593 ] },
+    { "time": { "value": 2.229115646 }, "value": [ 0.00347529 ] },
+    { "time": { "value": 2.252335600 }, "value": [ 0.00358021 ] },
+    { "time": { "value": 2.275555555 }, "value": [ 0.00353051 ] },
+    { "time": { "value": 2.298775510 }, "value": [ 0.00360463 ] },
+    { "time": { "value": 2.321995464 }, "value": [ 0.00357421 ] },
+    { "time": { "value": 2.345215419 }, "value": [ 0.00343617 ] },
+    { "time": { "value": 2.368435374 }, "value": [ 0.00367464 ] },
+    { "time": { "value": 2.391655328 }, "value": [ 0.00623882 ] },
+    { "time": { "value": 2.414875283 }, "value": [ 0.0139992 ] },
+    { "time": { "value": 2.438095238 }, "value": [ 0.00347958 ] },
+    { "time": { "value": 2.461315192 }, "value": [ 0.00348231 ] },
+    { "time": { "value": 2.484535147 }, "value": [ 0.0035482 ] },
+    { "time": { "value": 2.507755102 }, "value": [ 0.00350744 ] },
+    { "time": { "value": 2.530975056 }, "value": [ 0.00342298 ] },
+    { "time": { "value": 2.554195011 }, "value": [ 0.00366419 ] },
+    { "time": { "value": 2.577414965 }, "value": [ 0.0034377 ] },
+    { "time": { "value": 2.600634920 }, "value": [ 0.00356318 ] },
+    { "time": { "value": 2.623854875 }, "value": [ 0.00354368 ] },
+    { "time": { "value": 2.647074829 }, "value": [ 0.00360324 ] },
+    { "time": { "value": 2.670294784 }, "value": [ 0.00354322 ] },
+    { "time": { "value": 2.693514739 }, "value": [ 0.0035675 ] },
+    { "time": { "value": 2.716734693 }, "value": [ 0.00346242 ] },
+    { "time": { "value": 2.739954648 }, "value": [ 0.00348647 ] },
+    { "time": { "value": 2.763174603 }, "value": [ 0.0034772 ] },
+    { "time": { "value": 2.786394557 }, "value": [ 0.00344762 ] },
+    { "time": { "value": 2.809614512 }, "value": [ 0.00352104 ] },
+    { "time": { "value": 2.832834467 }, "value": [ 0.00355933 ] },
+    { "time": { "value": 2.856054421 }, "value": [ 0.00340756 ] },
+    { "time": { "value": 2.879274376 }, "value": [ 0.00349975 ] },
+    { "time": { "value": 2.902494331 }, "value": [ 0.00348265 ] },
+    { "time": { "value": 2.925714285 }, "value": [ 0.00354504 ] },
+    { "time": { "value": 2.948934240 }, "value": [ 0.00349364 ] },
+    { "time": { "value": 2.972154195 }, "value": [ 0.00349891 ] },
+    { "time": { "value": 2.995374149 }, "value": [ 0.00356645 ] },
+    { "time": { "value": 3.018594104 }, "value": [ 0.00353567 ] },
+    { "time": { "value": 3.041814058 }, "value": [ 0.00360318 ] },
+    { "time": { "value": 3.065034013 }, "value": [ 0.00359901 ] },
+    { "time": { "value": 3.088253968 }, "value": [ 0.00349811 ] },
+    { "time": { "value": 3.111473922 }, "value": [ 0.00358849 ] },
+    { "time": { "value": 3.134693877 }, "value": [ 0.00359128 ] },
+    { "time": { "value": 3.157913832 }, "value": [ 0.00352523 ] },
+    { "time": { "value": 3.181133786 }, "value": [ 0.00360644 ] },
+    { "time": { "value": 3.204353741 }, "value": [ 0.00351975 ] },
+    { "time": { "value": 3.227573696 }, "value": [ 0.00360961 ] },
+    { "time": { "value": 3.250793650 }, "value": [ 0.00353225 ] },
+    { "time": { "value": 3.274013605 }, "value": [ 0.00356697 ] },
+    { "time": { "value": 3.297233560 }, "value": [ 0.00342544 ] },
+    { "time": { "value": 3.320453514 }, "value": [ 0.00356122 ] },
+    { "time": { "value": 3.343673469 }, "value": [ 0.00357135 ] },
+    { "time": { "value": 3.366893424 }, "value": [ 0.00352669 ] },
+    { "time": { "value": 3.390113378 }, "value": [ 0.00359497 ] },
+    { "time": { "value": 3.413333333 }, "value": [ 0.00357022 ] },
+    { "time": { "value": 3.436553287 }, "value": [ 0.00350066 ] },
+    { "time": { "value": 3.459773242 }, "value": [ 0.00349705 ] },
+    { "time": { "value": 3.482993197 }, "value": [ 0.00350598 ] },
+    { "time": { "value": 3.506213151 }, "value": [ 0.00357775 ] },
+    { "time": { "value": 3.529433106 }, "value": [ 0.00352816 ] },
+    { "time": { "value": 3.552653061 }, "value": [ 0.00358455 ] },
+    { "time": { "value": 3.575873015 }, "value": [ 0.00348071 ] },
+    { "time": { "value": 3.599092970 }, "value": [ 0.00355185 ] },
+    { "time": { "value": 3.622312925 }, "value": [ 0.00350845 ] },
+    { "time": { "value": 3.645532879 }, "value": [ 0.00360378 ] },
+    { "time": { "value": 3.668752834 }, "value": [ 0.00333629 ] },
+    { "time": { "value": 3.691972789 }, "value": [ 0.00341339 ] },
+    { "time": { "value": 3.715192743 }, "value": [ 0.00345791 ] },
+    { "time": { "value": 3.738412698 }, "value": [ 0.00348351 ] },
+    { "time": { "value": 3.761632653 }, "value": [ 0.00349349 ] },
+    { "time": { "value": 3.784852607 }, "value": [ 0.00354578 ] },
+    { "time": { "value": 3.808072562 }, "value": [ 0.00363189 ] },
+    { "time": { "value": 3.831292517 }, "value": [ 0.00352206 ] },
+    { "time": { "value": 3.854512471 }, "value": [ 0.00369021 ] },
+    { "time": { "value": 3.877732426 }, "value": [ 0.00351326 ] },
+    { "time": { "value": 3.900952380 }, "value": [ 0.00356962 ] },
+    { "time": { "value": 3.924172335 }, "value": [ 0.00357592 ] },
+    { "time": { "value": 3.947392290 }, "value": [ 0.00349988 ] },
+    { "time": { "value": 3.970612244 }, "value": [ 0.00349944 ] },
+    { "time": { "value": 3.993832199 }, "value": [ 0.00355037 ] },
+    { "time": { "value": 4.017052154 }, "value": [ 0.00360133 ] },
+    { "time": { "value": 4.040272108 }, "value": [ 0.00354759 ] },
+    { "time": { "value": 4.063492063 }, "value": [ 0.00354953 ] },
+    { "time": { "value": 4.086712018 }, "value": [ 0.0035587 ] },
+    { "time": { "value": 4.109931972 }, "value": [ 0.00364969 ] },
+    { "time": { "value": 4.133151927 }, "value": [ 0.00345758 ] },
+    { "time": { "value": 4.156371882 }, "value": [ 0.00347695 ] },
+    { "time": { "value": 4.179591836 }, "value": [ 0.00359545 ] },
+    { "time": { "value": 4.202811791 }, "value": [ 0.00353286 ] },
+    { "time": { "value": 4.226031746 }, "value": [ 0.00366958 ] },
+    { "time": { "value": 4.249251700 }, "value": [ 0.00350838 ] },
+    { "time": { "value": 4.272471655 }, "value": [ 0.00353147 ] },
+    { "time": { "value": 4.295691609 }, "value": [ 0.0036185 ] },
+    { "time": { "value": 4.318911564 }, "value": [ 0.00349132 ] },
+    { "time": { "value": 4.342131519 }, "value": [ 0.00353897 ] },
+    { "time": { "value": 4.365351473 }, "value": [ 0.00347904 ] },
+    { "time": { "value": 4.388571428 }, "value": [ 0.00348759 ] },
+    { "time": { "value": 4.411791383 }, "value": [ 0.00358541 ] },
+    { "time": { "value": 4.435011337 }, "value": [ 0.00349229 ] },
+    { "time": { "value": 4.458231292 }, "value": [ 0.00357759 ] },
+    { "time": { "value": 4.481451247 }, "value": [ 0.00355427 ] },
+    { "time": { "value": 4.504671201 }, "value": [ 0.00355063 ] },
+    { "time": { "value": 4.527891156 }, "value": [ 0.00358087 ] },
+    { "time": { "value": 4.551111111 }, "value": [ 0.00350815 ] },
+    { "time": { "value": 4.574331065 }, "value": [ 0.00353843 ] },
+    { "time": { "value": 4.597551020 }, "value": [ 0.00354201 ] },
+    { "time": { "value": 4.620770975 }, "value": [ 0.00350497 ] },
+    { "time": { "value": 4.643990929 }, "value": [ 0.00354671 ] },
+    { "time": { "value": 4.667210884 }, "value": [ 0.00353596 ] },
+    { "time": { "value": 4.690430839 }, "value": [ 0.00347371 ] },
+    { "time": { "value": 4.713650793 }, "value": [ 0.0035368 ] },
+    { "time": { "value": 4.736870748 }, "value": [ 0.00360017 ] },
+    { "time": { "value": 4.760090702 }, "value": [ 0.00352821 ] },
+    { "time": { "value": 4.783310657 }, "value": [ 0.00359332 ] },
+    { "time": { "value": 4.806530612 }, "value": [ 0.00353742 ] },
+    { "time": { "value": 4.829750566 }, "value": [ 0.00353795 ] },
+    { "time": { "value": 4.852970521 }, "value": [ 0.00348792 ] },
+    { "time": { "value": 4.876190476 }, "value": [ 0.0034639 ] },
+    { "time": { "value": 4.899410430 }, "value": [ 0.0036387 ] },
+    { "time": { "value": 4.922630385 }, "value": [ 0.00354102 ] },
+    { "time": { "value": 4.945850340 }, "value": [ 0.00351475 ] },
+    { "time": { "value": 4.969070294 }, "value": [ 0.00356904 ] }
+  ]
+}
+]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-jams-writer/expected/af-2.json	Tue Nov 03 11:36:24 2015 +0000
@@ -0,0 +1,238 @@
+{
+"file_metadata": {
+  "filename": "3clicks8.wav"
+},
+"unknown": [
+{ 
+  "annotation_metadata": {
+    "annotation_tools": "Sonic Annotator v1.3",
+    "data_source": "Automatic feature extraction",
+    "annotator": {
+      "plugin_id": "vamp:vamp-example-plugins:amplitudefollower",
+      "output_id": "amplitude",
+      "step_size": 1024,
+      "block_size": 1024,
+      "sample_rate": 44100,
+      "transform_id": "vamp:vamp-example-plugins:amplitudefollower:amplitude"
+    }
+  },
+  "data": [
+    { "time": { "value": 0.000000000 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.023219954 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.046439909 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.069659863 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.092879818 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.116099773 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.139319727 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.162539682 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.185759637 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.208979591 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.232199546 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.255419501 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.278639455 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.301859410 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.325079365 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.348299319 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.371519274 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.394739229 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.417959183 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.441179138 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.464399092 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.487619047 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.510839002 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.534058956 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.557278911 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.580498866 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.603718820 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.626938775 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.650158730 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.673378684 }, "value": [ 0.0037 ] },
+    { "time": { "value": 0.696598639 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.719818594 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.743038548 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.766258503 }, "value": [ 0.015 ] },
+    { "time": { "value": 0.789478458 }, "value": [ 0.0046 ] },
+    { "time": { "value": 0.812698412 }, "value": [ 0.0034 ] },
+    { "time": { "value": 0.835918367 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.859138321 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.882358276 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.905578231 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.928798185 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.952018140 }, "value": [ 0.0035 ] },
+    { "time": { "value": 0.975238095 }, "value": [ 0.0036 ] },
+    { "time": { "value": 0.998458049 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.021678004 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.044897959 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.068117913 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.091337868 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.114557823 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.137777777 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.160997732 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.184217687 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.207437641 }, "value": [ 0.0034 ] },
+    { "time": { "value": 1.230657596 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.253877551 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.277097505 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.300317460 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.323537414 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.346757369 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.369977324 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.393197278 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.416417233 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.439637188 }, "value": [ 0.0037 ] },
+    { "time": { "value": 1.462857142 }, "value": [ 0.0037 ] },
+    { "time": { "value": 1.486077097 }, "value": [ 0.0034 ] },
+    { "time": { "value": 1.509297052 }, "value": [ 0.0034 ] },
+    { "time": { "value": 1.532517006 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.555736961 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.578956916 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.602176870 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.625396825 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.648616780 }, "value": [ 0.012 ] },
+    { "time": { "value": 1.671836734 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.695056689 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.718276643 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.741496598 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.764716553 }, "value": [ 0.0034 ] },
+    { "time": { "value": 1.787936507 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.811156462 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.834376417 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.857596371 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.880816326 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.904036281 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.927256235 }, "value": [ 0.0035 ] },
+    { "time": { "value": 1.950476190 }, "value": [ 0.0037 ] },
+    { "time": { "value": 1.973696145 }, "value": [ 0.0036 ] },
+    { "time": { "value": 1.996916099 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.020136054 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.043356009 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.066575963 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.089795918 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.113015873 }, "value": [ 0.0034 ] },
+    { "time": { "value": 2.136235827 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.159455782 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.182675736 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.205895691 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.229115646 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.252335600 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.275555555 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.298775510 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.321995464 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.345215419 }, "value": [ 0.0034 ] },
+    { "time": { "value": 2.368435374 }, "value": [ 0.0037 ] },
+    { "time": { "value": 2.391655328 }, "value": [ 0.0062 ] },
+    { "time": { "value": 2.414875283 }, "value": [ 0.014 ] },
+    { "time": { "value": 2.438095238 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.461315192 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.484535147 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.507755102 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.530975056 }, "value": [ 0.0034 ] },
+    { "time": { "value": 2.554195011 }, "value": [ 0.0037 ] },
+    { "time": { "value": 2.577414965 }, "value": [ 0.0034 ] },
+    { "time": { "value": 2.600634920 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.623854875 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.647074829 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.670294784 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.693514739 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.716734693 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.739954648 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.763174603 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.786394557 }, "value": [ 0.0034 ] },
+    { "time": { "value": 2.809614512 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.832834467 }, "value": [ 0.0036 ] },
+    { "time": { "value": 2.856054421 }, "value": [ 0.0034 ] },
+    { "time": { "value": 2.879274376 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.902494331 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.925714285 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.948934240 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.972154195 }, "value": [ 0.0035 ] },
+    { "time": { "value": 2.995374149 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.018594104 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.041814058 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.065034013 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.088253968 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.111473922 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.134693877 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.157913832 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.181133786 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.204353741 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.227573696 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.250793650 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.274013605 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.297233560 }, "value": [ 0.0034 ] },
+    { "time": { "value": 3.320453514 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.343673469 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.366893424 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.390113378 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.413333333 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.436553287 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.459773242 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.482993197 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.506213151 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.529433106 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.552653061 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.575873015 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.599092970 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.622312925 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.645532879 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.668752834 }, "value": [ 0.0033 ] },
+    { "time": { "value": 3.691972789 }, "value": [ 0.0034 ] },
+    { "time": { "value": 3.715192743 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.738412698 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.761632653 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.784852607 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.808072562 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.831292517 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.854512471 }, "value": [ 0.0037 ] },
+    { "time": { "value": 3.877732426 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.900952380 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.924172335 }, "value": [ 0.0036 ] },
+    { "time": { "value": 3.947392290 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.970612244 }, "value": [ 0.0035 ] },
+    { "time": { "value": 3.993832199 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.017052154 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.040272108 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.063492063 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.086712018 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.109931972 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.133151927 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.156371882 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.179591836 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.202811791 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.226031746 }, "value": [ 0.0037 ] },
+    { "time": { "value": 4.249251700 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.272471655 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.295691609 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.318911564 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.342131519 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.365351473 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.388571428 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.411791383 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.435011337 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.458231292 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.481451247 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.504671201 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.527891156 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.551111111 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.574331065 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.597551020 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.620770975 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.643990929 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.667210884 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.690430839 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.713650793 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.736870748 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.760090702 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.783310657 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.806530612 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.829750566 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.852970521 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.876190476 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.899410430 }, "value": [ 0.0036 ] },
+    { "time": { "value": 4.922630385 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.945850340 }, "value": [ 0.0035 ] },
+    { "time": { "value": 4.969070294 }, "value": [ 0.0036 ] }
+  ]
+}
+]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-jams-writer/expected/af-6.json	Tue Nov 03 11:36:24 2015 +0000
@@ -0,0 +1,238 @@
+{
+"file_metadata": {
+  "filename": "3clicks8.wav"
+},
+"unknown": [
+{ 
+  "annotation_metadata": {
+    "annotation_tools": "Sonic Annotator v1.3",
+    "data_source": "Automatic feature extraction",
+    "annotator": {
+      "plugin_id": "vamp:vamp-example-plugins:amplitudefollower",
+      "output_id": "amplitude",
+      "step_size": 1024,
+      "block_size": 1024,
+      "sample_rate": 44100,
+      "transform_id": "vamp:vamp-example-plugins:amplitudefollower:amplitude"
+    }
+  },
+  "data": [
+    { "time": { "value": 0.000000000 }, "value": [ 0.00359596 ] },
+    { "time": { "value": 0.023219954 }, "value": [ 0.00351864 ] },
+    { "time": { "value": 0.046439909 }, "value": [ 0.00357167 ] },
+    { "time": { "value": 0.069659863 }, "value": [ 0.00358918 ] },
+    { "time": { "value": 0.092879818 }, "value": [ 0.00359586 ] },
+    { "time": { "value": 0.116099773 }, "value": [ 0.00352171 ] },
+    { "time": { "value": 0.139319727 }, "value": [ 0.00353074 ] },
+    { "time": { "value": 0.162539682 }, "value": [ 0.00354993 ] },
+    { "time": { "value": 0.185759637 }, "value": [ 0.00354264 ] },
+    { "time": { "value": 0.208979591 }, "value": [ 0.00352689 ] },
+    { "time": { "value": 0.232199546 }, "value": [ 0.00360165 ] },
+    { "time": { "value": 0.255419501 }, "value": [ 0.00361172 ] },
+    { "time": { "value": 0.278639455 }, "value": [ 0.00361564 ] },
+    { "time": { "value": 0.301859410 }, "value": [ 0.0035339 ] },
+    { "time": { "value": 0.325079365 }, "value": [ 0.00361025 ] },
+    { "time": { "value": 0.348299319 }, "value": [ 0.00352643 ] },
+    { "time": { "value": 0.371519274 }, "value": [ 0.00355937 ] },
+    { "time": { "value": 0.394739229 }, "value": [ 0.00353683 ] },
+    { "time": { "value": 0.417959183 }, "value": [ 0.00358946 ] },
+    { "time": { "value": 0.441179138 }, "value": [ 0.00363629 ] },
+    { "time": { "value": 0.464399092 }, "value": [ 0.00354152 ] },
+    { "time": { "value": 0.487619047 }, "value": [ 0.00348666 ] },
+    { "time": { "value": 0.510839002 }, "value": [ 0.00352516 ] },
+    { "time": { "value": 0.534058956 }, "value": [ 0.00352261 ] },
+    { "time": { "value": 0.557278911 }, "value": [ 0.00350301 ] },
+    { "time": { "value": 0.580498866 }, "value": [ 0.00352414 ] },
+    { "time": { "value": 0.603718820 }, "value": [ 0.00351352 ] },
+    { "time": { "value": 0.626938775 }, "value": [ 0.00345411 ] },
+    { "time": { "value": 0.650158730 }, "value": [ 0.00363914 ] },
+    { "time": { "value": 0.673378684 }, "value": [ 0.00370925 ] },
+    { "time": { "value": 0.696598639 }, "value": [ 0.00348075 ] },
+    { "time": { "value": 0.719818594 }, "value": [ 0.0034814 ] },
+    { "time": { "value": 0.743038548 }, "value": [ 0.00362525 ] },
+    { "time": { "value": 0.766258503 }, "value": [ 0.0146151 ] },
+    { "time": { "value": 0.789478458 }, "value": [ 0.00458446 ] },
+    { "time": { "value": 0.812698412 }, "value": [ 0.00342316 ] },
+    { "time": { "value": 0.835918367 }, "value": [ 0.0036135 ] },
+    { "time": { "value": 0.859138321 }, "value": [ 0.00352045 ] },
+    { "time": { "value": 0.882358276 }, "value": [ 0.0036266 ] },
+    { "time": { "value": 0.905578231 }, "value": [ 0.00357805 ] },
+    { "time": { "value": 0.928798185 }, "value": [ 0.00355937 ] },
+    { "time": { "value": 0.952018140 }, "value": [ 0.00350579 ] },
+    { "time": { "value": 0.975238095 }, "value": [ 0.00359969 ] },
+    { "time": { "value": 0.998458049 }, "value": [ 0.00352854 ] },
+    { "time": { "value": 1.021678004 }, "value": [ 0.00353486 ] },
+    { "time": { "value": 1.044897959 }, "value": [ 0.00355259 ] },
+    { "time": { "value": 1.068117913 }, "value": [ 0.00347951 ] },
+    { "time": { "value": 1.091337868 }, "value": [ 0.00361734 ] },
+    { "time": { "value": 1.114557823 }, "value": [ 0.00351861 ] },
+    { "time": { "value": 1.137777777 }, "value": [ 0.00351437 ] },
+    { "time": { "value": 1.160997732 }, "value": [ 0.00352971 ] },
+    { "time": { "value": 1.184217687 }, "value": [ 0.00360414 ] },
+    { "time": { "value": 1.207437641 }, "value": [ 0.0034343 ] },
+    { "time": { "value": 1.230657596 }, "value": [ 0.00358201 ] },
+    { "time": { "value": 1.253877551 }, "value": [ 0.00361252 ] },
+    { "time": { "value": 1.277097505 }, "value": [ 0.00361165 ] },
+    { "time": { "value": 1.300317460 }, "value": [ 0.00355763 ] },
+    { "time": { "value": 1.323537414 }, "value": [ 0.00353226 ] },
+    { "time": { "value": 1.346757369 }, "value": [ 0.00349109 ] },
+    { "time": { "value": 1.369977324 }, "value": [ 0.00352628 ] },
+    { "time": { "value": 1.393197278 }, "value": [ 0.00348415 ] },
+    { "time": { "value": 1.416417233 }, "value": [ 0.00354576 ] },
+    { "time": { "value": 1.439637188 }, "value": [ 0.00369414 ] },
+    { "time": { "value": 1.462857142 }, "value": [ 0.00367139 ] },
+    { "time": { "value": 1.486077097 }, "value": [ 0.00342798 ] },
+    { "time": { "value": 1.509297052 }, "value": [ 0.00338209 ] },
+    { "time": { "value": 1.532517006 }, "value": [ 0.00351023 ] },
+    { "time": { "value": 1.555736961 }, "value": [ 0.00346643 ] },
+    { "time": { "value": 1.578956916 }, "value": [ 0.00346979 ] },
+    { "time": { "value": 1.602176870 }, "value": [ 0.00348269 ] },
+    { "time": { "value": 1.625396825 }, "value": [ 0.00348368 ] },
+    { "time": { "value": 1.648616780 }, "value": [ 0.01162 ] },
+    { "time": { "value": 1.671836734 }, "value": [ 0.00359211 ] },
+    { "time": { "value": 1.695056689 }, "value": [ 0.00360249 ] },
+    { "time": { "value": 1.718276643 }, "value": [ 0.00352957 ] },
+    { "time": { "value": 1.741496598 }, "value": [ 0.00349559 ] },
+    { "time": { "value": 1.764716553 }, "value": [ 0.00344387 ] },
+    { "time": { "value": 1.787936507 }, "value": [ 0.00352666 ] },
+    { "time": { "value": 1.811156462 }, "value": [ 0.0035248 ] },
+    { "time": { "value": 1.834376417 }, "value": [ 0.00353289 ] },
+    { "time": { "value": 1.857596371 }, "value": [ 0.00353361 ] },
+    { "time": { "value": 1.880816326 }, "value": [ 0.00348838 ] },
+    { "time": { "value": 1.904036281 }, "value": [ 0.00355124 ] },
+    { "time": { "value": 1.927256235 }, "value": [ 0.00349487 ] },
+    { "time": { "value": 1.950476190 }, "value": [ 0.0036614 ] },
+    { "time": { "value": 1.973696145 }, "value": [ 0.00358802 ] },
+    { "time": { "value": 1.996916099 }, "value": [ 0.00351078 ] },
+    { "time": { "value": 2.020136054 }, "value": [ 0.00351788 ] },
+    { "time": { "value": 2.043356009 }, "value": [ 0.00345998 ] },
+    { "time": { "value": 2.066575963 }, "value": [ 0.00359541 ] },
+    { "time": { "value": 2.089795918 }, "value": [ 0.00363803 ] },
+    { "time": { "value": 2.113015873 }, "value": [ 0.00341127 ] },
+    { "time": { "value": 2.136235827 }, "value": [ 0.00358579 ] },
+    { "time": { "value": 2.159455782 }, "value": [ 0.00358391 ] },
+    { "time": { "value": 2.182675736 }, "value": [ 0.00349291 ] },
+    { "time": { "value": 2.205895691 }, "value": [ 0.00350593 ] },
+    { "time": { "value": 2.229115646 }, "value": [ 0.00347529 ] },
+    { "time": { "value": 2.252335600 }, "value": [ 0.00358021 ] },
+    { "time": { "value": 2.275555555 }, "value": [ 0.00353051 ] },
+    { "time": { "value": 2.298775510 }, "value": [ 0.00360463 ] },
+    { "time": { "value": 2.321995464 }, "value": [ 0.00357421 ] },
+    { "time": { "value": 2.345215419 }, "value": [ 0.00343617 ] },
+    { "time": { "value": 2.368435374 }, "value": [ 0.00367464 ] },
+    { "time": { "value": 2.391655328 }, "value": [ 0.00623882 ] },
+    { "time": { "value": 2.414875283 }, "value": [ 0.0139992 ] },
+    { "time": { "value": 2.438095238 }, "value": [ 0.00347958 ] },
+    { "time": { "value": 2.461315192 }, "value": [ 0.00348231 ] },
+    { "time": { "value": 2.484535147 }, "value": [ 0.0035482 ] },
+    { "time": { "value": 2.507755102 }, "value": [ 0.00350744 ] },
+    { "time": { "value": 2.530975056 }, "value": [ 0.00342298 ] },
+    { "time": { "value": 2.554195011 }, "value": [ 0.00366419 ] },
+    { "time": { "value": 2.577414965 }, "value": [ 0.0034377 ] },
+    { "time": { "value": 2.600634920 }, "value": [ 0.00356318 ] },
+    { "time": { "value": 2.623854875 }, "value": [ 0.00354368 ] },
+    { "time": { "value": 2.647074829 }, "value": [ 0.00360324 ] },
+    { "time": { "value": 2.670294784 }, "value": [ 0.00354322 ] },
+    { "time": { "value": 2.693514739 }, "value": [ 0.0035675 ] },
+    { "time": { "value": 2.716734693 }, "value": [ 0.00346242 ] },
+    { "time": { "value": 2.739954648 }, "value": [ 0.00348647 ] },
+    { "time": { "value": 2.763174603 }, "value": [ 0.0034772 ] },
+    { "time": { "value": 2.786394557 }, "value": [ 0.00344762 ] },
+    { "time": { "value": 2.809614512 }, "value": [ 0.00352104 ] },
+    { "time": { "value": 2.832834467 }, "value": [ 0.00355933 ] },
+    { "time": { "value": 2.856054421 }, "value": [ 0.00340756 ] },
+    { "time": { "value": 2.879274376 }, "value": [ 0.00349975 ] },
+    { "time": { "value": 2.902494331 }, "value": [ 0.00348265 ] },
+    { "time": { "value": 2.925714285 }, "value": [ 0.00354504 ] },
+    { "time": { "value": 2.948934240 }, "value": [ 0.00349364 ] },
+    { "time": { "value": 2.972154195 }, "value": [ 0.00349891 ] },
+    { "time": { "value": 2.995374149 }, "value": [ 0.00356645 ] },
+    { "time": { "value": 3.018594104 }, "value": [ 0.00353567 ] },
+    { "time": { "value": 3.041814058 }, "value": [ 0.00360318 ] },
+    { "time": { "value": 3.065034013 }, "value": [ 0.00359901 ] },
+    { "time": { "value": 3.088253968 }, "value": [ 0.00349811 ] },
+    { "time": { "value": 3.111473922 }, "value": [ 0.00358849 ] },
+    { "time": { "value": 3.134693877 }, "value": [ 0.00359128 ] },
+    { "time": { "value": 3.157913832 }, "value": [ 0.00352523 ] },
+    { "time": { "value": 3.181133786 }, "value": [ 0.00360644 ] },
+    { "time": { "value": 3.204353741 }, "value": [ 0.00351975 ] },
+    { "time": { "value": 3.227573696 }, "value": [ 0.00360961 ] },
+    { "time": { "value": 3.250793650 }, "value": [ 0.00353225 ] },
+    { "time": { "value": 3.274013605 }, "value": [ 0.00356697 ] },
+    { "time": { "value": 3.297233560 }, "value": [ 0.00342544 ] },
+    { "time": { "value": 3.320453514 }, "value": [ 0.00356122 ] },
+    { "time": { "value": 3.343673469 }, "value": [ 0.00357135 ] },
+    { "time": { "value": 3.366893424 }, "value": [ 0.00352669 ] },
+    { "time": { "value": 3.390113378 }, "value": [ 0.00359497 ] },
+    { "time": { "value": 3.413333333 }, "value": [ 0.00357022 ] },
+    { "time": { "value": 3.436553287 }, "value": [ 0.00350066 ] },
+    { "time": { "value": 3.459773242 }, "value": [ 0.00349705 ] },
+    { "time": { "value": 3.482993197 }, "value": [ 0.00350598 ] },
+    { "time": { "value": 3.506213151 }, "value": [ 0.00357775 ] },
+    { "time": { "value": 3.529433106 }, "value": [ 0.00352816 ] },
+    { "time": { "value": 3.552653061 }, "value": [ 0.00358455 ] },
+    { "time": { "value": 3.575873015 }, "value": [ 0.00348071 ] },
+    { "time": { "value": 3.599092970 }, "value": [ 0.00355185 ] },
+    { "time": { "value": 3.622312925 }, "value": [ 0.00350845 ] },
+    { "time": { "value": 3.645532879 }, "value": [ 0.00360378 ] },
+    { "time": { "value": 3.668752834 }, "value": [ 0.00333629 ] },
+    { "time": { "value": 3.691972789 }, "value": [ 0.00341339 ] },
+    { "time": { "value": 3.715192743 }, "value": [ 0.00345791 ] },
+    { "time": { "value": 3.738412698 }, "value": [ 0.00348351 ] },
+    { "time": { "value": 3.761632653 }, "value": [ 0.00349349 ] },
+    { "time": { "value": 3.784852607 }, "value": [ 0.00354578 ] },
+    { "time": { "value": 3.808072562 }, "value": [ 0.00363189 ] },
+    { "time": { "value": 3.831292517 }, "value": [ 0.00352206 ] },
+    { "time": { "value": 3.854512471 }, "value": [ 0.00369021 ] },
+    { "time": { "value": 3.877732426 }, "value": [ 0.00351326 ] },
+    { "time": { "value": 3.900952380 }, "value": [ 0.00356962 ] },
+    { "time": { "value": 3.924172335 }, "value": [ 0.00357592 ] },
+    { "time": { "value": 3.947392290 }, "value": [ 0.00349988 ] },
+    { "time": { "value": 3.970612244 }, "value": [ 0.00349944 ] },
+    { "time": { "value": 3.993832199 }, "value": [ 0.00355037 ] },
+    { "time": { "value": 4.017052154 }, "value": [ 0.00360133 ] },
+    { "time": { "value": 4.040272108 }, "value": [ 0.00354759 ] },
+    { "time": { "value": 4.063492063 }, "value": [ 0.00354953 ] },
+    { "time": { "value": 4.086712018 }, "value": [ 0.0035587 ] },
+    { "time": { "value": 4.109931972 }, "value": [ 0.00364969 ] },
+    { "time": { "value": 4.133151927 }, "value": [ 0.00345758 ] },
+    { "time": { "value": 4.156371882 }, "value": [ 0.00347695 ] },
+    { "time": { "value": 4.179591836 }, "value": [ 0.00359545 ] },
+    { "time": { "value": 4.202811791 }, "value": [ 0.00353286 ] },
+    { "time": { "value": 4.226031746 }, "value": [ 0.00366958 ] },
+    { "time": { "value": 4.249251700 }, "value": [ 0.00350838 ] },
+    { "time": { "value": 4.272471655 }, "value": [ 0.00353147 ] },
+    { "time": { "value": 4.295691609 }, "value": [ 0.0036185 ] },
+    { "time": { "value": 4.318911564 }, "value": [ 0.00349132 ] },
+    { "time": { "value": 4.342131519 }, "value": [ 0.00353897 ] },
+    { "time": { "value": 4.365351473 }, "value": [ 0.00347904 ] },
+    { "time": { "value": 4.388571428 }, "value": [ 0.00348759 ] },
+    { "time": { "value": 4.411791383 }, "value": [ 0.00358541 ] },
+    { "time": { "value": 4.435011337 }, "value": [ 0.00349229 ] },
+    { "time": { "value": 4.458231292 }, "value": [ 0.00357759 ] },
+    { "time": { "value": 4.481451247 }, "value": [ 0.00355427 ] },
+    { "time": { "value": 4.504671201 }, "value": [ 0.00355063 ] },
+    { "time": { "value": 4.527891156 }, "value": [ 0.00358087 ] },
+    { "time": { "value": 4.551111111 }, "value": [ 0.00350815 ] },
+    { "time": { "value": 4.574331065 }, "value": [ 0.00353843 ] },
+    { "time": { "value": 4.597551020 }, "value": [ 0.00354201 ] },
+    { "time": { "value": 4.620770975 }, "value": [ 0.00350497 ] },
+    { "time": { "value": 4.643990929 }, "value": [ 0.00354671 ] },
+    { "time": { "value": 4.667210884 }, "value": [ 0.00353596 ] },
+    { "time": { "value": 4.690430839 }, "value": [ 0.00347371 ] },
+    { "time": { "value": 4.713650793 }, "value": [ 0.0035368 ] },
+    { "time": { "value": 4.736870748 }, "value": [ 0.00360017 ] },
+    { "time": { "value": 4.760090702 }, "value": [ 0.00352821 ] },
+    { "time": { "value": 4.783310657 }, "value": [ 0.00359332 ] },
+    { "time": { "value": 4.806530612 }, "value": [ 0.00353742 ] },
+    { "time": { "value": 4.829750566 }, "value": [ 0.00353795 ] },
+    { "time": { "value": 4.852970521 }, "value": [ 0.00348792 ] },
+    { "time": { "value": 4.876190476 }, "value": [ 0.0034639 ] },
+    { "time": { "value": 4.899410430 }, "value": [ 0.0036387 ] },
+    { "time": { "value": 4.922630385 }, "value": [ 0.00354102 ] },
+    { "time": { "value": 4.945850340 }, "value": [ 0.00351475 ] },
+    { "time": { "value": 4.969070294 }, "value": [ 0.00356904 ] }
+  ]
+}
+]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-jams-writer/expected/curve-fsr.json	Tue Nov 03 11:36:24 2015 +0000
@@ -0,0 +1,37 @@
+{
+"file_metadata": {
+  "filename": "20sec-silence.wav"
+},
+"unknown": [
+{ 
+  "annotation_metadata": {
+    "annotation_tools": "Sonic Annotator v1.3",
+    "data_source": "Automatic feature extraction",
+    "annotator": {
+      "plugin_id": "vamp:vamp-test-plugin:vamp-test-plugin",
+      "output_id": "curve-fsr",
+      "plugin_version": "3",
+      "step_size": 1024,
+      "block_size": 1024,
+      "sample_rate": 44100,
+      "parameters": {
+        "produce_output": 1
+      },
+      "transform_id": "vamp:vamp-test-plugin:vamp-test-plugin:curve-fsr"
+    }
+  },
+  "data": [
+    { "time": { "value": 0.000000000 }, "label": { "value": "1 of 10: 0 at 0" }, "value": [ 0 ] },
+    { "time": { "value": 0.400000000 }, "label": { "value": "2 of 10: 0.1 at 0.4" }, "value": [ 0.1 ] },
+    { "time": { "value": 0.800000000 }, "label": { "value": "3 of 10: 0.2 at 0.8" }, "value": [ 0.2 ] },
+    { "time": { "value": 1.200000000 }, "label": { "value": "4 of 10: 0.3 at 1.2" }, "value": [ 0.3 ] },
+    { "time": { "value": 1.600000000 }, "label": { "value": "5 of 10: 0.4 at 1.6" }, "value": [ 0.4 ] },
+    { "time": { "value": 2.000000000 }, "label": { "value": "6 of 10: 0.5 at 2" }, "value": [ 0.5 ] },
+    { "time": { "value": 2.400000000 }, "label": { "value": "7 of 10: 0.6 at 2.4" }, "value": [ 0.6 ] },
+    { "time": { "value": 2.800000000 }, "label": { "value": "8 of 10: 0.7 at 2.8" }, "value": [ 0.7 ] },
+    { "time": { "value": 3.200000000 }, "label": { "value": "9 of 10: 0.8 at 3.2" }, "value": [ 0.8 ] },
+    { "time": { "value": 3.600000000 }, "label": { "value": "10 of 10: 0.9 at 3.6" }, "value": [ 0.9 ] }
+  ]
+}
+]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-jams-writer/expected/grid-oss.json	Tue Nov 03 11:36:24 2015 +0000
@@ -0,0 +1,47 @@
+{
+"file_metadata": {
+  "filename": "20sec-silence.wav"
+},
+"unknown": [
+{ 
+  "annotation_metadata": {
+    "annotation_tools": "Sonic Annotator v1.3",
+    "data_source": "Automatic feature extraction",
+    "annotator": {
+      "plugin_id": "vamp:vamp-test-plugin:vamp-test-plugin",
+      "output_id": "grid-oss",
+      "plugin_version": "3",
+      "step_size": 1024,
+      "block_size": 1024,
+      "sample_rate": 44100,
+      "parameters": {
+        "produce_output": 1
+      },
+      "transform_id": "vamp:vamp-test-plugin:vamp-test-plugin:grid-oss"
+    }
+  },
+  "data": [
+    { "time": { "value": 0.000000000 }, "label": { "value": "1 of 20 at 0" }, "value": [ 0.0666667, 0.1, 0.133333, 0.166667, 0.2, 0.233333, 0.266667, 0.3, 0.333333, 0.366667 ] },
+    { "time": { "value": 0.023219954 }, "label": { "value": "2 of 20 at 0.023" }, "value": [ 0.1, 0.133333, 0.166667, 0.2, 0.233333, 0.266667, 0.3, 0.333333, 0.366667, 0.4 ] },
+    { "time": { "value": 0.046439909 }, "label": { "value": "3 of 20 at 0.046" }, "value": [ 0.133333, 0.166667, 0.2, 0.233333, 0.266667, 0.3, 0.333333, 0.366667, 0.4, 0.433333 ] },
+    { "time": { "value": 0.069659863 }, "label": { "value": "4 of 20 at 0.069" }, "value": [ 0.166667, 0.2, 0.233333, 0.266667, 0.3, 0.333333, 0.366667, 0.4, 0.433333, 0.466667 ] },
+    { "time": { "value": 0.092879818 }, "label": { "value": "5 of 20 at 0.092" }, "value": [ 0.2, 0.233333, 0.266667, 0.3, 0.333333, 0.366667, 0.4, 0.433333, 0.466667, 0.5 ] },
+    { "time": { "value": 0.116099773 }, "label": { "value": "6 of 20 at 0.116" }, "value": [ 0.233333, 0.266667, 0.3, 0.333333, 0.366667, 0.4, 0.433333, 0.466667, 0.5, 0.533333 ] },
+    { "time": { "value": 0.139319727 }, "label": { "value": "7 of 20 at 0.139" }, "value": [ 0.266667, 0.3, 0.333333, 0.366667, 0.4, 0.433333, 0.466667, 0.5, 0.533333, 0.566667 ] },
+    { "time": { "value": 0.162539682 }, "label": { "value": "8 of 20 at 0.162" }, "value": [ 0.3, 0.333333, 0.366667, 0.4, 0.433333, 0.466667, 0.5, 0.533333, 0.566667, 0.6 ] },
+    { "time": { "value": 0.185759637 }, "label": { "value": "9 of 20 at 0.185" }, "value": [ 0.333333, 0.366667, 0.4, 0.433333, 0.466667, 0.5, 0.533333, 0.566667, 0.6, 0.633333 ] },
+    { "time": { "value": 0.208979591 }, "label": { "value": "10 of 20 at 0.208" }, "value": [ 0.366667, 0.4, 0.433333, 0.466667, 0.5, 0.533333, 0.566667, 0.6, 0.633333, 0.666667 ] },
+    { "time": { "value": 0.232199546 }, "label": { "value": "11 of 20 at 0.232" }, "value": [ 0.4, 0.433333, 0.466667, 0.5, 0.533333, 0.566667, 0.6, 0.633333, 0.666667, 0.7 ] },
+    { "time": { "value": 0.255419501 }, "label": { "value": "12 of 20 at 0.255" }, "value": [ 0.433333, 0.466667, 0.5, 0.533333, 0.566667, 0.6, 0.633333, 0.666667, 0.7, 0.733333 ] },
+    { "time": { "value": 0.278639455 }, "label": { "value": "13 of 20 at 0.278" }, "value": [ 0.466667, 0.5, 0.533333, 0.566667, 0.6, 0.633333, 0.666667, 0.7, 0.733333, 0.766667 ] },
+    { "time": { "value": 0.301859410 }, "label": { "value": "14 of 20 at 0.301" }, "value": [ 0.5, 0.533333, 0.566667, 0.6, 0.633333, 0.666667, 0.7, 0.733333, 0.766667, 0.8 ] },
+    { "time": { "value": 0.325079365 }, "label": { "value": "15 of 20 at 0.325" }, "value": [ 0.533333, 0.566667, 0.6, 0.633333, 0.666667, 0.7, 0.733333, 0.766667, 0.8, 0.833333 ] },
+    { "time": { "value": 0.348299319 }, "label": { "value": "16 of 20 at 0.348" }, "value": [ 0.566667, 0.6, 0.633333, 0.666667, 0.7, 0.733333, 0.766667, 0.8, 0.833333, 0.866667 ] },
+    { "time": { "value": 0.371519274 }, "label": { "value": "17 of 20 at 0.371" }, "value": [ 0.6, 0.633333, 0.666667, 0.7, 0.733333, 0.766667, 0.8, 0.833333, 0.866667, 0.9 ] },
+    { "time": { "value": 0.394739229 }, "label": { "value": "18 of 20 at 0.394" }, "value": [ 0.633333, 0.666667, 0.7, 0.733333, 0.766667, 0.8, 0.833333, 0.866667, 0.9, 0.933333 ] },
+    { "time": { "value": 0.417959183 }, "label": { "value": "19 of 20 at 0.417" }, "value": [ 0.666667, 0.7, 0.733333, 0.766667, 0.8, 0.833333, 0.866667, 0.9, 0.933333, 0.966667 ] },
+    { "time": { "value": 0.441179138 }, "label": { "value": "20 of 20 at 0.441" }, "value": [ 0.7, 0.733333, 0.766667, 0.8, 0.833333, 0.866667, 0.9, 0.933333, 0.966667, 1 ] }
+  ]
+}
+]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-jams-writer/expected/instants.json	Tue Nov 03 11:36:24 2015 +0000
@@ -0,0 +1,37 @@
+{
+"file_metadata": {
+  "filename": "20sec-silence.wav"
+},
+"unknown": [
+{ 
+  "annotation_metadata": {
+    "annotation_tools": "Sonic Annotator v1.3",
+    "data_source": "Automatic feature extraction",
+    "annotator": {
+      "plugin_id": "vamp:vamp-test-plugin:vamp-test-plugin",
+      "output_id": "instants",
+      "plugin_version": "3",
+      "step_size": 1024,
+      "block_size": 1024,
+      "sample_rate": 44100,
+      "parameters": {
+        "produce_output": 1
+      },
+      "transform_id": "vamp:vamp-test-plugin:vamp-test-plugin:instants"
+    }
+  },
+  "data": [
+    { "time": { "value": 0.000000000 }, "label": { "value": "1 of 10 at 0" } },
+    { "time": { "value": 1.500000000 }, "label": { "value": "2 of 10 at 1.5" } },
+    { "time": { "value": 3.000000000 }, "label": { "value": "3 of 10 at 3" } },
+    { "time": { "value": 4.500000000 }, "label": { "value": "4 of 10 at 4.5" } },
+    { "time": { "value": 6.000000000 }, "label": { "value": "5 of 10 at 6" } },
+    { "time": { "value": 7.500000000 }, "label": { "value": "6 of 10 at 7.5" } },
+    { "time": { "value": 9.000000000 }, "label": { "value": "7 of 10 at 9" } },
+    { "time": { "value": 10.500000000 }, "label": { "value": "8 of 10 at 10.5" } },
+    { "time": { "value": 12.000000000 }, "label": { "value": "9 of 10 at 12" } },
+    { "time": { "value": 13.500000000 }, "label": { "value": "10 of 10 at 13.5" } }
+  ]
+}
+]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-jams-writer/expected/notes-regions.json	Tue Nov 03 11:36:24 2015 +0000
@@ -0,0 +1,37 @@
+{
+"file_metadata": {
+  "filename": "20sec-silence.wav"
+},
+"unknown": [
+{ 
+  "annotation_metadata": {
+    "annotation_tools": "Sonic Annotator v1.3",
+    "data_source": "Automatic feature extraction",
+    "annotator": {
+      "plugin_id": "vamp:vamp-test-plugin:vamp-test-plugin",
+      "output_id": "notes-regions",
+      "plugin_version": "3",
+      "step_size": 1024,
+      "block_size": 1024,
+      "sample_rate": 44100,
+      "parameters": {
+        "produce_output": 1
+      },
+      "transform_id": "vamp:vamp-test-plugin:vamp-test-plugin:notes-regions"
+    }
+  },
+  "data": [
+    { "start": { "value": 0.000000000 }, "end": { "value": 1.750000000 }, "label": { "value": "1 of 10: 0 at 0 dur. 1.75" }, "value": [ 0 ] },
+    { "start": { "value": 1.000000000 }, "end": { "value": 1.500000000 }, "label": { "value": "2 of 10: 0.1 at 1 dur. 0.5" }, "value": [ 0.1 ] },
+    { "start": { "value": 2.000000000 }, "end": { "value": 3.750000000 }, "label": { "value": "3 of 10: 0.2 at 2 dur. 1.75" }, "value": [ 0.2 ] },
+    { "start": { "value": 3.000000000 }, "end": { "value": 3.500000000 }, "label": { "value": "4 of 10: 0.3 at 3 dur. 0.5" }, "value": [ 0.3 ] },
+    { "start": { "value": 4.000000000 }, "end": { "value": 5.750000000 }, "label": { "value": "5 of 10: 0.4 at 4 dur. 1.75" }, "value": [ 0.4 ] },
+    { "start": { "value": 5.000000000 }, "end": { "value": 5.500000000 }, "label": { "value": "6 of 10: 0.5 at 5 dur. 0.5" }, "value": [ 0.5 ] },
+    { "start": { "value": 6.000000000 }, "end": { "value": 7.750000000 }, "label": { "value": "7 of 10: 0.6 at 6 dur. 1.75" }, "value": [ 0.6 ] },
+    { "start": { "value": 7.000000000 }, "end": { "value": 7.500000000 }, "label": { "value": "8 of 10: 0.7 at 7 dur. 0.5" }, "value": [ 0.7 ] },
+    { "start": { "value": 8.000000000 }, "end": { "value": 9.750000000 }, "label": { "value": "9 of 10: 0.8 at 8 dur. 1.75" }, "value": [ 0.8 ] },
+    { "start": { "value": 9.000000000 }, "end": { "value": 9.500000000 }, "label": { "value": "10 of 10: 0.9 at 9 dur. 0.5" }, "value": [ 0.9 ] }
+  ]
+}
+]
+}
--- a/tests/test-jams-writer/test-jams-writer.sh	Tue Nov 03 11:36:00 2015 +0000
+++ b/tests/test-jams-writer/test-jams-writer.sh	Tue Nov 03 11:36:24 2015 +0000
@@ -5,6 +5,7 @@
 tmpjson=$mypath/tmp_1_$$.json
 
 silentfile=$audiopath/20sec-silence.wav
+infile=$audiopath/3clicks8.wav
 
 trap "rm -f $tmpjson" 0
 
@@ -12,7 +13,7 @@
 
 mandatory="-w jams"
 
-# This does not yet test for correct values, only for parseable json
+# First check that the JSON is valid for all outputs
 
 for output in instants curve-oss curve-fsr curve-fsr-timed curve-vsr grid-oss grid-fsr notes-regions; do
 
@@ -20,5 +21,32 @@
 	fail "Failed to run for plugin $testplug with output $output"
 
     check_json "$tmpjson" "test plugin output $output"
+
 done
 
+# Now check for valid results, for a subset
+
+for output in instants curve-fsr grid-oss notes-regions; do
+
+    $r -d "$testplug:$output" $mandatory --jams-one-file "$tmpjson" --jams-force "$silentfile" 2>/dev/null || \
+	fail "Failed to run for plugin $testplug with output $output"
+
+    expected="$mypath/expected/$output.json"
+    jsoncompare "$tmpjson" "$expected" || \
+	faildiff "Output differs from expected for $output" "$tmpjson" "$expected"
+
+done
+
+# Test digits option, with an output that has lots of digits to round
+
+for digits in 0 6 2; do
+
+    $r -t "$transformdir/af.n3" $mandatory --jams-digits "$digits" --jams-one-file "$tmpjson" --jams-force "$infile" 2>/dev/null || \
+	fail "Failed to run for af with digits = $digits"
+
+    expected="$mypath/expected/af-$digits.json"
+    jsoncompare "$tmpjson" "$expected" || \
+	faildiff "Output differs from expected for af with digits = $digits" "$tmpjson" "$expected"
+
+done
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-jams-writer/transforms/af.n3	Tue Nov 03 11:36:24 2015 +0000
@@ -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:amplitudefollower ;
+	vamp:output examples:amplitudefollower_output_amplitude .
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-jams-writer/transforms/detectionfunction.n3	Tue Nov 03 11:36:24 2015 +0000
@@ -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 .
+
+
+
--- a/version.h	Tue Nov 03 11:36:00 2015 +0000
+++ b/version.h	Tue Nov 03 11:36:24 2015 +0000
@@ -1,1 +1,1 @@
-#define RUNNER_VERSION "1.2"
+#define RUNNER_VERSION "1.3"