Animation: LFO, Phasor, and Pulse

Time to make things move.

Up until now, everything in Lux has been static. You connect nodes, you see output, but nothing breathes. Nothing pulses. Nothing feels alive.

That changes today. I’m starting the animation system, and the first nodes are oscillators.

LFO

The Low Frequency Oscillator. If you’ve used any visual programming tool, you know this one. It’s the workhorse of procedural animation.

Feed it a frequency and pick a shape: sine, triangle, square, sawtooth, or pulse. Out comes a smooth periodic signal. Connect it to a circle’s radius and the circle breathes. Connect it to a color’s hue and the color cycles. Connect it to anything and that thing moves.

The amplitude and offset pins let you scale and shift the output. A sine wave from -1 to 1 is nice, but usually you want 0 to 100, or 0.5 to 1.5, or whatever your downstream node needs. Set the amplitude and offset once and forget about it.

Pulse width only matters for the pulse shape. It controls the duty cycle, how much of each period is “on” versus “off”. At 0.5 it’s a square wave. At 0.1 it’s a short blip. At 0.9 it’s mostly on with a brief dip.

Phasor

A phasor is simpler than an LFO but just as useful. It ramps from 0 to 1 at a given frequency and then resets. That’s it. A continuous sawtooth from 0 to 1.

Why is this useful? Because so many things in creative coding want a normalized 0 to 1 value that loops. UV coordinates. Spread indices. Animation progress. Color cycling. A phasor gives you that signal directly, no scaling needed.

It also has a reset input. Trigger it and the phasor snaps back to 0. Useful for syncing to external events or restarting an animation.

Pulse

The metronome. It fires a bang (a momentary 1.0) at a configurable interval. Connect it to anything that responds to triggers and you’ve got rhythm.

The interval can be set in seconds or BPM. BPM mode is more intuitive when you’re working with music. 120 BPM means a bang every half second.

Pulse width controls how long the bang stays high. At the default it’s a single frame, but you can stretch it longer if you need a sustained gate signal instead of a momentary trigger.

Why oscillators matter

These three nodes are the foundation of everything that moves in Lux. An LFO driving position creates orbits. An LFO driving opacity creates pulsing. A phasor driving a spread index creates scanning. A pulse triggering a counter creates stepping.

Layer them together and suddenly your patch is alive. Two LFOs at different frequencies on X and Y create Lissajous figures. A phasor modulating an LFO’s frequency creates evolving patterns. A pulse resetting a ramp creates rhythmic sweeps.

Simple building blocks, infinite combinations. That’s the whole idea.

← Back to blog