Bug: Multi Instrument, playing multiple clips ONLY in Unity

Hi there!

I have a weird bug. So I am using FMOD Studio and integrating into Unity. I have a weird bug with my project that only seems to show up in gameplay, not when I play inside FMOD Studio.

This is for the music track for the game.

I’ve tried to upload screenshots… hopefully they are visible.

My track has basically three chunks… the intro section, and then two “bars” in the main loop. The interactive component is mostly “vertical” where some tracks become louder the more the player progresses.

I have a main lead track, called “lead.” In the intro, and in the first bar of the loop, it plays the main melody, L3. Then, in the second bar, I used a multi-instrument to add some randomization. It can either play one of the other four melodies (L1, L2, L4, yeah my naming convention is messed up), or play nothing at all. (I couldn’t figure out how to add a “do nothing” option so I added a blank audio clip as a 50% option on the multi-instrument.)

When I play it inside FMOD Stuido it works exactly like I wanted. However, when I play the game inside unity, sometimes the mutli-instrument plays multiple clips at the same time.

Any ideas what I might be doing wrong?

Tysm!

<3 S



Hi,

I can’t see any reason in your screeenshot that your multi instrument would be retriggering, but it’s difficult to say for sure without access to your project. To start, so I can test issue on my end, what versions of FMOD Studio and FMOD for Unity are you using?

As a workaround for the moment, you should be able to force monophony by selecting the multi instrument, opening the Trigger Behaviour menu on the right side of the Playlist, and setting the polyphony to 1 with the Stealing mode to “None”. This will ensure that the instrument will not retrigger until it has stopped playing completely.

An empty audio clip can work, but you can also enable “Probability” in the Trigger Behavior menu, and use the “Chance” setting to set the trigger chance to the desired value. If you set this to 50%, the instrument will only play 50% of the time when triggered.