Delay2:
Filter:
Classes | UGens > Delays

Delay2 : Filter : PureUGen : UGen : AbstractFunction : Object

Two sample delay.
Source: Delays.sc

Description

Delays the input by two samples.

Class Methods

Delay2.ar(in: 0.0, mul: 1.0, add: 0.0, x1: 0.0, x2: 0.0)

Delay2.kr(in: 0.0, mul: 1.0, add: 0.0, x1, x2)

Arguments:

in

The input signal.

mul

The output will be multiplied by this value.

add

This value will be added to the output.

x1

The sample directly preceding the delayed input signal, which is the second output sample. This can be a numeric value or a UGen.

x2

The sample preceding the delayed input signal by two samples, which is the first output sample. This can be a numeric value or a UGen.

NOTE: When running at audio rate, x1 and x2 default to 0.0, i.e. "silence" precedes the delayed input. At control rate, the default values are set to the first sample of in, i.e. the first input sample is held during the delay.

Discussion:

The output sequence is:

out[0] = in[-2] = x2
out[1] = in[-1] = x1
out[2] = in[0]

For audio-rate signals the delay is one audio frame, and for control-rate signals the delay is one control period.

Why are the default values of x1 and x2 different depending on the UGen's rate?

At audio-rate, an analog delay model is followed—the input signal is preceded by silence (zeros). At control-rate, leading with zeros is less appropriate because control signals are often DC or other non zero-mean signals (e.g. a frequency or gain control signal).

Inherited class methods

Instance Methods

Inherited instance methods

Examples