scale2Signal Generators:Linear and Exponential Generatorsscale2scale2
Arbitrary signal scaling with optional smoothing.
Description
Scales incoming value to user-definable range. Similar to scale object found in popular dataflow languages.
Syntaxkscl scale2 kinput, kmin, kmax[, kimin, kimax][ihtime]Initialisationihtime -- Optional; Half time value
for internal port filter for smoothing. Default is no smoothing.
Performancekin -- 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.
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.
Example of the scale2 opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoLinear and Exponential GeneratorsCreditsAuthor: &namejohn; after David AkbariDecember2020