changeset 214:970fd3bd8c92

Ah, the programParameters can't be static data because parameter values in general (e.g. the default configuration) aren't known until construction - and we can't query the program-parameter relationship from e.g. static Vamp plugin data either. Move to the load response structure.
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 07 Apr 2020 15:40:38 +0100
parents 5e3397af978f
children 8923b382c055
files json/examples/extractorstaticdata.json json/examples/loadresponse.json json/schema/extractorstaticdata.json json/schema/loadresponse.json
diffstat 4 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/json/examples/extractorstaticdata.json	Mon Apr 06 17:57:06 2020 +0100
+++ b/json/examples/extractorstaticdata.json	Tue Apr 07 15:40:38 2020 +0100
@@ -1,1 +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"], "rights": "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": ["program1"], "programParameters": {"program1": {"threshold": 10, "sensitivity": 0}, "program2": {"threshold": 0}}, "staticOutputInfo": {"onsets": {"typeURI": "http://purl.org/ontology/af/Onset"}, "detectionfunction": {"typeURI": "http://purl.org/ontology/af/OnsetDetectionFunction"}}, "version": 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"], "rights": "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": ["program1"], "staticOutputInfo": {"onsets": {"typeURI": "http://purl.org/ontology/af/Onset"}, "detectionfunction": {"typeURI": "http://purl.org/ontology/af/OnsetDetectionFunction"}}, "version": 2}
--- a/json/examples/loadresponse.json	Mon Apr 06 17:57:06 2020 +0100
+++ b/json/examples/loadresponse.json	Tue Apr 07 15:40:38 2020 +0100
@@ -1,1 +1,1 @@
-{"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"], "rights": "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},"defaultConfiguration":{"framing":{"blockSize": 512, "stepSize": 1024}, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}}}
+{"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"], "rights": "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},"defaultConfiguration":{"framing":{"blockSize": 512, "stepSize": 1024}, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}}, "programParameters": {"program1": {"threshold": 10, "sensitivity": 0}, "program2": {"threshold": 0}}}
--- a/json/schema/extractorstaticdata.json	Mon Apr 06 17:57:06 2020 +0100
+++ b/json/schema/extractorstaticdata.json	Tue Apr 07 15:40:38 2020 +0100
@@ -37,19 +37,6 @@
 	    "type": "array",
 	    "items": { "type": "string" }
 	},
-        "programParameters": {
-            "type": "object",
-            "patternProperties": {
-		"^[a-zA-Z0-9_-]+$": {
-	            "type": "object",
-	            "patternProperties": {
-		        "^[a-zA-Z0-9_-]+$": {
-		            "type": "number"
-		        }
-                    }
-                }
-            }
-        },
 	"inputDomain": {
 	    "$ref": "http://vamp-plugins.org/piper/json/schema/enums#/definitions/input_domain"
 	},
--- a/json/schema/loadresponse.json	Mon Apr 06 17:57:06 2020 +0100
+++ b/json/schema/loadresponse.json	Tue Apr 07 15:40:38 2020 +0100
@@ -12,7 +12,20 @@
 	},
 	"defaultConfiguration": {
 	    "$ref": "http://vamp-plugins.org/piper/json/schema/configuration#"
-	}
+	},
+        "programParameters": {
+            "type": "object",
+            "patternProperties": {
+		"^[a-zA-Z0-9_-]+$": {
+	            "type": "object",
+	            "patternProperties": {
+		        "^[a-zA-Z0-9_-]+$": {
+		            "type": "number"
+		        }
+                    }
+                }
+            }
+        }
     },
     "required": [ "handle", "staticData", "defaultConfiguration" ],
     "additionalProperties": false