Parameter Timestamp

(Pat McDermott) #1

I was just wondering if there was some way to access or attach a user parameter to a timestamp in FMOD Studio, similar to adding a marker to the timeline. I’m looking to be able to trigger an effect/animation/etc in-game when certain points are reached in the audio, and having a callback or trigger with this functionality built into FMOD would be a big timesaver.

(Andrew Scott) #2

Yep, in Studio, right-click in the blank space just below the timeline of your event and select “Add Marker”. Double-click on the marker’s name to change it to whatever you want.

In your code, use Studio::EventDescription::setCallback to set a FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER callback. In your callback you can find the name of the marker by accessing the FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES struct that’s passed in.

Is that what you’re after?

(Pat McDermott) #3

That is exactly what I’m after, thank you so much!

(Pat McDermott) #4

Follow up question. I did what you suggested and it works great! I am wondering however, if it’s possible to access markers in a nested event the same way. If I had a multi-sound of events and wanted to use markers for callbacks, how would I go about accessing the nested events?

(Andrew Scott) #5

Hi Pat, apologies for the delay. Currently it’s not possible to hook timeline marker callbacks triggered from nested events in that way.