I’m not sure if this is what you call it, but can Python pick apart a sound file and find the beat of the music? I’ve seen this done in ActionScript, at the NewGrounds Audio Portal. I would like to figure out a way to do music visualizations with the BGE, and add them to a game.
Hmm… I’m not aware of anything in the BGE Py API that could be used to extract the necessary “beat data” from a WAV file. What you could do is manually “map” the beats to a soundtrack, but then you’d probably have to deal with time/sync issues and so on.
In short, I don’t know.
However, I am wondering… SDL has python bindings, right? Maybe there’s a way to write some py SDL code that could run/communicate in the BGE?
PyGame would be another thing you could look at.
Good Luck
PS: The action would definitely be much smoother than any flash game, thats for sure. I mean if you ever played Rose - games like that are just begging for hardware acceleration.
Why the hell is Adobe still keeping Flash in “software mode”? I just don’t get it.
some times ago some people discussed about using blender for VJing, and Rorschach and Filt3r released a blend+pd patch complex for doing sound analysis and controlling shapes of objects in blender …
It’s a good start I think … try a search with “vjing” you’ll find it, and some other things concerning midi input.
Hope this helps.
I must have missed that thread when it was first posted. Pretty impressive - although that’s not to say that I actually tried it - I just glanced at the videos.
There is just one thing I don’t like about this approach - It’s a “side-hack”, at best. I guess something similar can be said about pygame also, but to a lesser degree, since pygame has been used in blender with decent results before, and you don’t have to install some new sound lib in order to use it (it all binds to SDL already I think).
The bottom line is: Someone needs to get down and dirty with the blender source code, and add some decent sound capability.
Now before anyone freaks out, I’m not saying that I want/need something as unbelievable as full OpenAL integration (that’s overkill). Some simple mp3 decoding capability would be enough for now - just to get us over the proverbial hump.
iirc (very vaguely, may be wrong) in the old blender publisher 2.25 there was something available that could extract spectrum from a sound file (like ~~GetSpectrum or something along that lines).
@Social: SDL sure has python bindings. I read the SDL API, and I’m not even sure SDL can do it, but I found this. PyGame has nothing more complex than fadeOut and fadeIn.
@Olm-z: That’s very interesting, but, like Social said, I’m not going to make any casual gamer install puredata on their computer. Maybe someone can further integrate something like this in blender.