Overview
A unit-conversion adapter for numbers. It linearly converts one range, such as -1 to 1 from a sine wave, into the destination parameter range, such as -8 to 8px of movement. This numeric-routing utility appears between a waveform and a parameter almost every time.
Usage tips
- Think simply: "input arrives in this range â output should use that range." Enter the four numbers without deriving a formula.
- The go-to waveform pairing is
motion (Wobble, amount 1) â remap(from -1..1, to 0..1)for an always-positive value. - Reverse the mapping with
to_min > to_max, so output decreases as input rises. This is useful for inverse relationships such as darkening as distance closes. - Turn
clampON when input might exceed the expected range, as insurance for a noise waveform or external input.
Common pitfalls
- Values go beyond the range: by default, out-of-range input is extrapolated. Turn
clampON to limit it. - Avoiding from_min=from_max out of concern for division errors: this safe case outputs the midpoint and does not fail. It will not create the intended motion, however, so review the range.
- There is no acceleration or deceleration: Remap is linear. Use
ease_in_outfor easing or a curve node for a custom shape; keep Remap focused on range conversion.
Technical details
- Output formula:
to_min + (input - from_min) / (from_max - from_min) Ă (to_max - to_min) - With a zero input range (from_min = from_max), output the midpoint
(to_min + to_max) / 2. - With
clampenabled, output is limited to[to_min, to_max], or the reversed[to_max, to_min]. - Reverse mapping is supported with to_min > to_max.
from_min,from_max,to_min, andto_maxcan be promoted. Setclampin the inspector.
Examples
[SineWave] â output(-1.0..1.0) â [Remap(from:-1..1, to:0..255)] â pixel parameter
Use it to adapt a CHOP waveform to pixel-processing parameters, such as converting SineWave output from -1â1 into a 0â255 luminance range.
Related nodes
motion/motion/motionâ source waveformsease_in_outâ add easing without changing the rangeclampâ apply only a range limitmath_op/expression_floatâ calculations beyond a linear conversion