Mercurial > hg > piper
changeset 23:9a1d22e14472
Start putting together JSON schema for Vamp plugin serialisations
author | Chris Cannam |
---|---|
date | Tue, 08 Mar 2016 13:01:53 +0000 |
parents | |
children | 61975048614a |
files | basic.json enums.json outputdescriptor.json realtime.json |
diffstat | 4 files changed, 88 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/basic.json Tue Mar 08 13:01:53 2016 +0000 @@ -0,0 +1,13 @@ +{ + "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", + "type": "object", + "properties": { + "identifier": { "type": "string" }, + "name": { "type": "string" }, + "description": { "type": "string" } + }, + "required": [ "identifier" ], + "additionalProperties": false +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/enums.json Tue Mar 08 13:01:53 2016 +0000 @@ -0,0 +1,17 @@ +{ + "id": "http://vamp-plugins.org/json/schema/enums#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for Vamp serialisation enums", + "definitions": { + "input_domain": { + "enum": [ "TimeDomain", "FrequencyDomain" ] + }, + "sample_type": { + "enum": [ "OneSamplePerStep", "FixedSampleRate", "VariableSampleRate" ] + }, + "adapter_flags": { + "enum": [ "AdaptNone", "AdaptInputDomain", "AdaptChannelCount", + "AdaptBufferSize", "AdaptAllSafe", "AdaptAll" ] + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/outputdescriptor.json Tue Mar 08 13:01:53 2016 +0000 @@ -0,0 +1,45 @@ +{ + "id": "http://vamp-plugins.org/json/schema/outputdescriptor#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a Vamp::Plugin::OutputDescriptor serialisation", + "type": "object", + "properties": { + "basic": { + "$ref": "http://vamp-plugins.org/json/schema/basic#" + }, + "unit": { + "type": "string" + }, + "binCount": { + "type": "integer" + }, + "binNames": { + "type": "array", + "items": { "type": "string" } + }, + "extents": { + "type": "object", + "properties": { + "min": { "type": "number" }, + "max": { "type": "number" } + }, + "required": [ "min", "max" ], + "additionalProperties": false + }, + "quantizeStep": { + "type": "number" + }, + "sampleType": { + "$ref": "http://vamp-plugins.org/json/schema/enums#/definitions/sample_type" + }, + "sampleRate": { + "type": "number" + }, + "hasDuration": { + "type": "boolean" + } + }, + "required": [ "basic", "sampleType", "hasDuration" ], + "additionalProperties": false +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/realtime.json Tue Mar 08 13:01:53 2016 +0000 @@ -0,0 +1,13 @@ +{ + "id": "http://vamp-plugins.org/json/schema/realtime#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a Vamp::RealTime serialisation", + "type": "object", + "properties": { + "s": { "type": "integer" }, + "n": { "type": "integer" } + }, + "required": [ "s", "n" ], + "additionalProperties": false +} +