LFO

Outputs a repeating sine, triangle, square or sawtooth wave.

Parameters

NameTypeDescription
ValueoutputFloatThe current point on the wave, between the minimum and the maximum.
PhaseoutputFloatWhere in the cycle the wave is, from 0 at the start to 1 at the end, with the phase offset included.
WaveformEnumThe shape of the wave.Choices: Sine, Triangle, Square, Sawtooth
FrequencyFloatHow many cycles the wave completes per second.
MinFloatThe lowest value of the wave.
MaxFloatThe highest value of the wave.
Phase OffsetFloatHow far the wave is shifted along its cycle, in cycles, so 0.25 is a quarter cycle.
Pulse WidthFloatThe part of each cycle a square wave spends at the maximum, between 0 and 1. Only affects the square wave.
RunningBoolWhether the wave moves on. While off, it holds still.
ResetTriggerPuts the wave back at the start of its cycle.

LFO, short for low frequency oscillator, outputs a wave that repeats forever. The frequency sets how many cycles it completes per second, and the minimum and maximum set how far it swings. The wave always runs between exactly those two values.

Each cycle starts at a fixed point. Sine starts halfway and rises first. Triangle starts at the minimum, reaches the maximum halfway through and comes back down. Square starts at the maximum and drops to the minimum after the pulse width, so a pulse width of 0.5 gives equal halves. Sawtooth rises from the minimum to the maximum and then jumps back. The phase offset moves this starting point, which lets two LFOs with the same frequency run out of step with each other.

Changing the frequency while the wave runs does not make it jump; the cycle just continues at the new speed. A negative frequency runs the cycle backwards. While Running is off the wave stops where it is. A reset starts the cycle over from its beginning.

The usual use is to make something sway, pulse or blink on its own: a sine on a position gives a gentle back and forth, and a square on a brightness gives a blink.

Keywords: oscillator, wave, sine, triangle, square, sawtooth, cycle, modulate, pulse