Persistent audio that changes volume and panning depending on the scene

I need to start a sound background for the entire project by modulating the volume and panning for each scene. In short, as if you were taking a tour of a house and the audio is in a specific room, the further I move away from the room, the further you can hear the audio, so each scene corresponds to a specific room. How do I do it?

If I had to create audio effects like that in Hype, I'd probably use Howler.js…

Then, I'd just use JavaScript to control the volume of the audio. Although, it does have Spatial audio… https://howlerjs.com/#spatial …but the example is more like a video game.

1 Like