Lesson 14 of 15
Low-Frequency Oscillator
LFO — Low-Frequency Oscillator
A Low-Frequency Oscillator (LFO) is a sine wave oscillating too slowly to hear as pitch (typically 0.1–20 Hz). Instead, it modulates other parameters over time to create effects.
LFO Formula
lfoValue(t, rate, depth) = depth × sin(2π × rate × t)
t— time in secondsrate— oscillation frequency in Hzdepth— amplitude (range: −depth to +depth)
Common LFO Uses
| Modulation target | Effect |
|---|---|
| Gain | Tremolo (volume wobble) |
| Pitch | Vibrato (pitch wobble) |
| Filter cutoff | Wah / auto-wah |
| Pan | Auto-pan |
Example: Tremolo at 4 Hz, depth 0.4
The gain oscillates between 0.1 and 0.9 four times per second.
Your Task
Implement lfoValue(t, rate, depth) returning the oscillator value.
Run your code to hear tremolo (LFO applied to gain).
Web Audio API loading...
Loading...
Click "Run" to execute your code.