Audio Visualization Plugin - Detecting the beat?

I’ve been playing around with the Audio Visualization plugin a lot this week. It’s really nifty once you figure out how it works. At the moment I’m designing something similar to the “dubstep gun” from Saints Row 4 ( I have an actor that is playing music, it can be picked up and moved around by the player that will send an interface message to nearby actors that will perform an action based on the sent frequency.

If you have not used the Audio Visualization plugin, it seems the primary way to utilize it is with the “Calculate Frequency” node which will output the frequency of a wave file at a specific time, split into a specified spectrum width. If you start playing a song then sync it up with a loop to run Calculate Frequency repeatedly, you can perform actions based on the frequency at the same time as you hear the music. There’s like 0 documentation on any of this so it’s been a LOT of trial and error.

I’m looking for an effective method of detecting the “beat” of a song, dynamically. As far as I know, there’s no information I can pull from the audio file that would get me BPM. This means I need to do it based on the frequency.

My first thought is to focus on the lower frequencies … I know very little about audio frequencies but I’d imagine a spike in the lower frequencies might represent a beat. Maybe? So for every calculation, I would need to obtain the total of the lower frequencies and compare it against the highest value I had previously obtained. If it’s within a range of the previous high, trigger a beat. If it’s higher, save it as the new high. The range would take some tinkering with to get right since it’s possible and likely the frequencies of each beat are not identical.

Overall though, the above system is probably very error prone. If it works at all, I imagine there would be many scenarios where “beats” are triggered when they shouldn’t be or missed completely. I was hoping someone might have a better suggestion as to how to accomplish this.


It’s been a long time since you posted your message but I would like to ask you if you found something about that? I’m very interested because I’m a game design student and I want to make a game with a rythm-based feature, but I really don’t know how to make this work x)

Thank you in advance for your response!

I’m also looking for something similar!

I never did find out a good way to do this, just lots of playing around with the calculate frequency to get a good effect.