I've wanted to build an Audio Visualizer for years now, but I didn't know where to start until I stumbled upon this repository, but it lacked of features and was quite outdated, so I modified the original repository and added more effects (repo). In this blog post, I'll show you how to get it up and running and installing it on the Raspberry PI.
- Raspberry Pi 3 / 4
- LED Strip with WS2812B 150 LEDs 5m
- Power Supply 5v 10A (Female Power Adapter included)
- Cable with 3 inner wires
- Breadboard Jumper
- Audio Splitter (and audio cables)
Basically, this is how you wire the led strip to the Raspberry Pi. The two power lines going off the led strip are there to supply enough current to the LEDs. One power line on one of those sides would just not be enough.
To run the automatic install progress, we have to make sure to have git and python3 installed:
sudo apt install git python3 python3-pip gfortran -y
Now all that's left to do is to clone the repository and install it, the install script will ask you about your current configuration. After you made sure everything is wired up as it should be, answer the questions like shown below.
git clone https://github.com/sshcrack/rpi-music-visualizer && \ cd rpi-music-visualizer/python/install && \ sudo python3 install.py ================== Setting up config ==================== To which pin is your led strip connected? >> 18 Do you have a inverting logic level converted installed? >> no How many leds does your led strip have? >> 150 Where is your status led installed >> no Do you have a grove gesture sensor installed? >> no Do you want to start the visualizer at startup? >> yes [...]
After that just run the script by starting the service:
sudo service rpimusicvisualizer start
Good Job! Everything is up and running now! You can access your personal Music Visualizer by typing (click of one of those links, one of them should work)
cd .. sudo python3 listening.py Server should be listening on if server is running: http://184.108.40.206:6789