Process overview : Mapping

Presentation

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.
mapping

Edition

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.

Inspector

The mapping inspector is very simple :

mapping_inspector

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.

Execution

The mapping behaves as follows at each tick :

  1. The current value of the source address is fetched.
  2. It is mapped to the X axis of the curve according to the source min-max.
  3. The corresponding point is taken on the Y axis.
  4. This point is scaled according to the target min-max.
  5. 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 :

simple-mapping

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.

mapping-rev

More complex curves will of course have more complex effects.

Publié dans Non classé