Rapid sound should not have any artifacts

As a developer, it’s impossible to use create immersive audible experiences because rapid-fire sounds have odd artifacts in Roblox. This is most easily noticeable with guns. Hopping into Phantom Forces, we can hear that the sound of rapid fire weapons sort of jitter:

https://drive.google.com/file/d/10KQWVBv_B6G_uZvzZkt5VyvaihQn68ZK/view

I thought that maybe it was something with the specific sound used for that gun at first, but I took a sound that was known to work perfectly fine in a non-Roblox game:

https://drive.google.com/file/d/1LatcZ_Jk3D22y9_SAxv8tvWnrknQtL5H/view

and when used in Roblox, it has that same jitter:

https://drive.google.com/file/d/1pxIzsUBqjy_DQe7ywC2ezwiz0LESUOrx/view

If Roblox is able to address this concern, my game would sound more professional.

11 Likes

Ive also noticed this. For example I was testing ambient sound but I wanted them to come from only one side of the map because they were ocean wave sounds and the map has water only on one side. I used multiple parts spread along the beach with a sound object in each part with the same ocean sound. Playing them all at once starts making a static-like noise.

The only way I managed fix this is to just use one sound object and have it played globally but on the client. You play it as the player gets near the location and stop playing it when they walk away from the location. (With volume control so it doesn’t just suddenly stop.)

5 Likes

I’m just curious, when script your rapid fire players are you playing the same Sound object or do you have a Sound object with PlayOnRemove enabled that you clone and destroy?

I do this too! I wish there was a way to make sounds come from multiple parts, or have sounds come from the entire volume of a part (instead of just the center point)

5 Likes

I clone the sound object, play it, and then destroy it once the sound has finished playing.

1 Like

It’s more efficient to enable PlayOnRemove in the template object and destroy the clones so that the sound plays automatically while the objects are cleaned up immediately. I’ve tested the difference in Studio and it does sound less jittery, you may want to test it yourself.

sound = script.Parent:WaitForChild("Sound"); sound.PlayOnRemove = true

while wait(0.1) do
local clone = sound:Clone()
clone.Parent = script.Parent
clone:Destroy() end

This happens because the sound stops abruptly as the new sound starts playing. Also, in that Warframe example you provided, it sounds like each gunshot has a different random pitch which makes it less jittery.

This does not seem to make a difference.

These are clones. Playing one sound does not stop the others.

1 Like

Sounds like they are being stopped once a new one starts playing.

Is this possibly an issue with Same SoundId Jitters When Played Close Together? All of these gunshot sounds would be using the same SoundId and play at the same time, so I think it would trigger this bug.

I just tested for this bug in Studio and if I play two sounds with the same id then they won’t play correctly at all. Their PlaybackLoudness jumps to 0 constantly and I can’t even make out what I’m supposed to hear from either of them. If I clone one, delete the two old ones, then play the clone, I can hear fine.


I can see this happening internally if Roblox is unable to play enough sounds at once. I don’t know if this would happen with one player, but with 10 or 20 or 40 all shooting at once it seems very likely.

An interesting workaround idea is to pre-generate the rapid-fire gunshot sounds as one audio object and fade into it after the first few rapid-fire shots.

Could it be jiterry due to interference?

I was able to avoid this problem by setting each sound’s SoundGroup property to nil. If not, maybe it’s an isolated sound driver issue?