Transition not working if value-change happens too close to the transition-point

Hey, I’m currently working on backgroundmusic for a game. I have 3 different loops that need to be played based on the intensity.
I have transition regions that switch from one to another loop on the timeline linked to a intensity-parameter.
my problem is:
The transition basically works fine, if I change the value of the parameter, the loop plays along until it reaches one of a few quantisation-points and then transitions into another loop. BUT if I change the parameter shortly before a transition-point, the transition just doesn’t work and it seems like fmod is not noticing the transition point. I tried switching the transtion region with seperate transition-points, but I still have the same problem.

The transition-region for the loops has a quantization point every bar, thats like every ~1.7sec in my case. If the value-change hapens between ~0.0-0.5sec before each quantisation-point, it just doesn’t work and the loop goes on for another 1.7sec until it transitions

Because processing isn’t instantaneous, FMOD needs to start processing sound a short while before it plays through the speakers. Because of this, FMOD can’t respond to changes in “what’s going to happen” instantly; it needs a small amount of advance notice in order to have time to process the new audio.

The exact amount of advance notice required is between one and two updates. By default, update() is called once every 20 ms, so 40 ms should be sufficient under normal circumstances. However, if any of the assets used by the event are set to stream, additional time is required in order to prepare the stream buffer.

In your case, you said you’re needing to activate the transition region between 0 and 500 ms before you need it to fire. Could you narrow that range down? If it’s closer to 0 ms, you may be seeing the expected behavior; if it’s closer to 500 ms, there may be an issue.

In any case, you may be able to improve the behavior by ensuring none of the assets used by the event are set to stream in the assets browser. Assets of greater than 10 seconds in length are set to stream by default, so they’re good candidates to check.

Thank you! I indeed had every audiofile over 10sec on stream, after changing that it worked much more consistent. It’s still not working everywhere, but now the problem region is really just the last ~30-40ms. I guess I can’t really improve more as my “3loops” are actually multiloops that each contain 3 individual loops, so it’s actually 9 loops and also has to process which loop to play all the time. On top of that, i have another 3 automated loop sthat function as transitions between the multiloops, so many things for fmod to consider.
Thanks for the reply!

I’m glad to hear that turning off streaming helped!

If you’re down to under 40 ms, there’s not really anything more you can do, short of fiddling with FMOD_STUDIO_ADVANCEDSETTINGS in your game’s code - and you’re unlikely to get significantly better results than what the default values provide. As I said in my earlier post, processing can’t be instantaneous - and so it’s physically impossible for a effect to happen at the same moment as its cause.