2 summary:: Variable shaped lag
3 related:: Classes/Lag, Classes/Ramp, Classes/Slew
4 categories:: UGens>Filters>Linear
8 Similar to link::Classes/Lag:: but with other curve shapes than exponential.
9 A change on the input will take the specified time to reach the new value.
10 Useful for smoothing out control signals.
26 Control curvature if strong::warp:: input is 5 (default).
27 0 means linear, positive and negative numbers curve the segment up and down.
30 Determines the shape. The possible values are:
32 ## code::\step:: || || flat segment
33 ## code::\linear:: || code::\lin:: || linear segment, the default
34 ## code::\exponential:: || code::\exp:: || natural exponential growth and decay. In this case, the levels must all be nonzero and the have the same sign.
35 ## code::\sine:: || code::\sin:: || sinusoidal S shaped segment.
36 ## code::\welch:: || code::\wel:: || sinusoidal segment shaped like the sides of a Welch window.
37 ## code::\squared:: || code::\sqr:: || squared segment
38 ## code::\cubed:: || code::\cub:: || cubed segment
41 All values above will ignore strong::curvature:: input.
44 When controlling this from the outside, use code::Env.shapeNumber(symbol):: to get the numeric value for each shape.
48 Initial value. If not specified, same as the input signal.
52 Output will be multiplied by this value.
57 This value will be added to the output.
66 SinOsc.ar( // sine wave
67 VarLag.kr( // lag the modulator
68 LFPulse.kr(1).range(100,400), // frequency modulator
70 Line.kr(-8, 8, 15, doneAction:2) // modulate shape
81 x = play { |amp=0, time=0, curve=0, warp=5|
82 PinkNoise.ar(VarLag.kr(amp, time, curve, warp) ! 2)
86 x.set(\amp, 1, \time, 5, \warp, Env.shapeNumber(\sin)) // s-shaped curve up
87 x.set(\amp, 0, \time, 1, \warp, Env.shapeNumber(\lin)) // linear down
89 x.set(\amp, 1, \time, 2, \warp, 5, \curve, 7); // slow curvature
90 x.set(\amp, 0, \time, 0);
92 x.set(\amp, 1, \time, 2, \warp, 5, \curve, -7); // fast curvature
93 x.set(\amp, 0, \time, 0);