Linking a timer in Unity with an event in FMOD

Hi all,

Excuse me if this post doesn´t belong here, I´m kinda new to FMOD :slight_smile:

I´m having a hard time (i´m in learning process atm with FMOD) linking a timer in Unity with FMOD.

I want to create an event “Time” linked to a in game timer. While the timer is not under -for example- 30 seconds, the event “Time” should play a song at its normal pitch in loop, although when timer hits the 30 seconds left mark, the event should play the same song but with a higer pitch.

I thought about creating some things in the event that, i think that might work…:

  • List item 2 file of the same audio, one of them with a parameter condition of time = 30 secs or below and pitch altered.

Problem i´ve found is that playback is always (as far as i know) forward and not backward, so i don´t know to test it properly.

Anyway, Am i doing it right or is there any way of linking a timer in Unity with FMOD events in an easier way?.

Ty in advance.

Parameters are, indeed, the correct tool for altering the behavior of a playing event. Provided you have created an event whose behavior depends on the value of its parameters, all you need to do is set the value of the event instance’s parameter in your game, and the event instance’s behavior will change accordingly.

I’m not sure I understand why you would need playback to run backward in order to test this behavior. The event you’ve described only needs to play the song at a higher pitch, not backwards. Wouldn’t it be enough to change the value of the parameter?

Blockquote , all you need to do is set the value of the event instance’s parameter in your game, and the event instance’s behavior will change accordingly.

Blockquote

Thank you for the answer! I´ll do that.

Thanks again for the support!.