This is a fun litte project which uses a bunch of UNIX magic to blink an LED Strip in sync with your music. It consists of two Raspberry Pis which serve different functions in the process:
+--------------------------------------------------------------------------+
| Server Raspberry Pi 4 |
| ====================== +----------------------+ |
| | CAVA | |
| +------------+ +---------------+ | | |
| | librespot | | ALSA Loopback +-------------> - console based | |
| | | +---------^-----+ | analog visualizer | |
+-------> | - Spotify- | | | - ALSA backend | |
| | | connect | | | - Raw binary output | |
| | | client +--------------+ | | |
| | | | | +---+------------------+ |
| | | + ALSA | | | |
| | | | | | +--------+ |
| | +------------+ +---------v-----+ +-------> netcat | |
| | | Analog Output | +----+---+ |
| | | (3"5 or HDMI) | | |
| +-------------------+---+-----------+--------------------------------------+
| | |
| | |
+ | |
Spotify Client v |
+--------------+ Speakers +----------------v--------+
+--------+ | |
| Client Raspberry Pi |
| =================== |
| |
| - Model B+ (512MB) |
| - Python |
+------------------+ - TCP I/O |
| | - Neopixel LED |
v | |
Neopixel LEDS +-------------------------+
+-------------+
librespot.service
- Spotify connect clientcava.service
- Cava visualizercavest.service
- Cavest (see below)
Node.js REST interface for controlling cava and some led params. WIP, planned to serve responsive control WebApp.
~/.asoundrc
ALSA audio routing configuration- add
snd_aloop
to/etc/modules
for ALSA loopback device yarn install
for cavest
pixel.service
starts python server
- install pip and setup Neopixel libraries
- wiring for LED strip