# HG changeset patch # User Chris Cannam # Date 1475758016 -3600 # Node ID bac1098dbd26184697b2fdd60f48af62c55762a3 # Parent 30bd89a8cbeb8e1f1820da4c7585a69162048f74# Parent 45fa68ee83ce083b923100799523d41f187c24ea Merge from branch jsonrpc diff -r 30bd89a8cbeb -r bac1098dbd26 examples/configuration.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/configuration.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/configurationrequest.json --- a/examples/configurationrequest.json Tue Sep 27 15:03:29 2016 +0100 +++ b/examples/configurationrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,1 +1,1 @@ -{"pluginHandle":12345,"configuration":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}} +{"handle":12345,"configuration":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/error.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/error.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{"code": 6, "message": "An error occurred!" } diff -r 30bd89a8cbeb -r bac1098dbd26 examples/extractorstaticdata.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/extractorstaticdata.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{"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", "pluginKey": "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": [], "pluginVersion": 2} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/feature-array.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/feature-array.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{"featureValues": [ 1.0, -1.0, 4.0, 1505050.50 ], "label": "A feature", "timestamp": {"n": 141590000, "s": 3}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/feature-base64.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/feature-base64.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{"featureValues": "AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA", "label": "A feature", "timestamp": {"n": 141590000, "s": 3}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/feature.json --- a/examples/feature.json Tue Sep 27 15:03:29 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -{"featureValues": "AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA", "label": "A feature", "timestamp": {"n": 141590000, "s": 3}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/finishrequest.json --- a/examples/finishrequest.json Tue Sep 27 15:03:29 2016 +0100 +++ b/examples/finishrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,1 +1,1 @@ -{"pluginHandle": 1} +{"handle": 1} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/finishresponse.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/finishresponse.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,2 @@ +{"handle":12345,"features":{"outputid": [{"featureValues": [1,2,3], "timestamp": {"n": 141590000, "s": 3}}]}} + diff -r 30bd89a8cbeb -r bac1098dbd26 examples/listrequest.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/listrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/loadresponse.json --- a/examples/loadresponse.json Tue Sep 27 15:03:29 2016 +0100 +++ b/examples/loadresponse.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,1 +1,1 @@ -{"pluginHandle":12345,"staticData":{"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", "pluginKey": "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": [], "pluginVersion": 2},"defaultConfiguration":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}} +{"handle":12345,"staticData":{"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", "pluginKey": "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": [], "pluginVersion": 2},"defaultConfiguration":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/pluginconfiguration.json --- a/examples/pluginconfiguration.json Tue Sep 27 15:03:29 2016 +0100 +++ /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 30bd89a8cbeb -r bac1098dbd26 examples/pluginstaticdata.json --- a/examples/pluginstaticdata.json Tue Sep 27 15:03:29 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +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", "pluginKey": "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": [], "pluginVersion": 2} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/processinput-array.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/processinput-array.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{"inputBuffers":[[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], "timestamp": {"n": 141590000, "s": 3}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/processinput-base64.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/processinput-base64.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{"inputBuffers":["AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA"], "timestamp": {"n": 141590000, "s": 3}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/processinput.json --- a/examples/processinput.json Tue Sep 27 15:03:29 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -{"inputBuffers":["AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA"], "timestamp": {"n": 141590000, "s": 3}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/processrequest.json --- a/examples/processrequest.json Tue Sep 27 15:03:29 2016 +0100 +++ b/examples/processrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,1 +1,1 @@ -{"pluginHandle":12345,"processInput":{"inputBuffers":["AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA"], "timestamp": {"n": 141590000, "s": 3}}} +{"handle":12345,"processInput":{"inputBuffers":["AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA"], "timestamp": {"n": 141590000, "s": 3}}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/processresponse.json --- a/examples/processresponse.json Tue Sep 27 15:03:29 2016 +0100 +++ b/examples/processresponse.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,2 +1,2 @@ -{"pluginHandle":12345,"features":{"outputid": [{"featureValues": "AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA", "label": "A feature", "timestamp": {"n": 141590000, "s": 3}}]}} +{"handle":12345,"features":{"outputid": [{"featureValues": "AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA", "label": "A feature", "timestamp": {"n": 141590000, "s": 3}}]}} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/request.json --- a/examples/request.json Tue Sep 27 15:03:29 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -{"type": "load", "content": {"pluginKey":"vamp-example-plugins:percussiononsets","inputSampleRate":44100,"adapterFlags":["AdaptInputDomain","AdaptBufferSize"]}} - diff -r 30bd89a8cbeb -r bac1098dbd26 examples/response.json --- a/examples/response.json Tue Sep 27 15:03:29 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -{"type": "load", "success": true, "content": {"pluginHandle":12345,"staticData":{"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", "pluginKey": "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": [], "pluginVersion": 2},"defaultConfiguration":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}},"errorText":"I like weevils."} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/rpcrequest.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rpcrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,2 @@ +{"method": "load", "params": {"pluginKey":"vamp-example-plugins:percussiononsets","inputSampleRate":44100,"adapterFlags":["AdaptInputDomain","AdaptBufferSize"]}, "id": 6, "jsonrpc": "2.0"} + diff -r 30bd89a8cbeb -r bac1098dbd26 examples/rpcresponse-error.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rpcresponse-error.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{"method": "process", "error": {"code": 6, "message": "An error occurred!" },"id": "6"} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/rpcresponse-ok.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rpcresponse-ok.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +{"method": "load", "result": {"handle":12345,"staticData":{"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", "pluginKey": "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": [], "pluginVersion": 2},"defaultConfiguration":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}},"id": "6"} diff -r 30bd89a8cbeb -r bac1098dbd26 examples/serialisedarray-array.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/serialisedarray-array.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +[1,2,-3,3.1415926537] diff -r 30bd89a8cbeb -r bac1098dbd26 examples/serialisedarray-base64.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/serialisedarray-base64.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,1 @@ +"AACAPwAAAEAEAEBAAACAQAAAoEAAAMBAAADQQAAA4EA" diff -r 30bd89a8cbeb -r bac1098dbd26 schema/basic.json --- a/schema/basic.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/basic.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/basic#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for the basic part of various Vamp descriptors", + "description": "schema for a common unit of basic metadata", "type": "object", "properties": { "identifier": { diff -r 30bd89a8cbeb -r bac1098dbd26 schema/configuration.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/configuration.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,32 @@ +{ + "id": "http://vamp-plugins.org/json/schema/pluginconfiguration#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a bundle of configuration data capturing the setup of a feature extractor", + "type": "object", + "properties": { + "parameterValues": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9_-]+$": { + "type": "number" + } + }, + "additionalProperties": false + }, + "currentProgram": { + "type": "string" + }, + "channelCount": { + "type": "integer" + }, + "stepSize": { + "type": "integer" + }, + "blockSize": { + "type": "integer" + } + }, + "required": [ "channelCount", "stepSize", "blockSize" ], + "additionalProperties": false +} + diff -r 30bd89a8cbeb -r bac1098dbd26 schema/configurationrequest.json --- a/schema/configurationrequest.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/configurationrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,17 +1,17 @@ { "id": "http://vamp-plugins.org/json/schema/configurationrequest#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised request to configure a Vamp plugin; normally served as the content field of an object matching the plain request schema", + "description": "schema for a request to configure a feature extractor; may be served in the params field of a configure-method rpcrequest", "type": "object", "properties": { - "pluginHandle": { + "handle": { "type": "number" }, "configuration": { - "$ref": "http://vamp-plugins.org/json/schema/pluginconfiguration#" + "$ref": "http://vamp-plugins.org/json/schema/configuration#" } }, - "required": [ "pluginHandle", "configuration" ], + "required": [ "handle", "configuration" ], "additionalProperties": false } diff -r 30bd89a8cbeb -r bac1098dbd26 schema/configurationresponse.json --- a/schema/configurationresponse.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/configurationresponse.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,10 +1,10 @@ { "id": "http://vamp-plugins.org/json/schema/configurationresponse#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised response to a request to configure a Vamp plugin; normally served as the content field of an object matching the plain response schema", + "description": "schema for a response to a request to configure a feature extractor; may be served in the result field of a configure-method rpcresponse", "type": "object", "properties": { - "pluginHandle": { + "handle": { "type": "number" }, "outputList": { diff -r 30bd89a8cbeb -r bac1098dbd26 schema/configuredoutputdescriptor.json --- a/schema/configuredoutputdescriptor.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/configuredoutputdescriptor.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/configuredoutputdescriptor#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for the non-static fields of a Vamp::Plugin::OutputDescriptor serialisation", + "description": "schema for the non-static metadata fields of an output descriptor belonging to a feature extractor", "type": "object", "properties": { "unit": { diff -r 30bd89a8cbeb -r bac1098dbd26 schema/enums.json --- a/schema/enums.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/enums.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/enums#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for Vamp serialisation enums", + "description": "schema for common feature extractor enum types", "definitions": { "input_domain": { "type": "string", diff -r 30bd89a8cbeb -r bac1098dbd26 schema/error.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/error.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,16 @@ +{ + "id": "http://vamp-plugins.org/json/schema/error#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for an error object in a response to an rpcrequest", + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "message": { + "type": "string" + } + }, + "required": [ "code", "message" ] +} + diff -r 30bd89a8cbeb -r bac1098dbd26 schema/extractorstaticdata.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/extractorstaticdata.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,53 @@ +{ + "id": "http://vamp-plugins.org/json/schema/pluginstaticdata#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for the static metadata associated with a feature extractor", + "type": "object", + "properties": { + "pluginKey": { + "type": "string" + }, + "basic": { + "$ref": "http://vamp-plugins.org/json/schema/basic#" + }, + "maker": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "pluginVersion": { + "type": "integer" + }, + "category": { + "type": "array", + "items": { "type": "string" } + }, + "minChannelCount": { + "type": "integer" + }, + "maxChannelCount": { + "type": "integer" + }, + "parameters": { + "type": "array", + "items": { "$ref": "http://vamp-plugins.org/json/schema/parameterdescriptor#" } + }, + "programs": { + "type": "array", + "items": { "type": "string" } + }, + "inputDomain": { + "$ref": "http://vamp-plugins.org/json/schema/enums#/definitions/input_domain" + }, + "basicOutputInfo": { + "type": "array", + "items": { "$ref": "http://vamp-plugins.org/json/schema/basic#" } + } + }, + "required": [ "pluginKey", "basic", "pluginVersion", + "minChannelCount", "maxChannelCount", + "inputDomain", "basicOutputInfo" ], + "additionalProperties": false +} + diff -r 30bd89a8cbeb -r bac1098dbd26 schema/feature.json --- a/schema/feature.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/feature.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/feature#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a Vamp::Plugin::Feature serialisation", + "description": "schema for a single feature returned by a feature extractor", "type": "object", "properties": { "timestamp": { @@ -14,16 +14,7 @@ "type": "string" }, "featureValues": { - "anyOf": [ - { - "type": "array", - "items": { "type": "number" } - }, - { - "type": "string", - "pattern": "^[a-zA-Z0-9+/]*=*$" - } - ] + "$ref": "http://vamp-plugins.org/json/schema/serialisedarray#" } }, "additionalProperties": false diff -r 30bd89a8cbeb -r bac1098dbd26 schema/featureset.json --- a/schema/featureset.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/featureset.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/featureset#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a Vamp::Plugin::FeatureSet serialisation", + "description": "schema for a set of features returned by a feature extractor, associating an output id with an array of features from that output", "type": "object", "patternProperties": { "^[a-zA-Z0-9_-]+$": { diff -r 30bd89a8cbeb -r bac1098dbd26 schema/finishrequest.json --- a/schema/finishrequest.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/finishrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,13 +1,13 @@ { "id": "http://vamp-plugins.org/json/schema/finishrequest#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised request to finish processing with a Vamp plugin; normally served as the content field of an object matching the plain request schema", + "description": "schema for a serialised request to finish processing with a feature extractor; may be served in the params field of a finish-method rpcrequest", "type": "object", "properties": { - "pluginHandle": { + "handle": { "type": "number" } }, - "required": [ "pluginHandle" ], + "required": [ "handle" ], "additionalProperties": false } diff -r 30bd89a8cbeb -r bac1098dbd26 schema/finishresponse.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/finishresponse.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,17 @@ +{ + "id": "http://vamp-plugins.org/json/schema/finishresponse#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a response to a request to finishing processing with a feature extractor; may be served in the result field of a finish-method rpcresponse", + "type": "object", + "properties": { + "handle": { + "type": "number" + }, + "features": { + "$ref": "http://vamp-plugins.org/json/schema/featureset#" + } + }, + "required": [ "handle", "features" ], + "additionalProperties": false +} + diff -r 30bd89a8cbeb -r bac1098dbd26 schema/listrequest.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/listrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,9 @@ +{ + "id": "http://vamp-plugins.org/json/schema/listrequest#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a list request for feature extractors; may be served in the params field of a list-method rpcrequest", + "type": "object", + "properties": { + }, + "additionalProperties": false +} diff -r 30bd89a8cbeb -r bac1098dbd26 schema/listresponse.json --- a/schema/listresponse.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/listresponse.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,12 +1,12 @@ { "id": "http://vamp-plugins.org/json/schema/listresponse#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised response to a request to list plugins; normally served as the content field of an object matching the plain response schema", + "description": "schema for a response to a request to list feature extractors; may be served in the result field of a list-method rpcresponse", "type": "object", "properties": { "plugins": { "type": "array", - "items": { "$ref": "http://vamp-plugins.org/json/schema/pluginstaticdata#" } + "items": { "$ref": "http://vamp-plugins.org/json/schema/extractorstaticdata#" } } }, "required": [ "plugins" ], diff -r 30bd89a8cbeb -r bac1098dbd26 schema/loadrequest.json --- a/schema/loadrequest.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/loadrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/loadrequest#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised load request for a Vamp Plugin; normally served as the content field of an object matching the plain request schema", + "description": "schema for a request to load a feature extractor; may be served in the params field of a load-method rpcrequest", "type": "object", "properties": { "pluginKey": { diff -r 30bd89a8cbeb -r bac1098dbd26 schema/loadresponse.json --- a/schema/loadresponse.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/loadresponse.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,17 +1,17 @@ { "id": "http://vamp-plugins.org/json/schema/loadresponse#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised response to a load request for a Vamp Plugin; normally served as the content field of an object matching the plain response schema", + "description": "schema for a response to a request to load a feature extractor; may be served in the result field of a load-method rpcresponse", "type": "object", "properties": { - "pluginHandle": { + "handle": { "type": "number" }, "staticData": { - "$ref": "http://vamp-plugins.org/json/schema/pluginstaticdata#" + "$ref": "http://vamp-plugins.org/json/schema/extractorstaticdata#" }, "defaultConfiguration": { - "$ref": "http://vamp-plugins.org/json/schema/pluginconfiguration#" + "$ref": "http://vamp-plugins.org/json/schema/configuration#" } }, "additionalProperties": false diff -r 30bd89a8cbeb -r bac1098dbd26 schema/outputdescriptor.json --- a/schema/outputdescriptor.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/outputdescriptor.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/outputdescriptor#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a Vamp::Plugin::OutputDescriptor serialisation", + "description": "schema for an output descriptor belonging to a feature extractor", "type": "object", "properties": { "basic": { diff -r 30bd89a8cbeb -r bac1098dbd26 schema/parameterdescriptor.json --- a/schema/parameterdescriptor.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/parameterdescriptor.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/parameterdescriptor#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a Vamp::PluginBase::ParameterDescriptor serialisation", + "description": "schema for a metadata about an adjustable parameter of a feature extractor", "type": "object", "properties": { "basic": { diff -r 30bd89a8cbeb -r bac1098dbd26 schema/pluginconfiguration.json --- a/schema/pluginconfiguration.json Tue Sep 27 15:03:29 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -{ - "id": "http://vamp-plugins.org/json/schema/pluginconfiguration#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised bundle of configuration data associated with a Vamp Plugin", - "type": "object", - "properties": { - "parameterValues": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9_-]+$": { - "type": "number" - } - }, - "additionalProperties": false - }, - "currentProgram": { - "type": "string" - }, - "channelCount": { - "type": "integer" - }, - "stepSize": { - "type": "integer" - }, - "blockSize": { - "type": "integer" - } - }, - "required": [ "channelCount", "stepSize", "blockSize" ], - "additionalProperties": false -} - diff -r 30bd89a8cbeb -r bac1098dbd26 schema/pluginstaticdata.json --- a/schema/pluginstaticdata.json Tue Sep 27 15:03:29 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -{ - "id": "http://vamp-plugins.org/json/schema/pluginstaticdata#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised bundle of the static data associated with a Vamp Plugin", - "type": "object", - "properties": { - "pluginKey": { - "type": "string" - }, - "basic": { - "$ref": "http://vamp-plugins.org/json/schema/basic#" - }, - "maker": { - "type": "string" - }, - "copyright": { - "type": "string" - }, - "pluginVersion": { - "type": "integer" - }, - "category": { - "type": "array", - "items": { "type": "string" } - }, - "minChannelCount": { - "type": "integer" - }, - "maxChannelCount": { - "type": "integer" - }, - "parameters": { - "type": "array", - "items": { "$ref": "http://vamp-plugins.org/json/schema/parameterdescriptor#" } - }, - "programs": { - "type": "array", - "items": { "type": "string" } - }, - "inputDomain": { - "$ref": "http://vamp-plugins.org/json/schema/enums#/definitions/input_domain" - }, - "basicOutputInfo": { - "type": "array", - "items": { "$ref": "http://vamp-plugins.org/json/schema/basic#" } - } - }, - "required": [ "pluginKey", "basic", "pluginVersion", - "minChannelCount", "maxChannelCount", - "inputDomain", "basicOutputInfo" ], - "additionalProperties": false -} - diff -r 30bd89a8cbeb -r bac1098dbd26 schema/processinput.json --- a/schema/processinput.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/processinput.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/processinput#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised input into a plugin process call", + "description": "schema for a chunk of input data provided to a process request", "type": "object", "properties": { "timestamp": { @@ -10,18 +10,9 @@ "inputBuffers": { "type": "array", "items": { - "anyOf": [ - { - "type": "array", - "items": { "type": "number" } - }, - { - "type": "string", - "pattern": "^[a-zA-Z0-9+/]*=*$" - } - ] - } - } + "$ref": "http://vamp-plugins.org/json/schema/serialisedarray#" + } + } }, "additionalProperties": false } diff -r 30bd89a8cbeb -r bac1098dbd26 schema/processrequest.json --- a/schema/processrequest.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/processrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,17 +1,17 @@ { "id": "http://vamp-plugins.org/json/schema/processrequest#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised request to process a data block using a Vamp plugin; normally served as the content field of an object matching the plain request schema", + "description": "schema for a request to process a chunk of data using a feature extractor; may be served in the params field of a process-method rpcrequest", "type": "object", "properties": { - "pluginHandle": { + "handle": { "type": "number" }, "processInput": { "$ref": "http://vamp-plugins.org/json/schema/processinput#" } }, - "required": [ "pluginHandle", "processInput" ], + "required": [ "handle", "processInput" ], "additionalProperties": false } diff -r 30bd89a8cbeb -r bac1098dbd26 schema/processresponse.json --- a/schema/processresponse.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/processresponse.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,17 +1,17 @@ { "id": "http://vamp-plugins.org/json/schema/processresponse#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised response from processing a data block using a Vamp plugin; normally served as the content field of an object matching the plain response schema", + "description": "schema for a response to a request to process a chunk of data using a feature extractor; may be served in the result field of a process-method rpcresponse", "type": "object", "properties": { - "pluginHandle": { + "handle": { "type": "number" }, "features": { "$ref": "http://vamp-plugins.org/json/schema/featureset#" } }, - "required": [ "pluginHandle", "features" ], + "required": [ "handle", "features" ], "additionalProperties": false } diff -r 30bd89a8cbeb -r bac1098dbd26 schema/realtime.json --- a/schema/realtime.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/realtime.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/realtime#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a Vamp::RealTime serialisation", + "description": "schema for a timestamp given in seconds and nanoseconds", "type": "object", "properties": { "s": { "type": "integer" }, diff -r 30bd89a8cbeb -r bac1098dbd26 schema/request.json --- a/schema/request.json Tue Sep 27 15:03:29 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -{ - "id": "http://vamp-plugins.org/json/schema/request#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a simple serialised request", - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "content": { - "anyOf": [ - { "$ref": "http://vamp-plugins.org/json/schema/loadrequest#" }, - { "$ref": "http://vamp-plugins.org/json/schema/configurationrequest#" }, - { "$ref": "http://vamp-plugins.org/json/schema/processrequest#" }, - { "$ref": "http://vamp-plugins.org/json/schema/finishrequest#" } - ] - } - }, - "required": [ "type" ], - "additionalProperties": false -} - diff -r 30bd89a8cbeb -r bac1098dbd26 schema/response.json --- a/schema/response.json Tue Sep 27 15:03:29 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -{ - "id": "http://vamp-plugins.org/json/schema/response#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a success or failure response to a request", - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "errorText": { - "type": "string" - }, - "content": { - "anyOf": [ - { "$ref": "http://vamp-plugins.org/json/schema/listresponse#" }, - { "$ref": "http://vamp-plugins.org/json/schema/loadresponse#" }, - { "$ref": "http://vamp-plugins.org/json/schema/configurationresponse#" }, - { "$ref": "http://vamp-plugins.org/json/schema/processresponse#" }, - { "$ref": "http://vamp-plugins.org/json/schema/finishresponse#" } - ] - } - }, - "required": [ "type", "success" ], - "additionalProperties": false -} - diff -r 30bd89a8cbeb -r bac1098dbd26 schema/rpcrequest.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/rpcrequest.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,32 @@ +{ + "id": "http://vamp-plugins.org/json/schema/rpcrequest#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a serialised request compatible with JSON-RPC", + "type": "object", + "properties": { + "method": { + "type": "string" + }, + "params": { + "anyOf": [ + { "$ref": "http://vamp-plugins.org/json/schema/listrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/loadrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/configurationrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/processrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/finishrequest#" } + ] + }, + "id": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] + }, + "jsonrpc": { + "type": "string" + } + }, + "required": [ "method" ], + "additionalProperties": false +} + diff -r 30bd89a8cbeb -r bac1098dbd26 schema/rpcresponse.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/rpcresponse.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,55 @@ +{ + "id": "http://vamp-plugins.org/json/schema/rpcresponse#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a serialised response to an RPC request; compatible with JSON-RPC, except that the method name must be included here as well as in the request", + "type": "object", + "oneOf": [ { + "properties": { + "method": { + "type": "string" + }, + "result": { + "anyOf": [ + { "$ref": "http://vamp-plugins.org/json/schema/listresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/loadresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/configurationresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/processresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/finishresponse#" } + ] + }, + "id": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] + }, + "jsonrpc": { + "type": "string" + } + }, + "required": [ "method", "result" ], + "additionalProperties": false + }, { + "properties": { + "method": { + "type": "string" + }, + "error": { + "$ref": "http://vamp-plugins.org/json/schema/error#" + }, + "id": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] + }, + "jsonrpc": { + "type": "string" + } + }, + "required": [ "method", "error" ], + "additionalProperties": false + } ] +} + + diff -r 30bd89a8cbeb -r bac1098dbd26 schema/serialisedarray.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/serialisedarray.json Thu Oct 06 13:46:56 2016 +0100 @@ -0,0 +1,20 @@ +{ + "id": "http://vamp-plugins.org/json/schema/serialisedarray#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for alternate serialisations of an array of floating-point values", + "anyOf": [ + { + "type": "array", + "items": { "type": "number" } + }, + { + "type": "string", + "media": { + "binaryEncoding": "base64", + "type": "application/octet-stream" + } + } + ] +} + + diff -r 30bd89a8cbeb -r bac1098dbd26 schema/valueextents.json --- a/schema/valueextents.json Tue Sep 27 15:03:29 2016 +0100 +++ b/schema/valueextents.json Thu Oct 06 13:46:56 2016 +0100 @@ -1,7 +1,7 @@ { "id": "http://vamp-plugins.org/json/schema/valueextents#", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for the extents structure in various Vamp descriptors", + "description": "schema for a structure giving the extents of a value range", "type": "object", "properties": { "min": { "type": "number" }, diff -r 30bd89a8cbeb -r bac1098dbd26 test.sh --- a/test.sh Tue Sep 27 15:03:29 2016 +0100 +++ b/test.sh Thu Oct 06 13:46:56 2016 +0100 @@ -4,12 +4,14 @@ for ex in examples/*.json ; do echo "Checking $ex..." 1>&2 - jsonschema -i "$ex" schema/$(basename "$ex") + jsonschema -i "$ex" schema/$(basename "$ex" | sed 's/-[^.]*//') done for s in schema/*.json ; do if [ ! -f examples/$(basename "$s") ]; then - echo "WARNING: No example file for schema $s" + if ! ls -1 examples/$(basename "$s" .json)-*.json >/dev/null 2>&1; then + echo "WARNING: No example file for schema $s" + fi fi done