Classes | UGens > Generators > Deterministic

LFGauss : UGen : AbstractFunction : Object

Gaussian function oscillator
Source: Osc.sc


A non-band-limited gaussian function oscillator. Output ranges from minval to 1.

LFGauss implements the formula:

where x is to vary in the range -1 to 1 over the period dur. minval is the initial value at -1.

Class Methods

LFGauss.ar(duration: 1, width: 0.1, iphase: 0.0, loop: 1, doneAction: 0)

LFGauss.kr(duration: 1, width: 0.1, iphase: 0.0, loop: 1, doneAction: 0)



duration of one full cycle ( for freq input: dur = 1 / freq )


relative width of the bell. Best to keep below 0.25 when used as envelope. (default: 0.1)


initial offset (default: 0)


if loop is > 0, UGen oscillates. Otherwise it calls doneAction after one cycle (default: 1)


doneAction, which is evaluated after cycle completes (2 frees the synth, default: 0). See Done for more detail.

Inherited class methods

Instance Methods


Returns the lowest value for the given parameters, which is exp(1.0 / (-2.0 * squared(width)))

.range(min: 0, max: 1)

Scales the output to the given range. This can be convenient when using LFGauss as an envelope (see example below).

Inherited instance methods


Some plots

Some calculations

assuming iphase = 0:

minval for a given width: minval = exp(-1.0 / (2.0 * squared(width)))

width for a given minval: width = sqrt(-1.0 / log(minval))

width at half maximum (0.5): (2 * sqrt(2 * log(2)) * width) = ca. 2.355 * width

Sound examples

Gabor Grain

NOTE: The gaussian function doesn't start with 0 – it asymptotically approaches it at -inf and inf. When using it as an envelope, it has to start at some smaller value, and it has an offset for this value. You can remove this offset by explicitly setting the range, e.g. to 0..1 (this is the default).