Inspiration

I’ve always been fascinated by how music can make you see things—colors, patterns, emotions. I wanted to capture that experience and turn it into something visual. Plus, I love music, and the idea of creating something that brings sound to life in a new way was cool to me,

What it does • This is a Flask-based web app that takes an audio file and creates a dynamic visualization based on its sound and mood. • It analyzes MP3 files using librosa, pulling features like tempo, beat timing, and spectral contrast. • It grabs the song’s lyrics using lyricsgenius and runs them through a transformer model to get a mood reading. • Then, based on both the sound and the mood, it generates a visual animation using matplotlib. • The final product? A custom video you can download. • Everything runs through a web interface—just upload a file and get your visualization.

How we built it • Built with Python and Flask on the backend. • Uses a bunch of cool libraries: • librosa for analyzing audio. • transformers for figuring out the mood. • moviepy to put the video together. • lyricsgenius to fetch lyrics. • matplotlib for creating visuals. • numpy for all the number-crunching. • Everything is modular, so each part (audio analysis, lyric processing, visualization) works as a separate piece. • The visualizations are generated dynamically based on the music and mood, making each one unique.

Challenges we ran into • Handling MP3 and MP4 files in Python was a headache—I’d never worked with them before, so figuring out how to process and manipulate them took some trial and error. • Managing temporary files properly was tricky (making sure uploaded audio and output videos didn’t pile up). • Flask and matplotlib don’t always play nice together, so I had to work around some compatibility issues.

Accomplishments that we’re proud of • Successfully got audio analysis, lyric processing, and video generation all working together in one pipeline. • Created three different visualization styles, so users get variety instead of just one look. • The visualizations actually reflect the mood of the song, making them feel more meaningful. • First time really connecting a frontend to a backend in a project, which felt like a big step. • Built in processing limits and automatic file cleanup, so the app doesn’t crash or store junk files forever. • First time making Backend connect to Frontend, and it worked out

What we learned • How to build a web app with Flask. • How to use librosa for extracting details from audio. • How to work with transformers to analyze text and classify moods. • How to create and edit videos dynamically with moviepy. • How to generate animated visualizations with matplotlib. • How to properly handle temporary files, avoid memory issues, and clean up after processing.

What’s next for Music Visualizer • More visualization styles to make things even more dynamic. • Giving users the ability to customize visualizations (color schemes, effects, etc.). • Exploring deeper audio analysis for even better visual syncing. • Adding a progress bar or status display so users know how long processing will take. • It would be cool to take this in a mental health direction, where it could be used as a accompanying video to calming songs for people to relax to

Built With

Share this project:

Updates