Possible to trigger/untrigger tracks based on conditions, but only at specific points?


#1

Hi!

I have multiple versions of a same song, which I’d like to alternate between based on parameters which may change at any time. So far, so good, I’m able to do this, but the song has various sections (think verse, chorus, etc.), and I’d like for the tracks to only switch when the playback reaches certain specified moments, so I could make the change only at the start of new sections. Is that possible? If so, how?

Thanks a bunch! :slight_smile:


#2

Hi Kaedalus,

There are two solutions to this problem I can think of.

  1. You will need to split the music event into the different versions and then split those sections down into the different sections. You will need to use destination markers to mark each beat of each section (eg. “Song 1 Verse 1 Beat 1” and use transition regions/markers to move to these based off parameter conditions.
  2. Using your current setup of multiple tracks, use destination markers and callbacks to see when a quantized part of the song has been passed, and then use a seek speed on your parameter to automate smoothly changing track volumes to switch songs. See the “music_callbacks.cpp” API example in the FMOD Studio API example project to see how to set up the callbacks.

There isn’t anything native to FMOD Studio that could do this easily but it is something that does sound useful. We’ll place it in our tracker to investigate for a future release.

Thanks,
Richard


#3

Thank you very much, Richard!

Your first solution works perfectly for what I intended. I just marked the spots where I wanted to change tracks, then added the transitions at the same spot. It takes a while to get done, but works just as expected.

One idea I had before your reply, was to slice all the tracks at the transition spots, so they’d be different events. Then, limit instances to 1, set it to Asynch so it would only stop playing at the end and set Stealing to None, so the other tracks would only play once that one was done - then I noticed Stealing was for Event instances, not instances inside the events, hahaha.

Thanks again. :slight_smile: