Multi Instrument Shuffle only one time when Async On?

Hello There,

I am new to FMOD, but have learned some of the basics.
I hope what I want to is not impossible. I have composed 3 Ambiant Tracks, and each one does have 3 variations (So 9 tracks in total). Every track contains 4 Instrument Loops.

In the game, there are multiple Phases (phases A, B and C); these phases have subcategories (Phase A.1, A.2, A3 and A4).

For example:
For Phase A.1, the game should play Ambiant Track A, but only the first loop instrument. For Phase A.2, the game should continue to play the previous Track A.1 state, but the 2 instrument loop is added to the already played Instrument 1 loop. For Phase A.3, the game should continue to play the previous Track A.2 state, but with the 3 instrument loop is added to the already played Instrument 1 + 2 loop.
And so on…

This implementation is working fine. However, the problem lies in the shuffle of the variations loop because only the full loop can be shuffled, not the single Instrument.

So, for example, when Ambiant A Loop 1 (Instrument 1 only) finished playing, there should be as next a Loop change:
Loop 1 to Loop 2
Loop 1 to Loop 3

So I tried to make the shuffle with a Multi Instrument in Async mod, but it repeatedly played the same loop and did not Shuffle at all.
I spend much time trying different approaches, but I could not find any solution. I am desperate and do not know what to do now.

FMOD Project is: FMOD - Google Drive

You will find the Ambient track event in: “Music” → “Ambient” → “AmbiantA V.3”

Very Kindly,

If I understand your problem correctly, the main multi doesn’t shuffle because each component is looped itself. Remove the loop region of A_Loop1, 2, 3 and the multi in the parent event will then shuffle correctly. However, as you will see, the transition from a loop to another isn’t smooth, so I would suggest another method. Please first try what I suggested and confirm me that I correctly understood what you’re looking for.

When triggered, a looping multi instrument selects one of its playlist entries to play; then, when that playlist entry finished playing, it selects a new playlist entry to play.

The playlist entries in each of your multi instruments are nested events that contain loop regions, meaning that they never actually end. As a result, your playlist entries never actually finish playing, and so your multi instruments never select a new playlist entry to play.

As Alcibiade says, the solution is to delete the loop regions in your nested events. This will ensure that your playlist entries end instead of looping forever, and thus allow your multi instruments to select new multi instruments to play.

As Alcibiade also notes, the loop isn’t totally seamless in this circumstance. This is a bug. We’ll implement a fix in an upcoming version of FMOD Studio.

1 Like

Is it really a bug? It wouldn’t come to my mind to rely on FMOD to perfectly detect the moment an event (the nested loop) finishes (by lack of content) and perform a seamless transition to the next entry of a parent multi-instrument. I also thought going from one entry to another in a multi-instrument isn’t totally instantaneous (hence no possible seamless transition), but maybe I’m wrong on that point.

I think the more reliable way to resolve the problem here is to put the multi in a nested event (it also requires to remove the loop regions on each multi component), that way:

Even if the bug is resolved, this setup has the advantage to allow to have a slightly longer loop than 8 bars: the loop itself + a reverb tail. The reverb tail would then be blended to the next multi entry, helping for a smooth transition, without loosing the tempo synchronization.

However, note that your parent event relies on the tempo to synchronize your stingers, but the nested loops are asynchronous. This could theoretically cause some desynchronizations if the event is played a long time; a high event “priority” should be a good thing.

1 Like

I checked with our developers to be sure, and (unless there were some miscommunication) we are. It’s a bug.

In theory, it should be instantaneous, as our scheduler looks ahead and schedules each new playlist entry to play slightly in advance of when it is supposed to start. Indeed, if you create a multi instrument, populate its playlist with single instruments, and set its playlist to loop, you’ll observe perfect seamless looping.

Hello Again,
Sorry for my late response, but I had to move quickly and didn’t think at first I would become so fast a reply… (It was the sixth time I asked somewhere).
Well, I try all the solutions and yes they all worked ! (the big problem lies in the loop region in the child Loop event (A_Loop1-3) and it makes very well sense)

I Thank you 2 very much ! :slight_smile: