BUG: Scatterer instrument not killing its voices

Hi!

I’m using FMOD 2.01.11 on Unity and noticed a weird voice counting from a scatterer instrument when profiling with FMOD.
Whenever I have a scatterer instrument that has in its playlist a referenced event (that only contains a multi-instrument and a spatializer in the master track) the voice count starts to act in a weird way.
This is scattered object is playing in a scene and it’s starting at the beginning of the game and looping all the time. If you wait a time and check the profiler, this is what you see:


Cow Bell event is where the scattered event is located and Cow Bell/bell is the referenced event.

It sounds like is a bug, because I tried to limit max intances of the nested event and it didn’t work.

Thanks!

I’m not sure an event max limit poly applies when the event is nested (not in front of my computer to verify, though). Why don’t you use the scatterer max polyphony instead?

It’s not working either :frowning:

Could you post screenshots of your events, parent and nested, with the options of the scatterer and the multi?
The issue may come from putting a multi inside a scatterer (maybe the multi loops itself but counts as 1 scatterrer spawn…).

As Alcibiade mentioned, the max instances property of an event only applies to instances of the event spawned by your game’s code, and does not affect event instances spawned by event instruments.

What spawn stealing behavior does your scatterer instrument use?

Hey!

Here’s how I configured the scattered event:


Here’s the bell sound that is playing in the scattered instrument:


@joseph I’ve set the Spawn Stealing to Oldest.

Ok. If I get it right, the scatterer spawns sounds around 3s duration long, each 1s in average. So if the profiler shows the number of voices always increases, that could indeed be a bug, we’ll let @joseph try to replicate it and confirm.

But there’s a few things I don’t get.

Why did you try to limit the polyphony to 16, since it should theoretically never be reached (it should stay around 3, if I’m correct)?

Why don’t you put your cowbell sounds directly in the scatterer playlist? You would save 2 unnecessary levels: the multi and the nested event.

Why do you spend some CPU with 2 pitch shiftings doing almost the same thing, one on the scatterer (pitch rnd) and one on the multi?

I wasn’t considering the polyphony limitation yet. For me it was working as a safe number in case something happens (I think it’s the default value as well).

I’m trying to create a spot where some sounds are randomly generated in random spaces. I’m putting the sounds in a referenced event because if I put them directly, each instance won’t sound in a 3D space like it should. I might be wrong and I honestly agree that’s redundant too, but when I try to do as you’re suggesting I don’t get the result I’m expecting. Maybe it’s another bug?

The pitch shift is totally me testing and seeing the results but it shouldn’t be final. Thanks for the tip!

I forgot to explain that I’m using this scattered to fill a specific area of the game, so the idea is to have a localized area in which you’d hear sounds from multiple directions (it’s a top-view camera, tho). Removing the spatializer from the main event would still work in this case?

Yep, I read to late you were talking about “a spot”. That’s why I removed my post :wink:
That being said, it’s strange to have a spatializer both on the main event and on the nested event…

I’m afraid I haven’t been able to reproduce this issue while testing here. Are you able to send us a copy of the event in question? There may be some detail that produces this behavior that we’re overlooking.

Sure. Here it is: https://filebin.net/7ovwxic66j6al3up

I’m afraid I’m not able to access that link.

Just encountered the same issue. In my case, it was resolved by getting back the master pitch of the Scatter Instrument from -5 to 0. Instead, turned down the pitch in Master Track to -5 and it worked.
It seems lower pitched Scatterer Instrument has some issues of handling voice. Sometimes spawned sounds seem locked and alive for a while after playback.

1 Like

Yes, I found the same solution. Maybe it’s a bug @joseph ?

Thanks, this was the missing piece of information I needed to reproduce this issue!

This is definitely a bug. I’ve added it to our bug tracker.

2 Likes

Hello @joseph ,
Did you managed to reproduce this issue? It seems that it’s always present in the latest fmod version (2.02).

Yes. As I mentioned in my previous post, I reproduced the issue and added it to our bug tracker. According to our records, the issue was then fixed in FMOD Studio versions 2.01.14 and 2.02.05.

I suspect you are using version 2.02.04 or an older version. If you upgrade to version 2.02.05, you will find the issue has been fixed.