Chris@37: /* Chris@37: jVamp Chris@37: Chris@37: A Java host interface for Vamp audio analysis plugins Chris@37: Chris@37: Centre for Digital Music, Queen Mary, University of London. Chris@37: Copyright 2012 Chris Cannam and QMUL. Chris@37: Chris@37: Permission is hereby granted, free of charge, to any person Chris@37: obtaining a copy of this software and associated documentation Chris@37: files (the "Software"), to deal in the Software without Chris@37: restriction, including without limitation the rights to use, copy, Chris@37: modify, merge, publish, distribute, sublicense, and/or sell copies Chris@37: of the Software, and to permit persons to whom the Software is Chris@37: furnished to do so, subject to the following conditions: Chris@37: Chris@37: The above copyright notice and this permission notice shall be Chris@37: included in all copies or substantial portions of the Software. Chris@37: Chris@37: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, Chris@37: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF Chris@37: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND Chris@37: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR Chris@37: ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF Chris@37: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION Chris@37: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Chris@37: Chris@37: Except as contained in this notice, the names of the Centre for Chris@37: Digital Music; Queen Mary, University of London; and Chris Cannam Chris@37: shall not be used in advertising or otherwise to promote the sale, Chris@37: use or other dealings in this Software without prior written Chris@37: authorization. Chris@37: */ Chris@3: Chris@3: package org.vamp_plugins; Chris@3: Chris@28: /** Chris@28: * ParameterDescriptor describes the properties of a configurable Chris@28: * parameter of a Plugin. Chris@28: */ Chris@3: public class ParameterDescriptor { Chris@28: Chris@28: /** Chris@28: * The name of the parameter, in computer-usable form. Will Chris@28: * contain only the characters [a-zA-Z0-9_-]. Chris@28: */ Chris@3: public String identifier; Chris@28: Chris@28: /** Chris@28: * The human-readable name of the parameter. Chris@28: */ Chris@3: public String name; Chris@28: Chris@28: /** Chris@28: * A human-readable short text describing the parameter. May be Chris@28: * empty if the name has said it all already. Chris@28: */ Chris@3: public String description; Chris@28: Chris@28: /** Chris@28: * The unit of the parameter, in human-readable form. Chris@28: */ Chris@3: public String unit; Chris@28: Chris@28: /** Chris@28: * The minimum value of the parameter. Chris@28: */ Chris@3: public float minValue; Chris@28: Chris@28: /** Chris@28: * The maximum value of the parameter. Chris@28: */ Chris@3: public float maxValue; Chris@28: Chris@28: /** Chris@28: * The default value of the parameter. The plugin should Chris@28: * ensure that parameters have this value on initialisation Chris@28: * (i.e. the host is not required to explicitly set parameters Chris@28: * if it wants to use their default values). Chris@28: */ Chris@3: public float defaultValue; Chris@28: Chris@28: /** Chris@28: * True if the parameter values are quantized to a particular Chris@28: * resolution. Chris@28: */ Chris@3: public boolean isQuantized; Chris@28: Chris@28: /** Chris@28: * Quantization resolution of the parameter values (e.g. 1.0 Chris@28: * if they are all integers). Undefined if isQuantized is Chris@28: * false. Chris@28: */ Chris@3: public float quantizeStep; Chris@28: Chris@28: /** Chris@28: * Names for the quantized values. If isQuantized is true, Chris@28: * this may either be empty or contain one string for each of Chris@28: * the quantize steps from minValue up to maxValue inclusive. Chris@28: * Undefined if isQuantized is false. Chris@28: * Chris@28: * If these names are provided, they should be shown to the Chris@28: * user in preference to the values themselves. The user may Chris@28: * never see the actual numeric values unless they are also Chris@28: * encoded in the names. Chris@28: */ Chris@3: public String[] valueNames; Chris@3: Chris@3: ParameterDescriptor() { Chris@3: minValue = 0; Chris@3: maxValue = 0; Chris@3: defaultValue = 0; Chris@3: isQuantized = false; Chris@3: } Chris@3: } Chris@3: