scale2
Arbitrary signal scaling with optional smoothing.
Scales incoming value to user-definable range. Similar to scale object found in popular dataflow languages.
Syntax
Initialisation
ihtime -- Optional; Half time value for internal port filter for smoothing. Default is no smoothing.
Performance
kin -- Input value. Can originate from any k-rate source and should be in the range kimin to kimax. If it is larger than kimax it is treated as kimax, and if less than kimin then it is treated as kimin.
kmin -- Minimum value of the resultant scale operation.
kmax -- Maximum value of the resultant scale operation.
kimin -- Optional; Minimum of the incoming value range, defaulting to zero.
kimax -- Optional; Maximum of the incoming value range, defaulting to one.
Warning
The argument order is minimum before maximum, which differs from scale but it consistent with other opcodes that use a range.
Examples
Here is an example of the scale2 opcode. It uses the file scale2.csd.
See also
Linear and Exponential Generators
Credits
Author: John ffitch after David Akbari
December
2020