linlinSignal Generators:Linear and Exponential Generatorslinlinlinlin
Linear to linear interpolation
DescriptionPlugin opcode in emugens.
Maps a linear range of values to another linear range of values.
Supports both scalars and arrays, at i- and k-time
Syntaxky linlin kx, ky0, ky1 [, kx0, kx1 ]iy linlin ix, iy0, iy1 [, ix0, ix1 ]kys[] linlin kxs[], ky0, ky1 [, kx0, kx1 ]iys[] linlin ixs[], ky0, ky1, [ kx0, kx1 ]kC[] linlin kx, kA[], kB[] [, kx0, kx1 ]Performancekx -- Input signal
kx0 -- Lower limit of input range. Defaults to 0kx1 -- Higher limit of input range. Defaults to 1ky0 -- Lower limit of output range
ky1 -- Higher limit of output range
y = (x - x0) / (x1 - x0) * (y1 - y0) + y0
Examples
Here is an example of the linlin opcode. It uses the file linlin.csd.
Example of the linlin opcode.See alsoLinear and Exponential GeneratorsCreditsBy: &nameeduardo; 2017New plugin in version 6.11