Transform your music into a mesmerizing light show with real-time FFT audio analysis and Arduino-controlled RGB LEDs
Everything you need to create stunning audio-reactive lighting
2048-sample buffer FFT processing using the Minim audio library for precise frequency decomposition
Dual-mode detection combining overall energy onset with frequency-range beat analysis for accurate rhythm tracking
Maps 7 rainbow colors (ROYGBIV) to frequency bands with smooth weighted averaging for seamless transitions
Runs seamlessly on Windows, Linux, macOS, and Raspberry Pi with automatic platform detection
Direct serial communication with Arduino boards via RXTX library for real-time LED control
Optional Processing-based visualization window for real-time monitoring of beat detection and frequency analysis
From sound waves to RGB brilliance in milliseconds
Captures stereo audio via Minim with 2048 sample buffer
Decomposes audio into frequency spectrum for band isolation
Identifies beats using energy onset and frequency analysis
Maps frequencies to rainbow spectrum with smooth blending
Sends RGB values to Arduino via serial at 9600 baud
A robust multi-threaded design for real-time performance
Get your lights dancing in minutes
int redPin = 11; // PWM pin for red
int greenPin = 10; // PWM pin for green
int bluePin = 9; // PWM pin for blue
// For common anode LEDs, uncomment:
// #define COMMON_ANODE
Use 220-330 ohm current limiting resistors
Enable Stereo Mix in Recording devices
pactl load-module module-loopback
Use BlackHole or Soundflower
# Cross-platform JAR
java -jar exe/ColorfulSound.jar
# Windows executable
exe/ColorfulSound.exe
Star the repo, contribute, or sponsor the project