changeset 32:26f7e0bb39d6

Quick test script, & rename examples to match
author Chris Cannam
date Mon, 14 Mar 2016 13:16:15 +0000
parents 0c59aeb0c090
children 73f3b0e01528
files examples/feat.json examples/featset.json examples/feature.json examples/featureset.json examples/outputdesc.json examples/outputdescriptor.json examples/paramdesc.json examples/parameterdescriptor.json examples/pluginconfig.json examples/pluginconfiguration.json examples/pluginstaticdata.json examples/staticdata.json test.sh
diffstat 13 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/examples/feat.json	Mon Mar 14 13:04:20 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-[[{"b64values": "AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA", "label": "A feature", "timestamp": {"n": 141590000, "s": 3}}]]
--- a/examples/featset.json	Mon Mar 14 13:04:20 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-{"0": [{"b64values": "AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA", "label": "A feature", "timestamp": {"n": 141590000, "s": 3}}]}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/feature.json	Mon Mar 14 13:16:15 2016 +0000
@@ -0,0 +1,1 @@
+{"b64values": "AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA", "label": "A feature", "timestamp": {"n": 141590000, "s": 3}}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/featureset.json	Mon Mar 14 13:16:15 2016 +0000
@@ -0,0 +1,1 @@
+{"0": [{"b64values": "AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA", "label": "A feature", "timestamp": {"n": 141590000, "s": 3}}]}
--- a/examples/outputdesc.json	Mon Mar 14 13:04:20 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-{"basic": {"description": "Power values of the frequency spectrum bins calculated from the input signal", "identifier": "powerspectrum", "name": "Power Spectrum"}, "binCount": 513, "binNames": [], "hasDuration": false, "sampleRate": 0, "sampleType": "OneSamplePerStep", "unit": ""}
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/outputdescriptor.json	Mon Mar 14 13:16:15 2016 +0000
@@ -0,0 +1,2 @@
+{"basic": {"description": "Power values of the frequency spectrum bins calculated from the input signal", "identifier": "powerspectrum", "name": "Power Spectrum"}, "binCount": 513, "binNames": [], "hasDuration": false, "sampleRate": 0, "sampleType": "OneSamplePerStep", "unit": ""}
+
--- a/examples/paramdesc.json	Mon Mar 14 13:04:20 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-{"basic": {"description": "Energy rise within a frequency bin necessary to count toward broadband total", "identifier": "threshold", "name": "Energy rise threshold"}, "defaultValue": 3, "extents": {"max": 20.5, "min": 0}, "unit": "dB", "valueNames": []}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/parameterdescriptor.json	Mon Mar 14 13:16:15 2016 +0000
@@ -0,0 +1,1 @@
+{"basic": {"description": "Energy rise within a frequency bin necessary to count toward broadband total", "identifier": "threshold", "name": "Energy rise threshold"}, "defaultValue": 3, "extents": {"max": 20.5, "min": 0}, "unit": "dB", "valueNames": []}
--- a/examples/pluginconfig.json	Mon Mar 14 13:04:20 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/pluginconfiguration.json	Mon Mar 14 13:16:15 2016 +0000
@@ -0,0 +1,1 @@
+{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/pluginstaticdata.json	Mon Mar 14 13:16:15 2016 +0000
@@ -0,0 +1,2 @@
+
+{"basic": {"description": "Detect percussive note onsets by identifying broadband energy rises", "identifier": "percussiononsets", "name": "Simple Percussion Onset Detector"}, "basicOutputInfo": [{"description": "Percussive note onset locations", "identifier": "onsets", "name": "Onsets"}, {"description": "Broadband energy rise detection function", "identifier": "detectionfunction", "name": "Detection Function"}], "category": ["Time", "Onsets"], "copyright": "Code copyright 2006 Queen Mary, University of London, after Dan Barry et al 2005.  Freely redistributable (BSD license)", "inputDomain": "FrequencyDomain", "key": "vamp-example-plugins:percussiononsets", "maker": "Vamp SDK Example Plugins", "maxChannelCount": 1, "minChannelCount": 1, "parameters": [{"basic": {"description": "Energy rise within a frequency bin necessary to count toward broadband total", "identifier": "threshold", "name": "Energy rise threshold"}, "defaultValue": 3, "extents": {"max": 20, "min": 0}, "unit": "dB", "valueNames": []}, {"basic": {"description": "Sensitivity of peak detector applied to broadband detection function", "identifier": "sensitivity", "name": "Sensitivity"}, "defaultValue": 40, "extents": {"max": 100, "min": 0}, "unit": "%", "valueNames": []}], "programs": [], "version": 2}
--- a/examples/staticdata.json	Mon Mar 14 13:04:20 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-
-{"basic": {"description": "Detect percussive note onsets by identifying broadband energy rises", "identifier": "percussiononsets", "name": "Simple Percussion Onset Detector"}, "basicOutputInfo": [{"description": "Percussive note onset locations", "identifier": "onsets", "name": "Onsets"}, {"description": "Broadband energy rise detection function", "identifier": "detectionfunction", "name": "Detection Function"}], "category": ["Time", "Onsets"], "copyright": "Code copyright 2006 Queen Mary, University of London, after Dan Barry et al 2005.  Freely redistributable (BSD license)", "inputDomain": "FrequencyDomain", "key": "vamp-example-plugins:percussiononsets", "maker": "Vamp SDK Example Plugins", "maxChannelCount": 1, "minChannelCount": 1, "parameters": [{"basic": {"description": "Energy rise within a frequency bin necessary to count toward broadband total", "identifier": "threshold", "name": "Energy rise threshold"}, "defaultValue": 3, "extents": {"max": 20, "min": 0}, "unit": "dB", "valueNames": []}, {"basic": {"description": "Sensitivity of peak detector applied to broadband detection function", "identifier": "sensitivity", "name": "Sensitivity"}, "defaultValue": 40, "extents": {"max": 100, "min": 0}, "unit": "%", "valueNames": []}], "programs": [], "version": 2}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test.sh	Mon Mar 14 13:16:15 2016 +0000
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -eu
+
+for ex in examples/*.json ; do
+    echo "Checking $ex..." 1>&2
+    jsonschema -i "$ex" schema/$(basename "$ex")
+done
+