home/ atoms/ shared-lfo-rate-av-lockstep

Pinning a free-running audio tremolo and a visual brightness-pulse to the same rate value makes them move in lockstep without a shared transport

Because there is no shared clock between Strudel and Hydra, truly phase-locked LFO motion between the two domains is impossible. However, if both sides use a free-running LFO at the same rate r — the Strudel tremolo via .gain(sine.range(0.5,1).slow(k)) and the Hydra brightness pulse via Math.sin(time*r) — they will oscillate at the same frequency by construction. They will start at different phases and drift slightly, but at the same rate; the lockstep frequency match is perceivable as joint motion. This is the supported X4 coupling and the simplest way to tie musical and visual rhythm together in the rig.

Examples

// Strudel: s("pad").gain(sine.range(0.5,1).slow(3.14))   // ~2 rad/s tremolo
// Hydra:
osc(20,0.05,0.9).brightness(()=>0.3+0.3*Math.sin(time*2)).out()

Assessment

A performer wants the visual brightness to pulse in time with a tremolo on the pad. They set r=2 in both Strudel and Hydra. After 30 seconds the brightness pulse is half a cycle off from the tremolo. Explain why this happened and whether it can be prevented.

“**one shared LFO rate `r`** drives both sides for lockstep motion | ✅ | music `amplitude-lfo` · visual `oscillation` / `visual-pulse`, `scale-pulse`”
context/ · L2b-av-link/mappings.md · chunk 3