Detecting rhythm by analyzing the sound spectrum

I am building a rhythmic game and I face many problems with rhythm detection. I get the current spectrum of the song being played. It looks like an array with a float with 512 floats. 256 to represent the left and right channels. FFT is also available. But I have no idea how to work with this data, I did some experiments with visualization, but this gave me very little information. I was looking for some ready-made algorithms, but nothing. Please, can you help me, maybe some links, materials, articles related to rhythm detection, work with the sound spectrum. The code will also be very helpful. Thank you

+7
source share
3 answers

You may not have used the correct search terms. Try "tempo detection" or "beat detection" along with a "code" or "algorithm." There are many documents, links, 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

+4
source

You might want to check the source and project report for the Dancing Monkeys project. Dancing monkeys automatically generate power files for DDR, and this does this using a rather sophisticated beating detection. It is written in Matlab.

+4
source

You should take a look at the beat spectrum algorithm: http://www.rotorbrain.com/foote/papers/icme2001/icmehtml.htm .
It extracts information about the rhythm and musical structure, calculating the similarity of the spectrograms of small samples. This is relatively easy to implement and provides reliable information.

+2
source

All Articles