resonance-audio / resonance-audio-web-sdk

Resonance Audio SDK for Web
https://resonance-audio.github.io/resonance-audio/
Apache License 2.0
200 stars 56 forks source link

Coordinate System Questions #13

Closed DarrenGuinness closed 6 years ago

DarrenGuinness commented 6 years ago

Hello, I have been going through the web sdk documentation and had a question about the coordinate system in Resonance. The documentation says that the room dimensions are 'width, height, and depth' and then provides the ability to set the source and listener positions in (x,y,z). However, I can't seem to find any reference (written or visual) to the coordinate system that Resonance is using.

From tinkering it appears to be a Right-handed coordinate system with x+ pointing to in the right direction, y+ pointing in the up direction, and z+ pointing towards the user. This would mean that x would map to moving along the width of the room, y in the height, and z in depth. Is this the case?

drewbitllama commented 6 years ago

Hi Darren,

that is correct!!

Cheers, Drew On Thu, Jun 14, 2018 at 5:08 PM DarrenG notifications@github.com wrote:

Hello, I have been going through the web sdk documentation and had a question about the coordinate system in Resonance. The documentation says that the room dimensions are 'width, height, and depth' and then provides the ability to set the source and listener positions in (x,y,z). However, I can't seem to find any reference (written or visual) to the coordinate system that Resonance is using.

From tinkering it appears to be a Right-handed coordinate system with x+ pointing to in the right direction, y+ pointing in the up direction, and z+ pointing towards the user. This would mean that x would map to moving along the width of the room, y in the height, and z in depth. Is this the case?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/resonance-audio/resonance-audio-web-sdk/issues/13, or mute the thread https://github.com/notifications/unsubscribe-auth/AGDsNoE7GHLP-9LH35-33qv9mm1bqDBGks5t8vrvgaJpZM4Uo1iL .

DarrenGuinness commented 6 years ago

Awesome thank you for clearing that up. One more minor question, when calling setListenerPosition(), does this effectively place the listener's ears at the location specified, or set the bottom of the head (with some specified height) to a location. This would mean I would need to account for this height. I am 90% sure the ears are placed at this level, but just want to confirm.

ogomez92 commented 4 years ago

Hello, to add something to this question. How does sound source spread work in the webaudio version of Resonance? I see docs for it for Unity and Unreal but nothing for the web, is this not supported? I just want to this source.sourceWidth=2 and have a sound that is spread by 2 meters instead of the default...

Thank you!