We are working on an adaptive audio game project that relies on callbacks from an FMOD event, in particular FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT and FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER. All in all it works well for our purposes!
However, I’ve realized that while it’s possible to get callbacks for beats in the fashion of 21.1, 21.2, 21.3, etc., there is no evidence that we can subscribe to 21.1.1, 21.1.2, 21.1.3 and so forth. Essentially we may want to support certain game events triggering of eighth notes and sixteenth notes inside a measure.
What would be the best way to go about implementing something like that? Do we have to build something custom or is there a more elegant solution?
Any help is appreciated - big thanks!
Currently we don’t support getting callbacks on sub-beats, but I have suggested this feature to the dev team. In the mean time something custom might be your best choice.
I see, thank you for the swift response.
Do you have any recommendations on how to go about this? My first thought is to keep track of the last time beat callback occurred in Unity and then check how much time has passed since that moment to see if we need to trigger anything else. FMOD is playing on a different thread though so it might be imprecise…
One of my teammates said we could potentially use different tempo markers to account for the sub-beats for a particular section of the song, which seems to be the only reasonable workaround.
What do you think?
Tempo markers are your best bet. I tested checking time against the last beat and you are right it is rather imprecise.