Mercurial > hg > piper
changeset 145:78c5a6d3a1b6
List response is an object, with plugins field; add finish request schema and example
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Fri, 23 Sep 2016 14:19:32 +0100 |
parents | a2c41b5fcc0b |
children | b521ca16c51d |
files | examples/finishrequest.json examples/listresponse.json schema/finishrequest.json schema/listresponse.json |
diffstat | 4 files changed, 302 insertions(+), 279 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/finishrequest.json Fri Sep 23 14:19:32 2016 +0100 @@ -0,0 +1,1 @@ +{"pluginHandle": 1}
--- a/examples/listresponse.json Fri Sep 23 13:13:21 2016 +0100 +++ b/examples/listresponse.json Fri Sep 23 14:19:32 2016 +0100 @@ -1,282 +1,284 @@ -[ - { - "basic": { - "description": "Track the amplitude of the audio signal", - "identifier": "amplitudefollower", - "name": "Amplitude Follower" - }, - "basicOutputInfo": [ - { - "description": "The peak tracked amplitude for the current processing block", - "identifier": "amplitude", - "name": "Amplitude" - } - ], - "category": [], - "copyright": "Code copyright 2006 Dan Stowell; method from SuperCollider. Freely redistributable (BSD license)", - "inputDomain": "TimeDomain", - "maker": "Vamp SDK Example Plugins", - "maxChannelCount": 1, - "minChannelCount": 1, - "parameters": [ - { - "basic": { - "description": "The 60dB convergence time for an increase in amplitude", - "identifier": "attack", - "name": "Attack time" +{ + "plugins": [ + { + "basic": { + "description": "Track the amplitude of the audio signal", + "identifier": "amplitudefollower", + "name": "Amplitude Follower" + }, + "basicOutputInfo": [ + { + "description": "The peak tracked amplitude for the current processing block", + "identifier": "amplitude", + "name": "Amplitude" + } + ], + "category": [], + "copyright": "Code copyright 2006 Dan Stowell; method from SuperCollider. Freely redistributable (BSD license)", + "inputDomain": "TimeDomain", + "maker": "Vamp SDK Example Plugins", + "maxChannelCount": 1, + "minChannelCount": 1, + "parameters": [ + { + "basic": { + "description": "The 60dB convergence time for an increase in amplitude", + "identifier": "attack", + "name": "Attack time" + }, + "defaultValue": 0.0099999997764825821, + "extents": { + "max": 1, + "min": 0 + }, + "unit": "s", + "valueNames": [] + }, + { + "basic": { + "description": "The 60dB convergence time for a decrease in amplitude", + "identifier": "release", + "name": "Release time" + }, + "defaultValue": 0.0099999997764825821, + "extents": { + "max": 1, + "min": 0 + }, + "unit": "s", + "valueNames": [] + } + ], + "pluginKey": "vamp-example-plugins:amplitudefollower", + "pluginVersion": 1, + "programs": [] }, - "defaultValue": 0.0099999997764825821, - "extents": { - "max": 1, - "min": 0 + { + "basic": { + "description": "Study a short section of audio and estimate its tempo, assuming the tempo is constant", + "identifier": "fixedtempo", + "name": "Simple Fixed Tempo Estimator" + }, + "basicOutputInfo": [ + { + "description": "Estimated tempo", + "identifier": "tempo", + "name": "Tempo" + }, + { + "description": "Possible tempo estimates, one per bin with the most likely in the first bin", + "identifier": "candidates", + "name": "Tempo candidates" + }, + { + "description": "Onset detection function", + "identifier": "detectionfunction", + "name": "Detection Function" + }, + { + "description": "Autocorrelation of onset detection function", + "identifier": "acf", + "name": "Autocorrelation Function" + }, + { + "description": "Filtered autocorrelation of onset detection function", + "identifier": "filtered_acf", + "name": "Filtered Autocorrelation" + } + ], + "category": [], + "copyright": "Code copyright 2008 Queen Mary, University of London. Freely redistributable (BSD license)", + "inputDomain": "FrequencyDomain", + "maker": "Vamp SDK Example Plugins", + "maxChannelCount": 1, + "minChannelCount": 1, + "parameters": [ + { + "basic": { + "description": "Minimum beat-per-minute value which the tempo estimator is able to return", + "identifier": "minbpm", + "name": "Minimum estimated tempo" + }, + "defaultValue": 50, + "extents": { + "max": 360, + "min": 10 + }, + "unit": "bpm", + "valueNames": [] + }, + { + "basic": { + "description": "Maximum beat-per-minute value which the tempo estimator is able to return", + "identifier": "maxbpm", + "name": "Maximum estimated tempo" + }, + "defaultValue": 190, + "extents": { + "max": 360, + "min": 10 + }, + "unit": "bpm", + "valueNames": [] + }, + { + "basic": { + "description": "Length of audio input, in seconds, which should be taken into account when estimating tempo. There is no need to supply the plugin with any further input once this time has elapsed since the start of the audio. The tempo estimator may use only the first part of this, up to eight times the slowest beat duration: increasing this value further than that is unlikely to improve results.", + "identifier": "maxdflen", + "name": "Input duration to study" + }, + "defaultValue": 10, + "extents": { + "max": 40, + "min": 2 + }, + "unit": "s", + "valueNames": [] + } + ], + "pluginKey": "vamp-example-plugins:fixedtempo", + "pluginVersion": 1, + "programs": [] }, - "unit": "s", - "valueNames": [] - }, - { - "basic": { - "description": "The 60dB convergence time for a decrease in amplitude", - "identifier": "release", - "name": "Release time" + { + "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": [], + "copyright": "Code copyright 2006 Queen Mary, University of London, after Dan Barry et al 2005. Freely redistributable (BSD license)", + "inputDomain": "FrequencyDomain", + "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": [] + } + ], + "pluginKey": "vamp-example-plugins:percussiononsets", + "pluginVersion": 2, + "programs": [] }, - "defaultValue": 0.0099999997764825821, - "extents": { - "max": 1, - "min": 0 + { + "basic": { + "description": "Return the power spectrum of a signal", + "identifier": "powerspectrum", + "name": "Simple Power Spectrum" + }, + "basicOutputInfo": [ + { + "description": "Power values of the frequency spectrum bins calculated from the input signal", + "identifier": "powerspectrum", + "name": "Power Spectrum" + } + ], + "category": [], + "copyright": "Freely redistributable (BSD license)", + "inputDomain": "FrequencyDomain", + "maker": "Vamp SDK Example Plugins", + "maxChannelCount": 1, + "minChannelCount": 1, + "parameters": [], + "pluginKey": "vamp-example-plugins:powerspectrum", + "pluginVersion": 1, + "programs": [] }, - "unit": "s", - "valueNames": [] - } - ], - "pluginKey": "vamp-example-plugins:amplitudefollower", - "pluginVersion": 1, - "programs": [] - }, - { - "basic": { - "description": "Study a short section of audio and estimate its tempo, assuming the tempo is constant", - "identifier": "fixedtempo", - "name": "Simple Fixed Tempo Estimator" - }, - "basicOutputInfo": [ - { - "description": "Estimated tempo", - "identifier": "tempo", - "name": "Tempo" - }, - { - "description": "Possible tempo estimates, one per bin with the most likely in the first bin", - "identifier": "candidates", - "name": "Tempo candidates" - }, - { - "description": "Onset detection function", - "identifier": "detectionfunction", - "name": "Detection Function" - }, - { - "description": "Autocorrelation of onset detection function", - "identifier": "acf", - "name": "Autocorrelation Function" - }, - { - "description": "Filtered autocorrelation of onset detection function", - "identifier": "filtered_acf", - "name": "Filtered Autocorrelation" - } - ], - "category": [], - "copyright": "Code copyright 2008 Queen Mary, University of London. Freely redistributable (BSD license)", - "inputDomain": "FrequencyDomain", - "maker": "Vamp SDK Example Plugins", - "maxChannelCount": 1, - "minChannelCount": 1, - "parameters": [ - { - "basic": { - "description": "Minimum beat-per-minute value which the tempo estimator is able to return", - "identifier": "minbpm", - "name": "Minimum estimated tempo" + { + "basic": { + "description": "Calculate the centroid frequency of the spectrum of the input signal", + "identifier": "spectralcentroid", + "name": "Spectral Centroid" + }, + "basicOutputInfo": [ + { + "description": "Centroid of the log weighted frequency spectrum", + "identifier": "logcentroid", + "name": "Log Frequency Centroid" + }, + { + "description": "Centroid of the linear frequency spectrum", + "identifier": "linearcentroid", + "name": "Linear Frequency Centroid" + } + ], + "category": [], + "copyright": "Freely redistributable (BSD license)", + "inputDomain": "FrequencyDomain", + "maker": "Vamp SDK Example Plugins", + "maxChannelCount": 1, + "minChannelCount": 1, + "parameters": [], + "pluginKey": "vamp-example-plugins:spectralcentroid", + "pluginVersion": 2, + "programs": [] }, - "defaultValue": 50, - "extents": { - "max": 360, - "min": 10 - }, - "unit": "bpm", - "valueNames": [] - }, - { - "basic": { - "description": "Maximum beat-per-minute value which the tempo estimator is able to return", - "identifier": "maxbpm", - "name": "Maximum estimated tempo" - }, - "defaultValue": 190, - "extents": { - "max": 360, - "min": 10 - }, - "unit": "bpm", - "valueNames": [] - }, - { - "basic": { - "description": "Length of audio input, in seconds, which should be taken into account when estimating tempo. There is no need to supply the plugin with any further input once this time has elapsed since the start of the audio. The tempo estimator may use only the first part of this, up to eight times the slowest beat duration: increasing this value further than that is unlikely to improve results.", - "identifier": "maxdflen", - "name": "Input duration to study" - }, - "defaultValue": 10, - "extents": { - "max": 40, - "min": 2 - }, - "unit": "s", - "valueNames": [] - } - ], - "pluginKey": "vamp-example-plugins:fixedtempo", - "pluginVersion": 1, - "programs": [] - }, - { - "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": [], - "copyright": "Code copyright 2006 Queen Mary, University of London, after Dan Barry et al 2005. Freely redistributable (BSD license)", - "inputDomain": "FrequencyDomain", - "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": [] - } - ], - "pluginKey": "vamp-example-plugins:percussiononsets", - "pluginVersion": 2, - "programs": [] - }, - { - "basic": { - "description": "Return the power spectrum of a signal", - "identifier": "powerspectrum", - "name": "Simple Power Spectrum" - }, - "basicOutputInfo": [ - { - "description": "Power values of the frequency spectrum bins calculated from the input signal", - "identifier": "powerspectrum", - "name": "Power Spectrum" - } - ], - "category": [], - "copyright": "Freely redistributable (BSD license)", - "inputDomain": "FrequencyDomain", - "maker": "Vamp SDK Example Plugins", - "maxChannelCount": 1, - "minChannelCount": 1, - "parameters": [], - "pluginKey": "vamp-example-plugins:powerspectrum", - "pluginVersion": 1, - "programs": [] - }, - { - "basic": { - "description": "Calculate the centroid frequency of the spectrum of the input signal", - "identifier": "spectralcentroid", - "name": "Spectral Centroid" - }, - "basicOutputInfo": [ - { - "description": "Centroid of the log weighted frequency spectrum", - "identifier": "logcentroid", - "name": "Log Frequency Centroid" - }, - { - "description": "Centroid of the linear frequency spectrum", - "identifier": "linearcentroid", - "name": "Linear Frequency Centroid" - } - ], - "category": [], - "copyright": "Freely redistributable (BSD license)", - "inputDomain": "FrequencyDomain", - "maker": "Vamp SDK Example Plugins", - "maxChannelCount": 1, - "minChannelCount": 1, - "parameters": [], - "pluginKey": "vamp-example-plugins:spectralcentroid", - "pluginVersion": 2, - "programs": [] - }, - { - "basic": { - "description": "Detect and count zero crossing points", - "identifier": "zerocrossing", - "name": "Zero Crossings" - }, - "basicOutputInfo": [ - { - "description": "The number of zero crossing points per processing block", - "identifier": "counts", - "name": "Zero Crossing Counts" - }, - { - "description": "The locations of zero crossing points", - "identifier": "zerocrossings", - "name": "Zero Crossings" - } - ], - "category": [], - "copyright": "Freely redistributable (BSD license)", - "inputDomain": "TimeDomain", - "maker": "Vamp SDK Example Plugins", - "maxChannelCount": 1, - "minChannelCount": 1, - "parameters": [], - "pluginKey": "vamp-example-plugins:zerocrossing", - "pluginVersion": 2, - "programs": [] - } -] + { + "basic": { + "description": "Detect and count zero crossing points", + "identifier": "zerocrossing", + "name": "Zero Crossings" + }, + "basicOutputInfo": [ + { + "description": "The number of zero crossing points per processing block", + "identifier": "counts", + "name": "Zero Crossing Counts" + }, + { + "description": "The locations of zero crossing points", + "identifier": "zerocrossings", + "name": "Zero Crossings" + } + ], + "category": [], + "copyright": "Freely redistributable (BSD license)", + "inputDomain": "TimeDomain", + "maker": "Vamp SDK Example Plugins", + "maxChannelCount": 1, + "minChannelCount": 1, + "parameters": [], + "pluginKey": "vamp-example-plugins:zerocrossing", + "pluginVersion": 2, + "programs": [] + } + ] +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/finishrequest.json Fri Sep 23 14:19:32 2016 +0100 @@ -0,0 +1,13 @@ +{ + "id": "http://vamp-plugins.org/json/schema/finishrequest#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a serialised request to finish processing with a Vamp plugin; normally served as the content field of an object matching the plain request schema", + "type": "object", + "properties": { + "pluginHandle": { + "type": "number" + } + }, + "required": [ "pluginHandle" ], + "additionalProperties": false +}
--- a/schema/listresponse.json Fri Sep 23 13:13:21 2016 +0100 +++ b/schema/listresponse.json Fri Sep 23 14:19:32 2016 +0100 @@ -2,6 +2,13 @@ "id": "http://vamp-plugins.org/json/schema/listresponse#", "$schema": "http://json-schema.org/draft-04/schema#", "description": "schema for a serialised response to a request to list plugins; normally served as the content field of an object matching the plain response schema", - "type": "array", - "items": { "$ref": "http://vamp-plugins.org/json/schema/pluginstaticdata#" } + "type": "object", + "properties": { + "plugins": { + "type": "array", + "items": { "$ref": "http://vamp-plugins.org/json/schema/pluginstaticdata#" } + } + }, + "required": [ "plugins" ], + "additionalProperties": false }