changeset 58:a0a6cc6c72cb

Add configured output descriptor, split from output descriptor
author Chris Cannam
date Fri, 23 Sep 2016 13:06:34 +0100
parents d1259ec8121b
children b20a0020530d
files examples/configuredoutputdescriptor.json examples/outputdescriptor.json schema/configuredoutputdescriptor.json schema/outputdescriptor.json
diffstat 4 files changed, 48 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/configuredoutputdescriptor.json	Fri Sep 23 13:06:34 2016 +0100
@@ -0,0 +1,2 @@
+{"binCount": 513, "binNames": [], "hasDuration": false, "sampleRate": 0, "sampleType": "OneSamplePerStep", "unit": ""}
+
--- a/examples/outputdescriptor.json	Fri Sep 23 10:16:10 2016 +0100
+++ b/examples/outputdescriptor.json	Fri Sep 23 13:06:34 2016 +0100
@@ -1,2 +1,1 @@
-{"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": ""}
-
+{"basic": {"description": "Power values of the frequency spectrum bins calculated from the input signal", "identifier": "powerspectrum", "name": "Power Spectrum"}, "configured": { "binCount": 513, "binNames": [], "hasDuration": false, "sampleRate": 0, "sampleType": "OneSamplePerStep", "unit": ""}}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/schema/configuredoutputdescriptor.json	Fri Sep 23 13:06:34 2016 +0100
@@ -0,0 +1,42 @@
+{
+  "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",
+  "type": "object",
+  "properties": {
+  "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": [ "sampleType", "hasDuration" ],
+  "additionalProperties": false
+}
+
--- a/schema/outputdescriptor.json	Fri Sep 23 10:16:10 2016 +0100
+++ b/schema/outputdescriptor.json	Fri Sep 23 13:06:34 2016 +0100
@@ -7,39 +7,11 @@
 	"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"
+	"configured": {
+	    "$ref": "http://vamp-plugins.org/json/schema/configuredoutputdescriptor#"
 	}
     },
-    "required": [ "basic", "sampleType", "hasDuration" ],
+    "required": [ "basic", "configured" ],
     "additionalProperties": false
 }