HISE Docs

map

math.map

Maps an input range to an output range

Parameters

ID Range Default Description
InputStart 0.00 - 1.00 0.00 The minimum value of the input range
InputEnd 0.00 - 1.00 1.00 The maximum value of the input range
OutputStart 0.00 - 1.00 0.00 The minimum value of the output range
OutputEnd 0.00 - 1.00 1.00 The maximum value of the output range


This node will use a linear function to map a dynamic input range to a dynamic output range. The ranges can be defined using the parameters. The math formula behind the node is:

// convert the input signal to 0...1
norm = (input - InputStart) / (InputEnd - InputStart);
// convert the output signal from 0...1
output = norm * (OutputEnd - OutputStart) + OutputStart;