Advertisement

Analyzing sound in Flash CS3

Started by March 15, 2008 10:03 PM
1 comment, last by Ravuya 16 years, 8 months ago
Hi there, I'm currently working on a game project for school and We're trying to make a music based game but need some way to analyze music files to find the beat of different parts. Like for instance finding the drum and creating an object that would move across the screen with each beat of the drum. I'm currently trying to use CS3s new function, computeSpectrum() but I have no idea how to use this data in order to find anything useful. I'm sure there's some algorithm or something out there for figuring out the BPM of a song or something based off of this but I can't find anything. Does anyone have any ideas or info on how this might be accomplished? NOTE:The whole project MUST be done in Flash so resources are a little limited.
Well, don't do that :)

Why do guitar hero games come out once in every while? Partially due to added features, but mostly because they listen to the tracks and actually sync the beats etc by themselves. EDIT: and they actually record the tracks themselves, but that is separate (they do this because they need to separate the drums, guitar, etc when you make a mistake).

You're most likely to find very little info from the graph that you can use directly -- it may be helpful in timing beats, but once you got it, its not entirely hard.

Also, if you just want the BPM, then I've seen products that do it (but admittedly somewhat bad).

For example, the exact same song can likely be written with a different tempo in multiple ways. 2/4 beats using eight notes is the same as 4/4 using quarter notes at half the temp.

You'd have to be able to arbitrarily find the time signature, as well as the downbeat. This is very hard to do accurately to my knowledge, so just listen to the tracks, make some sort of editor (or text file) that you can read in that will contain the time and the type of note. (along with other info you may come across)

Also, songs change tempo sometimes, so be careful. If you're not musically inclined, maybe get someone else to "tab" it out.

Good luck!
Advertisement
I don't think this belongs in game programming since it's an API-specific problem, but I don't think it will get a proper answer in Alternative Game Libraries.

So I'm sending it to Music & Sound in the hope that the people there will be versed enough in theory to be able to take a whack at this one.

This topic is closed to new replies.

Advertisement