Music to play when actors are nearby?

Im wanting to have it so that if an enemy is within a radius of 500 of the player then a random tense music audio clip is played and stops when they leave that radius. If it helps all enemies are the same class and i need it to take in to account a multiple enemy scenario… so it would carry on playing the audio until the 500 radius is clear of enemies.

you could have the player have a 500 radius sphere collision on it and just count overlapping enemies on begin and end overlap events.

Begin overlap: add to array, then check array length.
End overlap: remove from array, then check array length.

If length = 0, means no enemies.
if length > 0, means at least 1 enemy.

if 0 enemies, normal music, else combat music.