Skip to content

Build Audio-Reactive LEDs: Sync Your Lights to Music

Music-synced LEDs are one of the most satisfying projects you can build. With an ESP32, a $3 microphone, and WLED, you can have a full music visualizer running in an afternoon.

Addressable LEDs for audio-reactive effects

How It Works

[Mic (INMP441)] ──I2S──> [ESP32] ──GPIO──> [LED Strip/Matrix]
                              │
                         [WLED Web UI]

The microphone captures ambient audio, the ESP32 processes it via FFT (Fast Fourier Transform), and WLED maps the frequency data to LED effects in real time.

What You’ll Need

ItemCostNotes
ESP32 dev board$8-12Any ESP32 (not ESP8266!)
INMP441 mic module$3-5I2S digital microphone
Jumper wires (female-female)$2-37 wires needed
LED strip or matrix$20+WS2812B/WS2815 recommended
5V power supply$15-20Sized for your LEDs

Wiring the Microphone

The INMP441 connects via I2S — a digital audio protocol. No ADC, no noise, no interference.

INMP441 PinESP32 Pin
VDD3.3V
GNDGND
L/RGND (left channel)
DOUTGPIO32 (I2S data in)
BCLKGPIO26 (bit clock)
WS/FSGPIO25 (word select)
Keep the mic wires under 20cm. Longer wires pick up electrical noise from the LEDs. If you need more distance, use shielded twisted pair.

Configuring WLED for Audio

  1. Flash WLED to your ESP32 (see LED Matrix Under $100 for instructions)
  2. Go to Config → LED Preferences and configure your LEDs
  3. Go to Config → Audio Reactive Settings:
    • Enable audio input: ✅
    • I2S DIN pin: 32
    • I2S BCLK pin: 26
    • I2S LRC pin: 25
    • Sample rate: 16000 Hz (default)
  4. Click Save & Reboot

Choosing Audio-Reactive Effects

WLED offers 40+ audio-reactive effects once the mic is configured:

EffectBest For
FFT GravityBass drops, EDM
FFT SparkleGeneral music visualization
FFT RainbowColorful party mode
Audio Vu MeterClassic VU meter look
FrequencySpecific band visualization
PitchVocal/melody-driven effects

Try them all — each responds differently to different music genres.

Tuning Tips

Sensitivity

In Config → Audio Reactive Settings → Squelch, set the noise gate threshold. Start at 20 and adjust up if the LEDs flicker in silence, or down if quiet sounds don’t trigger effects.

Gain

If the effects look weak, increase Max gain (starts at 2.0). If they clip (all LEDs white), decrease it.

FFT Size

FFT size 256 gives faster response (good for percussion). FFT size 512 gives better frequency resolution (good for melody).

Advanced: Multi-Output Audio Matrix

For a 16×16 matrix, you can map frequency bands to columns:

  • Column 1-2: Bass (20-250 Hz)
  • Column 3-6: Low-mid (250-500 Hz)
  • Column 7-10: Mid (500-2000 Hz)
  • Column 11-14: High-mid (2000-4000 Hz)
  • Column 15-16: Treble (4000-20000 Hz)

This creates a true audio spectrum analyzer on your matrix.

Troubleshooting

SymptomFix
No audio detectedCheck wiring, enable I2S, verify pins match config
Constant flickeringIncrease Squelch threshold
Only one frequency band reactsCheck if mic is in mono mode (L/R pin → GND)
Audio cuts out at high volumeDecrease Max gain
Buzzing/humShorten mic wires, add ferrite bead on power

What’s Next