Codebox Operators scale

scale

Map an input range of values to an output range

scale(x, lowin, hiin, lowout, highout, pow): out1

Arguments:

Arguments

NameTypeDefaultDescription
xnumber

The signal or value that will be scaled.

lowinnumber

Sets the low end of the expected input range. Incoming values are not clipped to this range; rather, the input range is used to determine the value mapping formula.

hiinnumber1

Sets the high end of the expected input range. Incoming values are not clipped to this range; rather, the input range is used to determine the value mapping formula.

lowoutnumber

This sets the low end of the output range, and will be the lowest output value if the input value stays with its expected range.

highoutnumber1

This sets the high end of the output range, and will be the highest output value if the input value stays with its expected range.

pownumber1

This optional fifth argument specifies the nature of the scaling curve. This argument must be a floating-point number greater than 1., with larger values leading to steeper exponential curves. Note that the rnbo version of scale uses modern exponential scaling. For more information see the Max {scale~} object reference file.

Returns

NameTypeDescription
out1number