The mapping plug-in allows to map in real-time input parameters to output parameters.
It is a simple transfer function.
It is based on a curve, just like the automation.
However, it is a time-independent process : instead of mapping the time to a value, it maps an input value to an output value.
Its curve is purple.
From an edition point of view, a mapping is identical to an automation : it is just a curve.
However, since it is not temporal, growing the process with the Grow mode has no effect : it will always be rescaled.
The mapping inspector is very simple :
The parameters are :
- Source address : its value will be fetched at each tick. Like elsewhere in the software, accessing a single value of an array is supported, as well as unit conversions.
- Source min / max : the values in which the input is assumed to be.
- Target address : the address that will be written to.
- Target min / max : the output range.
The mapping behaves as follows at each tick :
- The current value of the source address is fetched.
- It is mapped to the X axis of the curve according to the source min-max.
- The corresponding point is taken on the Y axis.
- This point is scaled according to the target min-max.
- The resulting value is sent to the target address.
For instance, the following curve with identical min-max for the source and target would just
copy its input to its output at each tick :
If the target max is set to twice the source max (for instance from (0, 1) to (0, 2)), all the input values will be multiplied by two.
The following curve will inverse the input values.
More complex curves will of course have more complex effects.