Skip to content

frogCaller/RPI-Audio-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi Audio Visualizer

A music visualizer for Raspberry Pi using a 2.23-inch OLED HAT.

Features

  • 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.

Materials

(Amazon affiliate links)

  1. Install OS:
    • RaspberryPi OS (64-bit)

Wiring and Setup

  1. 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.
  2. 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.
  3. Clone the repository:

    sudo apt install -y git
    git clone https://github.com/frogCaller/RPI-Audio-Visualizer.git
    cd RPI-Audio-Visualizer
  4. 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
    
  5. Configure audio input

    • Edit config.yaml to set audio input.
    audio:
      jackInput: false  # false = use JACK input
    
    

Usage

  • 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.py

Open a browser and go to:

http://<raspberrypi-IP>:5000

Replace with your Raspberry Pi’s actual IP address (e.i. http://192.168.0.78:5000).

Troubleshooting

  • 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

About

A music visualizer for Raspberry Pi using a 2.23-inch OLED HAT.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published