Use wasd and arrow keys. Click on the screen to move the sound source. Notice the sound panning and inverse-square fall-off. This is more more applicable in a 3D first-person environment. Use headphones though. DAME DANE DAME YO
NOW IN 3D: https://scratch.mit.edu/projects/302486594/ After many months of holding this idea, I have finally put the effort into implementing it... Ok I just noticed what I think is a bug and the sound fall-off does not work. I fixed it by changing the "Update Sounds" broadcaster in the loop to broadcast and wait. This however, causes significant lag. Another technical aspect worth noting is that the "ears" are both canted at a default 45 degrees from the camera center. The difference between the cosine of the right ear angle and the cosine of the left ear angle gives a weight that is used to multiply with a multiplier to give the pan left/right value. Changing the angle to, for example, 90 degrees will provide a complete occlusion of one side if the other side is directly facing the sound source. I decided that such an angle is not quite realistic as most humans, as far as I'm aware, have ears facing forward. Music: Baka Mitai from Yakuza 0, Love Psalm from Silent Hill 2, Akie秋絵 - 約束, Comptine d'un autre été: L'après-midi played by Ralf Kleemann