A music visualizer for Raspberry Pi using a 2.23-inch OLED HAT.
- OLED Visualizer: Real-time bar graph visualization of audio frequencies on the 2.23-inch OLED HAT.
- Web UI: Browse and play songs from a local webui.
- Drag & Drop Songs – Instantly add new songs by dragging and dropping music files into the web page.
- Audio Playback: Uses Pygame for playback.
- Cover Art: Automatically fetches and caches album covers.
(Amazon affiliate links)
- Install OS:
- RaspberryPi OS (64-bit)
- RaspberryPi OS (64-bit)
-
Connect 2.13inch e-Ink HAT to Raspberry Pi:
- Connect the 2.23inch OLED HAT to your Raspberry Pi.
- Connect the UPS Hat for continuous power supply. This will allow you to move the project anywhere without worrying about power interruptions.
- Connect the 2.23inch OLED HAT to your Raspberry Pi.
-
Enable SPI & I2C:
- Open a terminal on your Raspberry Pi.
- Run
sudo raspi-config - Navigate to Interfacing Options -> SPI -> Enable.
- Navigate to Interfacing Options -> I2C -> Enable.
-
Clone the repository:
sudo apt install -y git git clone https://github.com/frogCaller/RPI-Audio-Visualizer.git cd RPI-Audio-Visualizer -
Install System and Python Dependencies:
- Automatically creates a dedicated Python virtual environment (
Music_env) and installs the required dependencies.
chmod +x setup.sh ./setup.sh
- Automatically creates a dedicated Python virtual environment (
-
Configure audio input
- Edit
config.yamlto set audio input.
audio: jackInput: false # false = use JACK input
- Edit
- By default, the app includes one sample song.
- You can add more songs to the Music/ folder before starting the app or simply drag & drop files directly into the web page — they’ll automatically upload into the Music/ folder.
- For album art to fetch correctly, make sure your files are named like this:
"Song Name - Artist.mp3" "Blinding Lights - The Weeknd.mp3"
Start the app:
python3 start.pyOpen a browser and go to:
http://<raspberrypi-IP>:5000Replace with your Raspberry Pi’s actual IP address (e.i. http://192.168.0.78:5000).
- Common Issues:
- Ensure SPI & I2C are enabled in the Raspberry Pi configuration.
- Check all connections if the screen does not display anything.
- Verify all required packages are installed correctly.
- More Info
