Yotsuba Games
Back to Node List

Remap

remap

Remaps a value from one range to another

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
慄抛
input
Float
Required
ăƒȘăƒžăƒƒăƒ—ă™ă‚‹ć€€

Output Ports

NameTypeDescription
ć‡ș抛
output
Float
ăƒȘăƒžăƒƒăƒ—ă•ă‚ŒăŸć€€

Parameters

NameTypeDefaultRangeDescription / Options
ć…„ćŠ›æœ€ć°
from_min
Float
-1-1000–1000 / step 0.01

慄抛範ć›Čăźæœ€ć°ć€€

ć…„ćŠ›æœ€ć€§
from_max
Float
1-1000–1000 / step 0.01

慄抛範ć›Čăźæœ€ć€§ć€€

ć‡șćŠ›æœ€ć°
to_min
Float
0-1000–1000 / step 0.01

ć‡ș抛範ć›Čăźæœ€ć°ć€€

ć‡șćŠ›æœ€ć€§
to_max
Float
1-1000–1000 / step 0.01

ć‡ș抛範ć›Čăźæœ€ć€§ć€€

ă‚Żăƒ©ăƒłăƒ—
clamp
Bool
false—

ć‡ș抛怀をć‡ș抛範ć›Čć†…ă«ćˆ¶é™ă™ă‚‹

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 clamp ON 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 clamp ON 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_out for 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 clamp enabled, 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, and to_max can be promoted. Set clamp in 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 waveforms
  • ease_in_out — add easing without changing the range
  • clamp — apply only a range limit
  • math_op / expression_float — calculations beyond a linear conversion
Back to Node List
Remap — PixPipeline Node Reference