changeset 193:99d11195224b

Merge pull request #1 from piper-audio/dev/step-and-block-size Dev/step and block size
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 06 Feb 2017 11:31:16 +0000
parents 8cf6674998c8 (current diff) 0898ffd47a10 (diff)
children 27a4650dae00
files
diffstat 10 files changed, 38 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/capnp/piper.capnp	Fri Jan 20 11:09:40 2017 +0000
+++ b/capnp/piper.capnp	Mon Feb 06 11:31:16 2017 +0000
@@ -94,6 +94,11 @@
     featurePairs       @0  :List(FSPair);
 }
 
+struct Framing {
+    stepSize           @0  :Int32;
+    blockSize          @1  :Int32;
+}
+
 struct Configuration {
     struct PVPair {
         parameter      @0  :Text;
@@ -102,8 +107,7 @@
     parameterValues    @0  :List(PVPair);
     currentProgram     @1  :Text;
     channelCount       @2  :Int32;
-    stepSize           @3  :Int32;
-    blockSize          @4  :Int32;
+    framing            @3  :Framing;
 }
 
 enum AdapterFlag {
@@ -146,6 +150,7 @@
 struct ConfigurationResponse {
     handle             @0  :Int32;
     outputs            @1  :List(OutputDescriptor);
+    framing            @2  :Framing;
 }
 
 struct ProcessRequest {
--- a/json/examples/configuration.json	Fri Jan 20 11:09:40 2017 +0000
+++ b/json/examples/configuration.json	Mon Feb 06 11:31:16 2017 +0000
@@ -1,1 +1,1 @@
-{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}
+{"framing":{"blockSize": 512,"stepSize":1024}, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}}
--- a/json/examples/configurationrequest.json	Fri Jan 20 11:09:40 2017 +0000
+++ b/json/examples/configurationrequest.json	Mon Feb 06 11:31:16 2017 +0000
@@ -1,1 +1,1 @@
-{"handle":12345,"configuration":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}}
+{"handle":12345,"configuration":{"framing":{"blockSize": 512,"stepSize":1024}, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}}}
--- a/json/examples/configurationresponse.json	Fri Jan 20 11:09:40 2017 +0000
+++ b/json/examples/configurationresponse.json	Mon Feb 06 11:31:16 2017 +0000
@@ -1,1 +1,1 @@
-{"handle": 14,"outputList": [{"basic": {"description": "Percussive note onset locations", "identifier": "onsets", "name": "Onsets"}, "configured": { "binCount": 0, "binNames": [], "hasDuration": false, "sampleRate": 44100, "sampleType": "VariableSampleRate", "unit": ""}}, {"basic": {"description": "Broadband energy rise detection function", "identifier": "detectionfunction", "name": "Detection Function"}, "configured": { "binCount": 1, "binNames": [""], "hasDuration": false, "quantizeStep": 1, "sampleRate": 44100, "sampleType": "OneSamplePerStep", "unit": ""}}]}
+{"handle": 14,"outputList": [{"basic": {"description": "Percussive note onset locations", "identifier": "onsets", "name": "Onsets"}, "configured": { "binCount": 0, "binNames": [], "hasDuration": false, "sampleRate": 44100, "sampleType": "VariableSampleRate", "unit": ""}}, {"basic": {"description": "Broadband energy rise detection function", "identifier": "detectionfunction", "name": "Detection Function"}, "configured": { "binCount": 1, "binNames": [""], "hasDuration": false, "quantizeStep": 1, "sampleRate": 44100, "sampleType": "OneSamplePerStep", "unit": ""}}],"framing":{"stepSize": 1024, "blockSize": 2048}}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/json/examples/framing.json	Mon Feb 06 11:31:16 2017 +0000
@@ -0,0 +1,1 @@
+{"stepSize": 12, "blockSize": 360}
--- a/json/examples/loadresponse.json	Fri Jan 20 11:09:40 2017 +0000
+++ b/json/examples/loadresponse.json	Mon Feb 06 11:31:16 2017 +0000
@@ -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"], "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},"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", "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}}}
--- a/json/examples/rpcresponse-ok.json	Fri Jan 20 11:09:40 2017 +0000
+++ b/json/examples/rpcresponse-ok.json	Mon Feb 06 11:31:16 2017 +0000
@@ -1,1 +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", "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":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}},"id": "6"}
+{"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", "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}}},"id": "6"}
--- a/json/schema/configuration.json	Fri Jan 20 11:09:40 2017 +0000
+++ b/json/schema/configuration.json	Mon Feb 06 11:31:16 2017 +0000
@@ -19,14 +19,11 @@
 	"channelCount": {
 	    "type": "integer"
 	},
-	"stepSize": {
-	    "type": "integer"
-	},
-	"blockSize": {
-	    "type": "integer"
-	}
+        "framing": {
+	    "$ref": "http://vamp-plugins.org/piper/json/schema/framing#"
+        }
     },
-    "required": [ "channelCount", "stepSize", "blockSize" ],
+    "required": [ "channelCount", "framing" ],
     "additionalProperties": false
 }
 
--- a/json/schema/configurationresponse.json	Fri Jan 20 11:09:40 2017 +0000
+++ b/json/schema/configurationresponse.json	Mon Feb 06 11:31:16 2017 +0000
@@ -10,9 +10,12 @@
 	"outputList": {
 	    "type": "array",
 	    "items": { "$ref": "http://vamp-plugins.org/piper/json/schema/outputdescriptor#" }
-	}
+	},
+        "framing": {
+	    "$ref": "http://vamp-plugins.org/piper/json/schema/framing#"
+        }
     },
-    "required": [ "handle", "outputList" ],
+    "required": [ "handle", "outputList", "framing" ],
     "additionalProperties": false
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/json/schema/framing.json	Mon Feb 06 11:31:16 2017 +0000
@@ -0,0 +1,16 @@
+{
+    "id": "http://vamp-plugins.org/piper/json/schema/framing#",
+    "$schema": "http://json-schema.org/draft-04/schema#",
+    "description": "schema for step size and block size used when framing audio sample data",
+    "type": "object",
+    "properties": {
+	"stepSize": {
+	    "type": "integer"
+	},
+	"blockSize": {
+	    "type": "integer"
+	}
+    },
+    "required": [ "stepSize", "blockSize" ],
+    "additionalProperties": false
+}