Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add playWithinDistance 3d audio #11

Closed
Slluxx opened this issue Mar 12, 2020 · 7 comments
Closed

add playWithinDistance 3d audio #11

Slluxx opened this issue Mar 12, 2020 · 7 comments
Assignees

Comments

@Slluxx
Copy link

Slluxx commented Mar 12, 2020

https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics

@plunkettscott
Copy link
Owner

It's been a plan of mine, just no time to do it. There's a whole new version of this written in TypeScript that I have not gotten the time to finish. It does have the goal of spatial audio.

@Slluxx
Copy link
Author

Slluxx commented Mar 13, 2020

wow, i was already about to do it myself but thats really nice to hear.
how is it implemented? i came up with calculating the degree of the sound by triangluating the local position and the source position with the heading of the listener. though i didnt really think about that i need to calculate the actual camera position, not the peds heading.

based on that degree i could pan the sound to the left or right ear which was an ok simulation but unusable as i calculated the wrong things (did it just yesterday).

Oh yeah btw: i guess that also includes audio fading based on distance to the source?
that would mean you can close my other ticket

@plunkettscott
Copy link
Owner

Correct, it uses the Howler spatial audio library which handles panning and fading just by providing it the necessary headings, direction, and sound source coordinates. I'll close the other. I'd be happy to accept some help on this if you're interested in working on it.

@Slluxx
Copy link
Author

Slluxx commented Mar 16, 2020

due to my limited time because of other projects and work i am unable to really help with this. But i'd really like to use your resource as dependency for mine and get the best out of both.

i know its unfair to ask for an ETA but do you have some time to work on it in general or is it "on ice" ?

@plunkettscott
Copy link
Owner

Currently on hold for the moment. I'd like to pick it up again in the near future once I get some of my other income-providing projects released.

@CarlosVergikosk
Copy link

please, it would be awesome man! keep up !

@plunkettscott
Copy link
Owner

Just an update here, SoundFX, the successor to Interact Sound is in the works. This release will include spatial audio to blend in better with the 3D world and will come with some much-needed API improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants