1

I've been having trouble with this the entire time I've been working on my current game (tentatively named 'Tyche' pronounced like 'psyche'). Since I wrote the sound positioning engine, my strategy has been to apply reverb to sounds that come from behind the player. Unfortunately though I have no good way to tell whether this is effective.

What have you guys done to make this work? Is there some kind of math I can apply to this? I've heard of HRTFs but I'm not sure how to implement them.

Roar, I'm a dinosaur
Vector Map Editor (alpha)

Thumbs up

2 (edited by magurp244 2017-03-04 23:29:41)

What language and/or audio libraries are you using?

-BrushTone v1.3.0: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

Thumbs up

3

magurp244, python and pydub. Essentially it's crazy homebrew 3d audio-- none of the solutions available for Python were any good (for various reasons) so I'm making my own engine

Roar, I'm a dinosaur
Vector Map Editor (alpha)

Thumbs up

4

Check out Libaudioverse. It's in the pip repositories, and you can find the readme here:
https://www.github.com/camlorn/libaudioverse
This basically does hrtf binaural sound positioning for you and is what you probably want to use.

--
Ghorthalon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

Thumbs up

5 (edited by Dino 2017-03-05 03:00:11)

[[wow]], that library looks like it's come a long way since I last looked at it. I will probably end up using it in a future project, though since this is also a school project for me I am going to make my best attempt at finishing this engine. Mainly for the learning value but also since... if it 'pans' out (hehe puns) then having multiple options is always good. Though since the people working on libaudioverse have a better idea of what they're doing, this probably won't be quite to par.

Another reason for me to use the one I've worked on, though, is that I understand what's going on with the code base since I wrote it and understand it, and since whether libaudioverse works or doesn't work is largely out of my hands (and I have a deadline in June), right now it's better for me to use something I can fix myself. But I can be hopeful, maybe this sound engine will be useful outside of the scope of this project... lol

Roar, I'm a dinosaur
Vector Map Editor (alpha)

Thumbs up

6

OK. Two more possibilities.
If you have filters, you can add a subtle lowpass filter to filter out the highs if a sound is behind you.
This is probably as far from a good solution as you can get, but if you have the option of inverting a sound, inverting one channel will put the sound out of phase and make it seem like the sound is behind you. If you don't have the option, you can still do this manually and add it as a separate sound.

--
Ghorthalon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

Thumbs up

7

I can actually do both via pydub so I guess I have some testing to sort out. Thanks for the suggestions, I'll get back to you on what works the best.

Roar, I'm a dinosaur
Vector Map Editor (alpha)

Thumbs up