Map Range
Remaps a signal from one range to another. Set the range the signal comes in on (From) and the range you want out (To), and Map Range does the math. A value at From Low comes out as To Low, a value at From High comes out as To High, and everything in between scales to match.
Use it when you know the ranges but don't want to work out a multiply and an offset, for example turning an oscillator's −1 to 1 into a rotation that only sweeps a quarter turn.
Inputs
| Port | Type | Default | Range | Description |
|---|---|---|---|---|
| Value | Scalar | 0.0 | any | The signal to remap |
| From Low | Scalar | 0.0 | any | Input that maps to To Low. Set it above From High to invert the mapping |
| From High | Scalar | 1.0 | any | Input that maps to To High |
| To Low | Scalar | 0.0 | any | Output when Value equals From Low |
| To High | Scalar | 1.0 | any | Output when Value equals From High. Set it below To Low to invert the output |
Outputs
| Port | Type | Description |
|---|---|---|
| Out | Scalar | The remapped value |
Controls
- Limit: what happens when Value goes outside the From range.
- Off: keeps scaling past the To range.
- Clamp: holds at the To ends.
- Loop: wraps back to the start, like a sawtooth.
- Zigzag: bounces back and forth, like a triangle.
Ideas
- Remap an Oscillator's −1 to 1 into 0.2–0.8 to keep a parameter away from its extremes.
- Feed BPM's Beat Position in with From 0–4, To 0–1, and Limit on Loop for a ramp that repeats every bar.
- Turn a Phasor's Wrap off and run it through Map Range on Zigzag for a smooth ping-pong that never snaps back.
- Swap To Low and To High to flip a signal, so a rising envelope dims a frame instead of brightening it.
Tips
- Looping an ever-increasing signal like Beat Position stays precise even after hours of playback.
- If From Low and From High are equal, the output is To Low.
- Like the other math nodes, Map Range works per point when its inputs vary across the frame.
Related
- Multiply Add: scale and offset when you think in factors rather than ranges
- Arithmetic (Clamp): restrict a signal to a range without remapping it
- Phasor: with Wrap off, a common input for Loop and Zigzag