# HG changeset patch # User Chris Cannam # Date 1486134273 0 # Node ID 4fed2f3f2cd07d395b9b27a4aa7bbd6d7ec689f6 # Parent 8cf6674998c876d091344dcfff2ad23e4571c534 Add framing structure to capture step + block size, and return this in configuration response diff -r 8cf6674998c8 -r 4fed2f3f2cd0 capnp/piper.capnp --- 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 { diff -r 8cf6674998c8 -r 4fed2f3f2cd0 json/examples/configuration.json --- 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}} diff -r 8cf6674998c8 -r 4fed2f3f2cd0 json/examples/configurationresponse.json --- 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}} diff -r 8cf6674998c8 -r 4fed2f3f2cd0 json/examples/framing.json --- /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} diff -r 8cf6674998c8 -r 4fed2f3f2cd0 json/schema/configuration.json --- 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 } diff -r 8cf6674998c8 -r 4fed2f3f2cd0 json/schema/configurationresponse.json --- 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 } diff -r 8cf6674998c8 -r 4fed2f3f2cd0 json/schema/framing.json --- /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 +}