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: