# HG changeset patch # User Chris Cannam # Date 1457961375 0 # Node ID 12e43b583554795298b934f4a7e58b1d6c1a64e0 # Parent 673d73f955dd21c1f9188dd8f870973745148a3b Quick test script, & rename examples to match diff -r 673d73f955dd -r 12e43b583554 examples/feat.json --- 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}}]] diff -r 673d73f955dd -r 12e43b583554 examples/featset.json --- 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}}]} diff -r 673d73f955dd -r 12e43b583554 examples/feature.json --- /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}} diff -r 673d73f955dd -r 12e43b583554 examples/featureset.json --- /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}}]} diff -r 673d73f955dd -r 12e43b583554 examples/outputdesc.json --- 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": ""} - diff -r 673d73f955dd -r 12e43b583554 examples/outputdescriptor.json --- /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": ""} + diff -r 673d73f955dd -r 12e43b583554 examples/paramdesc.json --- 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": []} diff -r 673d73f955dd -r 12e43b583554 examples/parameterdescriptor.json --- /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": []} diff -r 673d73f955dd -r 12e43b583554 examples/pluginconfig.json --- 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} diff -r 673d73f955dd -r 12e43b583554 examples/pluginconfiguration.json --- /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} diff -r 673d73f955dd -r 12e43b583554 examples/pluginstaticdata.json --- /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} diff -r 673d73f955dd -r 12e43b583554 examples/staticdata.json --- 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} diff -r 673d73f955dd -r 12e43b583554 test.sh --- /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 +