skip to content

Lfo

A multi-purpose Low Frequency Oscillator (LFO). Modulate any audioParam of any element, including any other LFO.

class
Lfo
extends
Osc
tag
<lfo-blam>
see

Props

name type default description
prop string gain

The audioParam to which the <lfo-blam> connects. This may be mapped to a prop or exposed separately. Its value at the time of connection represents the center value for oscillation.

type string sine

The waveform for the oscillator. Can be ‘sine’, ‘square’, ‘sawtooth’, or ‘triangle’.

gain number 1

For an LFO, the gain represents how much the param value changes in either direction. If the param value is 0.5 and the LFO gain value is 0.25, the param value will oscillate between 0.25 and 0.75, passing through 0.5 in both directions.

beats number 1

The frequency of the LFO in beats, mapped to the bpm of an ancestor <audio-blam> or <sequencer-blam> element.

detune number 0

The relative frequency, in cents (100 cents is 1 semitone). The default, 0, means the frequency in beats is unchanged.

invert boolean false

Reverses the LFO polarity. 1 values become -1 and vice versa.

Examples

Examples that use the Lfo element: