SuperCollider CLASSES


Variable shaped lag
Inherits from: Filter : PureUGen : UGen : AbstractFunction : Object


Similar to Lag but with other curve shapes than exponential. A change on the input will take the specified time to reach the new value. Useful for smoothing out control signals.

Class Methods

*ar (in: 0, time: 0.1, curvature: 0, warp: 5, start, mul: 1, add: 0)

*kr (in: 0, time: 0.1, curvature: 0, warp: 5, start, mul: 1, add: 0)



The input signal.


Lag time in seconds.


Control curvature if warp input is 5 (default). 0 means linear, positive and negative numbers curve the segment up and down.


Determines the shape. The possible values are:
\stepflat segment
\linear\linlinear segment, the default
\exponential\expnatural exponential growth and decay. In this case, the levels must all be nonzero and the have the same sign.
\sine\sinsinusoidal S shaped segment.
\welch\welsinusoidal segment shaped like the sides of a Welch window.
\squared\sqrsquared segment
\cubed\cubcubed segment

All values above will ignore curvature input.

NOTE: When controlling this from the outside, use Env.shapeNumber(symbol) to get the numeric value for each shape.

Initial value. If not specified, same as the input signal.


Output will be multiplied by this value.


This value will be added to the output.

Inherited class methods

Instance Methods

Inherited instance methods


// used to lag pitch
{                              // sine wave                            // lag the modulator
  ,400),   // frequency modulator
            0.2,                            // lag time
  , 8, 15, doneAction:2) // modulate shape
        0,                                  // sine phase
        0.3                                 // sine amplitude
x = play { |amp=0, time=0, curve=0, warp=5|, time, curve, warp) ! 2)

x.set(\amp, 1, \time, 5, \warp, Env.shapeNumber(\sin)) // s-shaped curve up
x.set(\amp, 0, \time, 1, \warp, Env.shapeNumber(\lin)) // linear down

x.set(\amp, 1, \time, 2, \warp, 5, \curve, 7); // slow curvature
x.set(\amp, 0, \time, 0);

x.set(\amp, 1, \time, 2, \warp, 5, \curve, -7); // fast curvature
x.set(\amp, 0, \time, 0);;