In this demo: move your mouse around! The volume and side of your stereo speakers (if present) will depend on how far the moving sprite is from your mouse. (And the direction from the sprite to your mouse.) Also press space to play a sound at a random position, and the right arrow to switch what song the music player is playing.
Version 2: Based on @-Rex-'s version, this one should be more realistic! https://scratch.mit.edu/projects/279155367/ This is a very simple localized sound engine. It's used to make sounds feel like they have space, by making use of the "volume" block (sounds get quieter the further away you are) and the new in 3.0 "pan left/right audio effect" block (sounds come from the left if you're to the right of them, and vice versa). I've tried to make it quite simple to use; as long as you send the "broadcast (localized sounds → update)" (and initialize) broadcasts like in the demo, it'll automatically play and adjust the sounds that are added to the list. Check out the demo sprites for an idea of how to use it! Or explore the "Localized Sounds" sprite to see how it works. Feel free to use in your own projects! Remember you'll need to have a duplicate of each sound (ended with "B" instead of "A" - take a look at the sounds tab and the code!), in order for Scratch to play audio from both sides of the speaker. I'd appreciate it if you linked back to this project in your notes and credits. (I have no idea if anybody will actually use this, lol.)