Hey there
As you can see my music systems contains out of 2 blocks. Left contains the complete song, right a minimal version. Everytime certain conditions turn true in Unity, the FMOD Labeled Parameter is switching btw the states “Driving” and “Standing”. In FMOD the transitions sounds smooth. In-Game, specially noticeable on the drums, there will be an overlapping sound. When the transition is done, everything sounds normal again. Although sometimes a track seems to stay delayed until another transition starts.
For me it sounds like a coding problem, but i don’t see what could be wrong there.
Also i had the issue of tracks staying delayed, when i was switching to the pause menu. Here some tracks should be muted. I fixed this by having a parameter for the pause menu with a volume automation which never goes to -endless dB.
Hmm… I’m not spotting any glaringly obvious problems in that script… I’ll look at it further.
Have you tried recording a profiler session while connected to your game using live update? If you do, does the issue occur in FMOD Studio when you play back the session in simulate mode?
This also occurs when i playback the FMOD Profiler Session. The music only has 1 instance, but it seems to happen when the amount of voices changes.
Maybe it helps to know, that the singular tracks of a music event in fmod got delayed whenever i went into the pause menu. When i skipped back to resume the game, the track which got muted in the pause menu, was delayed. I fixed this by setting the volume automation in my labeled parameter not to -infinite dB but -75dB.
What happens inside your FMOD event when the game is paused? Does a parameter value change? Do any transitions occur, and do they involve transition timelines?
When the game is paused the local “Continuous Parameter” named “MenuMusicLayer” (you can see on my first screenshot), turns from 1.00 = 0dB; to 0.00 = -75dB. This volume automation is on a Gain Effect of my guitar track for example. This is not a labeled parameter, it is continuous, as i mistakenly wrote in my message before.
I have transition regions, destinations, markers and loops in my timenline but they don’t get triggered when the pause menu is activated. There just the script communicates to turn the continuous parameter to 0 and back up.
The most likely explanation, if the instrument is asynchronous, is that setting the channel/voice of the track to -80 dB is causing the channel/voice associated with the instrument to be virtualized. Then, when the channel/voice is later un-virtualized, it starts playing its asset from the beginning, because asychronous instruments assume that you always want to start playing the asset from the same point (by default, the beginning). If this is the case, possible solutions include using a synchronous instrument instead, using quantization and/or start offset to ensure the asset always begins playing from an acceptable point, or preventing the channel/voice from being virtualized (as you have already partly done by setting the track volume to -75 dB instead of -80 dB.
This is a very useful information for me for the future - knowing it will be virtualized in this context and then starts playing from the beginning.
Neither in the pause menu situation or in-game, i have my instruments asychn. This button is greyed out.
For the pause menu issue i didn’t use quantization, but synchronous instruments.
For the main issue, overlapping music files while playing, they already are synchronous instruments and i use quantiztaion as well as 1 bar of crossfade transitions. This 1 bar is exactly where it happens.
This issue happened in FMOD STUDIO and FMOD for UNITY Version 2.02!
After updating both to Version 2.03., i can’t replicate the overlapping anymore. I am happy and a bit ashamed that this is the solution. I were avoiding the update in fear of corrupting my project, since it is kinda huge.
If the issue returns, i will reach out again. Thank you Joseph for taking your time and capacities to help me on this concern <3