Syncing in-game events with music bpm

Hello there :smiley:

I want to subscribe game logic and UI animations to the bpm of a music track. What would be the best way to do this with FMOD?

Thanks for your help!

The best way to handle this is to use event callbacks with the Studio API, which will allow you to receive a callback on an event’s timeline reaching a beat and/or bar, based on the tempo set by tempo markers in Studio.

Based on your posting history, you seem to be using Unity - our Timeline Callbacks Unity scripting example demonstrates how to do this with Unity. If you’re not using Unity, you can take a look at the “music_callbacks” Studio API example included with the FMOD Engine installer instead.

Thanks for your reply! Sorry I forgot to mention it bur this is actually about Unreal Engine. Where can I find documentation on the music_callbacks?

The music_callbacks example isn’t Unreal specific, but can be found in the Studio API examples included with the FMOD Engine installer, which are located in the install directory at “./api/studio/examples”. For Unreal-specific info, our Unreal documentation on callbacks provides a brief guide on using timeline callbacks with Blueprints.