Sound overlapping problem

Hi,

In our game sounds for all types of buildings are going through one event, which have programmer sounds in it. However, when we place multiple buildings of the same type next to each other, the sounds starts to overlap on becomes loud. Is there a way to solve this problem?

A large number of event instances is louder than a single event instance, for the same reason that a crowd of people talking at once is louder than a single person talking. This is by design.

If specific events in your project are too loud, there are a number of ways to address the problem. The simplest is to turn down the volume of those events. Given that you have not done this, I suspect your desired solution has additional requirements that you have not yet mentioned. What are those requirements?

But this means that I need to check from Unity (by C# code) how many instances playing given sound are in hear radius and based on that adjust event properties.

This is doable, but I was looking for something more automatic, with use of Fmod.

I was thinking Transceiver/Receiver pair, but because there will be only one transceiver and one receiver event (instantiated multiple times for all types of buildings), I see no way on how to connect sound playing through transceiver (having programmer instruments to play different sounds for different buildings) with correct receivers. I hope this is clear - if not please say - I will show our setup and use case.

Please describe in detail the behavior you are trying to achieve. If you do, we may be able to suggest a way to achieve that behavior.

Do you want to limit the number of instances of a given event that can play at the same time? Do you want to keep the number of instances the same, but duck the overall volume when they get loud? Do you want each individual instance to be quieter when there are a large number of instances playing? There are ways to achieve all of these behaviors. Which one does your game require?

In the gameplay movie you can hear one event attached to two buildings (two the same events are playing at the same time). After 8 seconds one building is removed.

The main problem is the small delay that produces the flanger effect.

The second problem is the overall loudness produced by these two buildings.

One more thing worth mentioning - there might be a third building, but of different kind - this building will be using the same event, but with different sound through programmer instruments, which this event uses - so it’s parameters should not be changed.

One simple way to reduce the phasing would be to add a random modulator to the event’s pitch macro control. It doesn’t have to be set to a particularly high value; half a semitone will do. This will prevent phasing by ensuring each instance of the event plays at a slightly different speed. As a bonus, it will also make your identical buildings all sound slightly different.

To deal with the loudness, have you tried adding a limiter effect to the group bus into which the event is routed? This effect is specifically designed to limit to overall output of a bus based on its ceiling property.

If you want only some instances of an event to be changed and not others, you should split the event into two events, and change only one of them.

Do these solutions work for you?

Thanks for the advice! We are testing random modulator with limiter on the bus and it is working fine. However, there are some edge cases when we are not 100% satisfied with the results (when there are many many same buildings near each other or when modulator in rare cases draws pitches close to each other).

About splitting events - unfortunately this is not possible - we want our game to be highly moddable - so each building sound must go through one, generic event - since we don’t know all buildings that will be added by modders.

In mean time, we were testing one other idea - use of transceivers and receivers. But again, we were stuck on our setup - one event for transceivers and one event for receivers. So, is there a way of binding a transceiver instance (using programmer instruments) with receiver instances?

Or maybe some other technique, giving similar effects as transceiver/receiver but possible in our setup?

Have you considered creating multiple audio files for each building, and randomizing which one plays whenever the building plays a sound file?

FMOD Studio supports user-generated content that includes entirely new events. You can read about such user-generated content in the UGC section of the Supporting Downloadable and User-generated Content chapter of the FMOD Studio User Manual. Of course, the approach of using only programmer instruments also works, but has limitations that you have already discovered.

No. Every transceiver effect instance that’s set to transmit and to a specific channel sends its signal to every transceiver effect instance that’s set to receive that channel. This is the only behavior of transceiver effects in current versions of FMOD Studio.

There is no such technique. Sends allow you to send a signal out of an event to the mixer, but there are no effects other than the transceiver effect that allow a signal to be sent from the mixer into an event instance, or from one event instance to another event instance.

Yes, we have a system in place for randomizing sound files. But since this setup will be used also by modders, we are unable to force them to create multiple audio files - so we want it to be as good as possible even with one audio file.

Yes, we know this technique, however it has two major drawbacks, which we have seen multiple times:

  1. Modder needs to download FMOD and familiarize himself with it - instead of just adding an audio file to a folder with modded files.
  2. If we decide to upgrade FMOD to next major version, all sounds in mods created before this date will stop working.

Anyway, thanks for your outstanding feedback!

In that case, any technique that reduces the same section of the sound file playing at the same time will help. Randomizing the instrument’s start offset, to ensure it doesn’t always start from the beginning when the building starts producing noise?