[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Music



On 7/14/05, D. Hartley <denise.hartley@xxxxxxxxx> wrote:
> What I'd *like* is to be able to listen for certain individual
> elements in the song, and make them game events.  In theory I could do
> this when the song ended, make something happen and replay the song,
> but I couldn't do it, for example, every time a high C was played, or
> a drum beat, etc.
> 
> Can pygame do anything like this? (or anything else, for that matter?)
> the closest thing I've seen so far is finding the position in the
> song, so that if you knew you had a high C (for example) every x
> number of miliseconds, you could make an event happen at every x
> number of miliseconds. They wouldnt exactly be tied (and you'd pretty
> much have to create some boring music), but I can't find much else.
> 
> Anybody who's played something like Lumines, O2Jam, Band Brothers, or
> I'm assuming DDR (i've never played but believe it's tied to events in
> the music) will know the kind of tie I'm talking about.

I don't think Lumines and other music based games analyze the actual
music files either. My guess is that most of those games have two
files for each song, the actual mp3 etc. music file and another
metadata file that lists the positions of different "events". The
metadata could be similar to the midi/tracker formats, which would
make it easy to react to  the music in the program, but you would
still get the benefits of the better sounding mp3 format.

-- 
Sami Hangaslammi