VarLag:
Filter:
Classes | UGens > Filters > Linear

VarLag : Filter : PureUGen : UGen : AbstractFunction : Object

Variable shaped lag
Source: Filter.sc

Description

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 (not audio) signals.

WARNING: VarLag.ar currently accepts audio-rate input, but the underlying implementation treats the input as control rate. Effectively, then, the "sampling rate" of VarLag's input is ControlRate.ir or server.sampleRate / server.options.blockSize, and the maximum safe frequency to feed into VarLag is half of this. VarLag does not currently yield correct results for full-bandwidth audio-rate signals. Use VarLag.ar at your own risk.

Class Methods

VarLag.ar(in: 0.0, time: 0.1, curvature: 0, warp: 5, start, mul: 1.0, add: 0.0)

VarLag.kr(in: 0.0, time: 0.1, curvature: 0, warp: 5, start, mul: 1.0, add: 0.0)

Arguments:

in

The input signal.

time

Lag time in seconds.

curvature

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

warp

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.
start

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

mul

Output will be multiplied by this value.

add

This value will be added to the output.

Inherited class methods

Instance Methods

Inherited instance methods

Examples