Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Music Analysis and Visualization

I'm interested in programming a music visualizer in Python.

The first problem is how to get the information from the music? Like volume, frequency, rpm, etc. And from where? From the soundcard or the actual music file?

My guess is from the soundcard, but how do I access the soundcard and the wanted information? Preferably in a platform-independed way(Linux is a must). I already read a bit about fourier transformation, but I'm not sure if that's the best way to go.

I thought about using OpenGL for the visualization, but I'm still open for suggestions.

I've already looked at those wikipages, but didn't find an answer yet: http://wiki.python.org/moin/Audio/
http://wiki.python.org/moin/PythonInMusic

like image 909
naeg Avatar asked Jun 15 '11 11:06

naeg


People also ask

What does music visualization do?

Music visualization or music visualisation, a feature found in electronic music visualizers and media player software, generates animated imagery based on a piece of music. The imagery is usually generated and rendered in real time and in a way synchronized with the music as it is played.

Does music help visualization?

Did you know that your favorite songs can help you visualize and manifest your dreams? Using music for creative visualization is not only fun—it's also incredibly powerful! That's because it has the power to generate strong passion and positive emotion in you as you listen to it.

What is music analysis?

What is Musical Analysis? An analysis can be conducted on a single piece of music, on a portion or element of a piece or on a collection of pieces. The student goes through the process of critical listening in order to offer an opinion on the different elements of music used within the piece chosen.


1 Answers

If you are looking for a cross-platform audio library I strongly suggest to use FMOD which just rocks. There is also a wrapper to use it in python available (though I've never used it).
It will provide features like getting the spectrum out-of-the-box.
If you want to analyze audio file, my algorithme de choix is the beat spectrum. It computes a similarity matrix by comparing each short sample of the music with every others. Once the similarity matrix is computed it is possible to get average similarity between every samples pairs {S(T);S(T+1)} for each time interval T: this is the beat spectrum.
It allows to get the BPM of your audio sequence, but can do much more like identifying different parts of the music, locate transitions between similar samples. I do not know what you mean exactly by "visualizing audio", but I think this algorithm should provide you with enough information to start synchronizing image to the audio (if that's what you want to do).

like image 195
jeremy-george Avatar answered Oct 19 '22 20:10

jeremy-george