views:

42

answers:

2

What are the best strategies for syncing music to object movement? The app I envision would have an underlying soundtrack with characters animating in time to the music. What I'm after is a strategy for having the soundtrack periodic send a message to an object, objects, triggering it to commence it's scripted movement.

Thanks, Doug

A: 

FMOD Ex should allow this sort of thing. It's not built-in, but it's relatively cheap.

David Dunham
I looked on the web site and don't see where it supports the iphone.FMOD Ex has the largest range of supported hardware, including: * Windows (32bit and 64bit) * Macintosh (PPC and x86) * Linux (32bit and 64bit) * Sony PS2, PS3 and PSP * Microsoft Xbox and Xbox 360 * Nintendo Gamecube and Wii * SolarisIs an iphone release coming in the future?
Jay
Sorry, the formatting got messed up in the last comment.
Jay
I'm about to ship a product with FMOD Ex, so yes, it definitely supports iPhone.
David Dunham
David,When you get some time I'd like to chat with you about your experience with FMOD Ex. I'm at douglass dot turner at gmail dot com or @dugla on twitter. Cheers.
dugla
FWIW, we didn't use sync points, but there is Sound::getSyncPointInfo which "Retrieves information on an embedded sync point. These points can be user generated or can come from a wav file with embedded markers."
David Dunham
A: 

The point is writing the object movement code so that it can use external clock signal. You can for example write the movement update method so that it takes a time delta:

- (void) updateMovementBy: (double) seconds {…}

In each loop you’ll poll the soundtrack player for current playback time, compute time delta from the last iteration and update the model. But of course a lot depends on what exactly you want to do in response to the music.

zoul