rserota / wad

Web Audio DAW. Use the Web Audio API for dynamic sound synthesis. It's like jQuery for your ears.
MIT License
1.88k stars 160 forks source link

Create a Listener Wrapper Object #108

Closed frastlin closed 4 years ago

frastlin commented 5 years ago

Hello, Currently, the way to access the listener object is through accessing:

Wad.audioContext.listener

This is great, but there is some functionality WAD could add to make the process better:

  1. The set orientation and set position functions are now deprecated, so adding those back would be valuable.

  2. Currently, the set orientation requires a vector, but all the code in my systems uses angles and degrees. It would be extremely helpful for me if there was a set orientation function that would rotate the listener object through:

    setOrientation(90)

  3. There could also be a setPosition function that takes a theta and an amount to move, and sets the new position if the 3rd argument is true. Then it can return the new position.

  4. This would also be a good place to allow someone to put effects over all sounds at once, as if the listener was having an effect put onto them. Thanks,

frastlin commented 4 years ago

Closing in favor of: https://github.com/rserota/wad/issues/121