Ircam-RnD / binauralFIR

Binaural module for the Web Audio API
https://ircam-rnd.github.io/binauralFIR/
BSD 3-Clause "New" or "Revised" License
146 stars 16 forks source link

Listener Position #7

Open zya opened 8 years ago

zya commented 8 years ago

Any considerations on how we can change the listener position in real time? Similar to the native listener.setPosition and listener.setOrientation.

ouhouhsami commented 8 years ago

Hi,

You should just use setPosition(azimuth, elevation, distance). The module, and this method is made explicitly for that use case.

Best

zya commented 8 years ago

From what I understood, the binauralFIR's .setPosition method is more like panner.setPosition. My question was about the listener. In the web audio spec, the panner node will spatialise the object relative to the listener position.

So for example, if my audio graph has 2 instances of binauralFIR nodes, each set with different parameters, calling listener.setPosition should influence the parameters on each of the instances of binauralFIR.

Does the library currently support this?

ouhouhsami commented 8 years ago

You are right, the library currently doesn't support that. This should be a new feature, with an API corresponding to the Web Audio API listener position.