Node Properties: parameter
The parameter node supports the following properties:
Basic Properties
index (required)
Type: unsigned int
The zero-based index of the plugin parameter.
name
Type: string
The name to display for this parameter instead of the default plugin parameter name.
valueMinimum
Type: int
The minimum value of this parameter.
valueMaximum
Type: int
The maximum value of this parameter.
valueDefault
Type: int
The default value of this parameter.
isIntRange
Type: bool
Set to true if the value range of this parameter is integer-based.
isToggle
Type: bool
Set to true if this parameter is a simple Off/On toggle. Implicitly sets valueMinimum, valueMaximum, and isIntRange.
Advanced Properties
matchedName
Type: string
The name of this parameter that should match the extracted parameter name if ParameterNames is set as matchingMode on the module.
quantizeDefault
Type: int
The default value of this parameter when the quantize mode is enabled.
quantizeMinimum
Type: int
The minimum value of this parameter when the quantize mode is enabled.
quantizeMaximum
Type: int
The maximum value of this parameter when the quantize mode is enabled.
hide
Type: bool
Set to true to hide a parameter. Useful when using a matchingMode that requires all parameters to be present in a module for detection purposes but some of these parameters are actually unused.
unusedIf
Type: string (math expression)
A math expression that evaluates whether this parameter is unused. Use p10 to refer to the value of the parameter at index 10. If no matchingMode is defined for this module, p10 evaluates the global parameter index. If a matchingMode is defined, p10 refers to the parameter index relative to the module's first parameter. If the expression evaluates to 1.0, the parameter is considered unused (it will be greyed out and stop displaying a parameter value on the E1).
hideIfUnused
Type: bool
Set to true to hide a parameter that is considered unused (via the unusedIf property) instead of displaying it as greyed out.
valueToString
Type: array of objects
When there is only one object, which is the most common use case, all the object needs to have is a valueTexts or a valueExpression.
If there are more than two objects, then a string field named condition defined like unusedIf is required. This condition is used to decide which of the given objects should be used at runtime. Usually, this will depend on the value of a different parameter.
When defining a valueExpression, you can optionally add a formattingProfile, a unitConversionProfiles or/and a unit at the same level to control how the parameter value will look like.
There's also a section with examples: ValueToString Examples
condition
Type: string (math expression)
Required when the valueToString array has more than one object, but useless if it has exactly one object.
Apart from the different field name, it works exactly like unusedIf.
Is defined at the same hierarchy level as valueTexts and valueExpression.
valueTexts
Type: array of string
An array of strings representing the value texts for this parameter. Implicitly sets valueMinimum, valueMaximum, and isIntRange.
valueExpression
Type: string
A mathematical expression to convert a plugin's normalized parameter value (ranging from 0.0 to 1.0) into a more meaningful value (e.g., from 20 Hz to 20,000 Hz). This is especially useful for plugins that don't report their parameter values in meaningful units, such as those in Reason Rack or VCV Rack.
The current normalized parameter value from the plugin is represented by the variable x. For example, to map a normalized parameter to a range of -20 to 20, the expression can be written as (x * 40) - 20.
formattingProfile
Type: string (key)
A string that matches an existing formatting profile which will be used to format the result of a value expression.
unitConversionProfiles
Type: array of string
An array of unit conversion profiles that will be applied to this value expression.
unit
Type: string
The unit of this parameter's value (e.g., "Hz", "dB").
ValueToString Examples
The following examples demonstrate how this section can be used in a map.
The following example will evenly space the value texts Small Space, Room and Hall across a normalized plugin parameter:
# some plugin.module.submodule.parameter object
valueToString = [ { valueTexts = ["Small Space", "Room", "Hall"] } ]
The next example expresses a normalized plugin parameter ranging from 0 to 1000. The first formatting profile used is named Channel-Hz and it will print a single digit after the decimal point with the unit ms until the value expression outputs 100 (like 63.0 ms).
It'll then switch to the conversion profile Channel-ms100 but effectively does that only to use the formattingProfile RoundedInt because the conversion factor used here is 1. This is desirable because the decimal values become meaningless in this range (like 504 ms).
When the value expression reaches 1000.0, the conversion Channel-ms1000 is used, which multiplies the value expression by 0.001 and uses the unit s, effectively showing 1.00 s.
# the formatting profiles used by this example
[plugin.formattingProfiles.RoundedInt]
rounding = "nearest"
onlyIntegers = true
[plugin.formattingProfiles.Channel-Hz]
rounding = "nearest"
digitsAfterPoint = 1
[plugin.formattingProfiles.Channel-kHz]
rounding = "nearest"
digitsAfterPoint = 2
# the unit conversion profiles used by this example
[plugin.unitConversions.Channel-ms100]
threshold = 100.0
unit = "ms"
factor = 1
formattingProfile = "RoundedInt"
[plugin.unitConversions.Channel-ms1000]
threshold = 1000.0
unit = "s"
factor = 0.001
formattingProfile = "Channel-kHz"
# some plugin.module.submodule.parameter object putting all of the above into a single valueExpression
valueToString = [ { valueExpression = "1000 * x", unit = "ms", formattingProfile = "Channel-Hz", unitConversionProfiles = ["Channel-ms100", "Channel-ms1000"] } ]
The final example checks the value of parameter 123. If that value is below 0.5, it'll print from 0.07 Hz to 99.6 Hz for the range of the Rate parameter. If parameter 123 has a value above 0.5, it'll print musical values like 4/1 or 1/8 instead.
# some formatting profile used by this example
[plugin.formattingProfiles.Thor-Hz]
rounding = "nearest"
digitsTotal = 3
# some plugin.module.submodule.parameter controlling whether another plugin parameter shows its values in Hz or in musical terms
[[plugin.module.submodule.parameter]]
index = 123
name = 'LFO 1 Tempo Sync'
valueToString = [ { valueTexts = ["Off", "On"] } ]
# another plugin.module.submodule.parameter depending on parameter 123 for what to show as its value. Note how it uses the condition field to switch between different valueToString objects.
[[plugin.module.submodule.parameter]]
index = 125
name = 'LFO 1 Rate'
[[plugin.module.submodule.parameter.valueToString]]
condition = "p123<=0.5"
valueExpression = "0.07 * (99.6/0.07)^x"
formattingProfile = "Thor-Hz"
unit = "Hz"
[[plugin.module.submodule.parameter.valueToString]]
condition = "p123>0.5"
valueTexts = ["4/1", "3/1", "2/1", "7/4", "6/4", "5/4", "4/4", "3/4", "2/4", "3/8", "1/4", "3/16", "1/8", "1/8T", "1/16", "1/32"]