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.

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
| Item | Cost | Notes |
|---|---|---|
| ESP32 dev board | $8-12 | Any ESP32 (not ESP8266!) |
| INMP441 mic module | $3-5 | I2S digital microphone |
| Jumper wires (female-female) | $2-3 | 7 wires needed |
| LED strip or matrix | $20+ | WS2812B/WS2815 recommended |
| 5V power supply | $15-20 | Sized for your LEDs |
Wiring the Microphone
The INMP441 connects via I2S — a digital audio protocol. No ADC, no noise, no interference.
| INMP441 Pin | ESP32 Pin |
|---|---|
| VDD | 3.3V |
| GND | GND |
| L/R | GND (left channel) |
| DOUT | GPIO32 (I2S data in) |
| BCLK | GPIO26 (bit clock) |
| WS/FS | GPIO25 (word select) |
Configuring WLED for Audio
- Flash WLED to your ESP32 (see LED Matrix Under $100 for instructions)
- Go to Config → LED Preferences and configure your LEDs
- 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)
- Click Save & Reboot
Choosing Audio-Reactive Effects
WLED offers 40+ audio-reactive effects once the mic is configured:
| Effect | Best For |
|---|---|
| FFT Gravity | Bass drops, EDM |
| FFT Sparkle | General music visualization |
| FFT Rainbow | Colorful party mode |
| Audio Vu Meter | Classic VU meter look |
| Frequency | Specific band visualization |
| Pitch | Vocal/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
| Symptom | Fix |
|---|---|
| No audio detected | Check wiring, enable I2S, verify pins match config |
| Constant flickering | Increase Squelch threshold |
| Only one frequency band reacts | Check if mic is in mono mode (L/R pin → GND) |
| Audio cuts out at high volume | Decrease Max gain |
| Buzzing/hum | Shorten mic wires, add ferrite bead on power |
What’s Next
- Power your build for longer runs
- Scale to a 64×64 matrix with HUB75 panels
- Add Home Assistant integration for automated scenes