Adding delay between loops

As the title says, I have an ambience event that loops no stop but also a background OST we want to loop with some delay between each loop, is this possible to do inside FMOD or is something I should handle in code?

Yes, this is something you can do in FMOD Studio. You could also do it in code. Both are valid options. Either way, you’d want the looping ambiance and the background music to be two separate events in FMOD Studio.

There are a wide variety of ways to add periods of silence to a looping event without using code. Off the top of my head:

  • You could create a loop region around your music instrument that’s longer than the music asset’s play time.
  • You could place the music instrument and a silence instrument inside the playlist of a looping multi instrument. This would allow you to keep a fixed length of silence between songs, even if the songs in your OST vary in length. This would allow you to automate and/or modulate the length of the silence as a way of varying how frequently music plays in your game.
  • You could create a loop region that the playback position enters whenever the event finishes playing music, place a transition marker in the loop that sends the playback position back to the start of the music instrument, and set the trigger conditions of that transition marker however you like.