LFGauss:

Filter:
Classes
| UGens > Generators > Deterministic

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.

duration |
duration of one full cycle ( for |

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

iphase |
initial offset (default: 0) |

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

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

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

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

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`

NOTE: The gaussian function doesn't start with 0 – it asymptotically approaches it at **range**, e.g. to

`-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 `0..1`

(this is the default).helpfile source: https://github.com/supercollider/supercollider/tree/3.13/HelpSource/Classes/LFGauss.schelp

link::Classes/LFGauss::

link::Classes/LFGauss::