How to get music to lower in volume according to distance from player to an object?

Hey, everyone! So I am doing sound design for a game and I’ve come across some issues regarding the music being cut off when a level-change happens. I know a lot of people have recommended using level-streaming or game-instances to create continuous music across levels, but it seemed a bit too complicated for me. So what I instead wanted to try was to have the music lower in volume according to the distance between the player and the portal where the level changes, so when the player enters the portal, the music is already muted, therefore there will be no abrupt cutoffs.

So lets say the music is at a normal volume in general, but when the player is at a specific distance from the portal then the volume begins to change according to the distance between the player and the portal. So it needs to be activated at a certain distance. Is there anyway I could do this with Sound Mixes and Sound Classes? This would be preferable seeing as I am using the Timesynth plugins this is not an audio component (so I can’t just use “fade out”). I have seen a lot of people control volume using widgets, but I can’t figure out how to control it with distance.

I am using UE4.23.1 and a MacBook Pro


Attenuation is what you need.

If you have an ambient sound in the level, you can click ‘override attenuation’:

The you can set how far the player will be able to travel and still hear the sound. The crucial parameters are ‘inner radius’ ( how far the player can go ), and ‘falloff distance’ ( how quickly it will attenuate after that ):


If you are doing this kind of thing a lot, you can setup predefined attenuation settings in the content browser:

and then just refer to them in the amibent sound settings instead of tweaking the parameters: