I know this post is old, but I’d like to clarify a few things for anyone else curious about this topic.
Attenuation can’t actually modify sounds quickly and efficiently, to deliver the behavior you are looking for. Attenuation is great for sound falloff and air absorption, but gunshots from a large distance, for example, cannot (yet) deliver the sound you’re looking to achieve while maintaining a high level of performance.
That said, most games will use multiple sounds for the same shot. I’m sure you already know that a single shot for the exact same weapon will often use a pool of sounds to ensure it sounds genuine (and not like the exact same sound repeating over and over). Much like this, it is very common to use separate sounds for distance.
A game will commonly have a pool of sounds for a shot that is up close, and an entirely different set of sounds for that same shot when it is to be heard by a player at a larger distance. Then, it is also common to have a very long distance shot sound, which is essentially only low tones as they travel farther than higher frequencies.
So, in short, detect the distance from the actor who is firing. If the distance is <= x, play the short-range sound. Else, if they are <= y, play the medium range sound. Else, play the long range sound.
Now, let me also convey that it is entirely possible to programmatically achieve what you’re after, but I do not think it is possible with the attenuator in UE4 without some modification. Some proprietary engines do use pretty impressive technology for doing these sorts of things on the fly. However, it is my personal opinion that to truly achieve an immersive experience for your players, separate sounds based on distance are the way to go. It’s a bit more work in regards to gathering sounds, but I don’t think it’s more work than would be required to programmatically modify/generate sounds based on distance.
Also, to help with the positional accuracy of sounds, it’s not entirely uncommon to (rather than strictly relying on attenuation) spawn the sound closer to the perceiver. This requires a bit of legwork in regards to the attenuation and falloff, but provides a bit more clarity and accuracy.
Hope this helps.