How to make volume/playbackspeed of sound explosion tied to blast radius or blast pressure

is there some sort of formula to determine the pitch and volume of the sound according to how powerful is the explosion? like the bigger the blast radius the higher the volume and higher the blast pressure the higher the sound pitch so how to do that? any help

There isn’t any formula I believe, but it isn’t that complicated.
You can use a constant variable for your increment.

local Explosion = game.workspace.Explosion
local Sound = game.workspace.Sound

local BR = Explosion.BlastRadius
local BP = Explosion.BlastPressure

local increment = 0.01
local volume = Sound.Volume -- Loudness
local pitch = Sound.PlaybackSpeed -- Pitch

volume = BR * increment -- 100 BR = 1V, 1000 BR = 10V
pitch = BP * increment -- 10000 BP = 100 P

Do keep in mind volume only goes up to 10, and playback is 20. So if you’re dealing with larger numbers of PB and PR, then make the increment smaller. Alternatively you can have it under a loop and constantly increment. This certainly isn’t a formula but I’m sure there are some great equations if you really think about it.

1 Like