Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rhythm detection through analyzing the audio spectrum

I'm building a rhythm-based game, and facing a lot of problems with rhythm-detection. I receive the current spectrum of a playing song. It looks like a float array with 512 floats. 256 for left and right channel representation. FFT is also available. But I have no idea how to work with that data, I've made some experiments with visualizing, but it gave me very few information. I've googled for some ready algorithms, but there is nothing. Please, can someone help me with, maybe, some references, materials, articles connected with rhythm detection, working with audio spectrum. Code will also be very helpful. Thanks.

like image 625
xdegtyarev Avatar asked Mar 27 '11 16:03

xdegtyarev


3 Answers

Maybe you didn't use the right search-terms. Try to google 'tempo detection' or 'beat detection', together with 'code' or 'algorithm'. There are lots of papers, references, code examples, etc.

Just a few hits:

http://www.cs.princeton.edu/~lieber/cos325/final/

http://www.clear.rice.edu/elec301/Projects01/beat_sync/beatalgo.html

like image 136
Itamar Katz Avatar answered Oct 17 '22 18:10

Itamar Katz


You might want to check out the source and project report for the Dancing Monkeys project. Dancing monkeys automatically generates stepfiles for DDR, and it does so using some rather sophisticated beat detection. It's written in matlab.

like image 4
Nick Johnson Avatar answered Oct 17 '22 19:10

Nick Johnson


You should have a look at the beat spectrum algorithm: http://www.rotorbrain.com/foote/papers/icme2001/icmehtml.htm.
It extracts information about rythm and musical structure by computing the similarity of small samples' spectrograms. It is relatively easy to implement and allows robust information to be retrieved.

like image 2
jeremy-george Avatar answered Oct 17 '22 18:10

jeremy-george