# Music layers going out of sync

**URL:** <https://qa.fmod.com/t/music-layers-going-out-of-sync/18750>\
**Category:** FMOD Studio\
**Created:** [May 11, 2022, 11:03am UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750 "2022-05-11T11:03:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sronc002](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@sronc002](https://qa.fmod.com/u/sronc002)\
**Post date:** [May 11, 2022, 11:03am UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750/1 "2022-05-11T11:03:44Z")

</div>

Hey!

Having trouble stopping my music layers go out of sync.

The system works by fading in the next layer of music, whilst fading out the previous layer. Effectively swapping layers. But during the overlapped crossfade, i can hear there’s a slight delay. Please see screenshot.

 ![Screenshot 2022-05-11 120306](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/9/9f98fc54ea6aec33952f8cd2a28a02c199f1765b.png)

This also happens within mins of gameplay. So im assuming it’s an immediate issue.

I have the tracks as a nested event - could that affect the loading times of each track?

 ![Screenshot 2022-05-11 115705](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/0/0faf429aad1028bfeeb3272efa18dd32c0b438e7.png)

All assets are non-streaming. I’ve also set the volumes to never dip below -75 which i’ve read could cause this issue.

I also have several parameters that add momentary filters to the music, or increase the wet track automation. Not sure why they would affect the sync but thought it worth mentioning.

Any ideas of what i can try next?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [May 11, 2022, 11:22pm UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750/2 "2022-05-11T23:22:24Z")

</div>

Hmm… If you remove the volume automation from the audio tracks in your parent event, do the various tracks play perfectly in sync? Or are they out of sync at certain points in time?

---

<div class="post-metadata">

**Author:** ![sronc002](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@sronc002](https://qa.fmod.com/u/sronc002)\
**Post date:** [May 12, 2022, 2:08pm UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750/3 "2022-05-12T14:08:55Z")

</div>

so interestingly, i can’t recreate the bug inside of Fmod, only in Unity during gameplay.

I wonder if the loading times in there are causing this? Anything i can potentially do on my end?

---

<div class="post-metadata">

**Author:** ![sronc002](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@sronc002](https://qa.fmod.com/u/sronc002)\
**Post date:** [May 12, 2022, 3:55pm UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750/4 "2022-05-12T15:55:45Z")

</div>

or perhaps the nested events are going out of synch with each other?

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [May 13, 2022, 1:12am UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750/5 "2022-05-13T01:12:27Z")

</div>

> [@sronc002](#):
>
> i can’t recreate the bug inside of Fmod, only in Unity during gameplay.

This strongly suggests that the sample data associated with your events is not being loaded in time for the events to play.

Have you enabled the “Preload Sample Data” setting for the event emitter or bank loader, or enabled “Load Bank Sample Data” in FMOD’s initialization settings? Any of these settings can cause the sample data to be loaded into memory in advance, reducing latency when the event instance is played if done with enough advance notice.

---

<div class="post-metadata">

**Author:** ![sronc002](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@sronc002](https://qa.fmod.com/u/sronc002)\
**Post date:** [May 16, 2022, 8:36am UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750/7 "2022-05-16T08:36:24Z")

</div>

i have not but will try next - thanks!

is it possible to JUST pre-load a music bank instead of all sounds?

---

<div class="post-metadata">

**Author:** ![GiacomoF](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@GiacomoF](https://qa.fmod.com/u/GiacomoF)\
**Post date:** [May 16, 2022, 9:16pm UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750/8 "2022-05-16T21:16:53Z")

</div>

You may want to check my hard code fix that you can find here:

> [@Streaming Music Stems Out of Sync when first booting the game](https://qa.fmod.com/t/streaming-music-stems-out-of-sync-when-first-booting-the-game/15112):
>
> Hello, I have scouted the forum looking for similar posts and it’s rather overwhelming how common this problem is. In short, I have a 5 stems music system and upon first booting the game, when no data has been cached yet in the computer, it is extremely common for the layers to start off sync from one another. Because streaming assets don’t have an API implementation, it’s proving particularly difficult to fix this issue. Here is what we have tried or looking into or things that we just cannot…

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [May 17, 2022, 6:24am UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750/9 "2022-05-17T06:24:28Z")

</div>

> [@sronc002](#):
>
> is it possible to JUST pre-load a music bank instead of all sounds?

Yes, of course! Being able to pick which banks’ content should be loaded is what the bank loader component is for. Indeed, it’s the purpose of banks, themselves.

---

<div class="post-metadata">

**Author:** ![sronc002](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@sronc002](https://qa.fmod.com/u/sronc002)\
**Post date:** [May 20, 2022, 11:26am UTC](https://qa.fmod.com/t/music-layers-going-out-of-sync/18750/10 "2022-05-20T11:26:58Z")

</div>

thanks a lot for this! Very insightful. My system doesn’t sound as intricate as yours so will try the pre-load feature in Unity first 🙂
