Skip to main content

Map Range

Rescale a value from one range to another, linearly, on a log scale or a square root.

Syntax​

{ "id": "n1", "op": "map-range", "name": "map-range", "x": 0, "y": 0, "params": {} }

An edge into it ends at "targetPort": "in"; one out of it starts at "sourcePort": "out"; a parameter is set in params (leave out the ones at their default), driven by an edge to par:inMin, or read elsewhere as ch('map-range/inMin').

Inputs​

PortTypeTakes
intableone edge

Parameters​

ParameterKindDefaultChoices
inputexpr"value"
namestring"pscale"
kindmenu"linear"linear, log, sqrt
inMinfloat0
inMaxfloat1
outMinfloat0
outMaxfloat1
clamptoggletrue

Outputs​

PortType
outtable

Details​

  • Category: Rows
  • Operator: map-range

Older projects​

Projects saved before documents used operator classes. These convert to map-range when they open: MapRangeOp.