scale
Map an input range of values to an output range
Description
The scale object maps an input range of float or integer values to an output range. The output range can be larger or smaller than the input range and can be inverted. If specified, the mapping can also be exponential.
Arguments
inlow [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.
inhigh [number]
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.
outlow [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.
outhigh [number]
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.
power [number]
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.
Inlets
input [list]
When a number or list is received in the left inlet the scaling function is performed on the incoming value or values.
inlow [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.
inhigh [number]
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.
outlow [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.
outhigh [number]
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.
power [number]
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.
Outlets
out [list]
scaled outputDynamic Attributes
These attributes can be modified in the code during execution using the set object
inhigh [number]
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.
inlow [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.
input [list]
When a number or list is received in the left inlet the scaling function is performed on the incoming value or values.
outhigh [number]
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.
outlow [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.
power [number]
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.
See Also
Name | Description |
---|---|
scale | |
scale~ | Map an input range of values to an output range |
tonormalized | Define numerical parameters for RNBO that can be accessed by the target platform. |
fromnormalized | Define numerical parameters for RNBO that can be accessed by the target platform. |
expr | Evaluate an expression using the rnbo expr language. |