scale
Map an input range of values to an output range
scale(x, lowin, hiin, lowout, highout, pow): out1
Arguments:
Arguments
Name | Type | Default | Description |
---|---|---|---|
x | number | The signal or value that will be scaled. | |
lowin | number | 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. | |
hiin | number | 1 | 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. |
lowout | number | 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. | |
highout | number | 1 | 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. |
pow | number | 1 | 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
Name | Type | Description |
---|---|---|
out1 | number |