Array node

Array Map

Transform each array element using a math operation. Apply addition, subtraction, multiplication, division, modulo, power, square root, absolute value, negate, floor, ceil, or round to every element in one step.

Inputs

PortTypeDefault
ArrayThe list to transform. Numeric elements are processed one by one; non-numeric ones pass through untouched.any—
OperationWhat to do to every element — Multiply, Add, Subtract, Divide, Power, Modulo, Abs, Clamp, Normalize or Round. Values outside the list fall back to Multiply.int0
ValueThe operand the operation uses — the factor, the offset, the exponent, the clamp ceiling. Not clamped; 0 is ignored by Divide and Modulo, Normalize ignores it entirely, and Round reads it as decimal places within 0…10.float1

Outputs

PortType
Resultany
Countint

How It Works

Array Map applies a mathematical Operation to every numeric element in the array, using Value as the second operand where applicable:

  • 0 — Add: element + Value
  • 1 — Subtract: element − Value
  • 2 — Multiply: element × Value
  • 3 — Divide: element ÷ Value (division by zero returns 0)
  • 4 — Modulo: element mod Value
  • 5 — Power: element ^ Value
  • 6 — Square Root: √element (Value ignored)
  • 7 — Absolute: |element| (Value ignored)
  • 8 — Negate: −element (Value ignored)
  • 9 — Floor: ⌊element⌋ (Value ignored)
  • 10 — Ceil: ⌈element⌉ (Value ignored)
  • 11 — Round: round(element) (Value ignored)

Use Cases

  • Normalization: Divide all elements by the max value to scale the array to 0–1 range.
  • Unit conversion: Multiply by a conversion factor (e.g., radians to degrees: multiply by 57.2958).
  • Offset correction: Subtract a baseline value from all elements.
  • Signal processing: Square all elements (Power, Value=2) to compute signal power.

Tips

  • Division by zero is safe — it returns 0 for affected elements, not infinity or NaN.
  • Non-numeric elements pass through unchanged.
  • For more complex per-element transformations, consider using Math Expression with array inputs.

Open Array Map in the interactive catalog →

Array Map is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Array nodes