AutoGuns Multiple Shot Sounds

Hello, friends!

We have an issue with implementing autoguns multiple shots.
The FMOD version is 1.10.08 for now the engine is BigWorld.
As far as I’ve known, one of the best ways of making it work good
is to use loop region or sustain point for the time of pressing the “Shoot” button
and then releasing it and finishing with shot tail, all within one sound event.
I’ve used the scatterer instrument for the shooting sounds (I saw the video with short explanation of similar task fulfilling of another sound-designer), the scatter distance interval is 0 and the spawn interval is related to the shooting speed of the gun. So when sustain point or loop region is reached, the shot sound become to repeat.
Then two ways and quests appear:

  1. With sustain point - unfortunately our programmers don’t know how to key off out of sustain point.
    So the first question is - how should they do that and is it better than the way 2)?

  2. With loop region depending on parameter value (I called this parameter “Loop_Trigger”, from 0 to 1, when it’s lower than 0.5 then no looping and if 0.5-1.0 then the looping works, and after that the programmer sets the “no loop” value with code and tail sound is being played). That is quite working setting, however if the parameter is initially set to “no loop” value, then the scatterer instrument plays two shot sounds instead of one within FMOD and within the game. So we suppose that there is some delay of reacting of FMOD to parameter (or what could be the reason??).
    However, to check the latency of reacting to the parameters I made another parameter “Volume Trigger” and if this value is lower 0.5 - the volume is 0 dB, and if it’s higher - then it is -inf and there is no audible delay of changing the volume after changing the parameter value. Please help us to solve this issue or maybe you have some universal decision for designing autoguns multiple shots?

Thanks a lot in advance!

Best regards

You can find an example of how to create an auto gun in our examples, it’s set up to play a looping multi-sound and is stopped by calling stop. It uses a parameter with an AHDSR to allow shell casings to persist when the gun stops.

To trigger a sustain point in code use Studio::EventInstance::triggerCue.

The tricky part with looping on a parameter is FMOD will schedule the playback of sounds in advance to ensure there are no gaps. The downside is loop logic will be processed ahead of time, sometimes allowing more iterations of your loop than desired.