2 summary:: Map a linear range to another linear range
3 related:: Classes/LinExp
4 categories:: UGens>Maths
9 Maps a linear range of values to another linear range of values.
18 The input signal to convert.
23 Lower limit of input range.
28 Upper limit of input range.
33 Lower limit of output range.
38 Upper limit of output range.
48 var mod = SinOsc.kr(Line.kr(1, 10, 10));
49 SinOsc.ar(LinLin.kr(mod, -1,1, 100, 900)) * 0.1
53 // modulating destination values.
56 var mod = LFNoise2.ar(80);
57 SinOsc.ar(LinLin.ar(mod, -1,1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1
61 // modulating source and destination values.
64 var mod = LFNoise2.ar(80);
67 SinOsc.kr(0.2), SinOsc.kr(0.2543),
68 MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1)
75 linlin and range can be used to create a LinLin implicitly from a ugen, mapping its output values from linear range to an exponential one. The rate is derived from the ugen.
81 var mod = LFNoise2.ar(80);
82 SinOsc.ar(mod.linlin(-1,1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1
89 var mod = LFNoise2.ar(80).range(MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1));