Mercurial > hg > piper
changeset 191:4fed2f3f2cd0
Add framing structure to capture step + block size, and return this in
configuration response
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Fri, 03 Feb 2017 15:04:33 +0000 |
parents | 8cf6674998c8 |
children | 0898ffd47a10 |
files | capnp/piper.capnp json/examples/configuration.json json/examples/configurationresponse.json json/examples/framing.json json/schema/configuration.json json/schema/configurationresponse.json json/schema/framing.json |
diffstat | 7 files changed, 35 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/capnp/piper.capnp Fri Jan 20 11:09:40 2017 +0000 +++ b/capnp/piper.capnp Fri Feb 03 15:04:33 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 Fri Feb 03 15:04:33 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/configurationresponse.json Fri Jan 20 11:09:40 2017 +0000 +++ b/json/examples/configurationresponse.json Fri Feb 03 15:04:33 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 Fri Feb 03 15:04:33 2017 +0000 @@ -0,0 +1,1 @@ +{"stepSize": 12, "blockSize": 360}
--- a/json/schema/configuration.json Fri Jan 20 11:09:40 2017 +0000 +++ b/json/schema/configuration.json Fri Feb 03 15:04:33 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 Fri Feb 03 15:04:33 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 Fri Feb 03 15:04:33 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 +}