Simulate sound in 3d space?

1bytecharhaterxxx

New member
Joined
Jan 17, 2021
Messages
8
Hi i don't know where to ask and the other time a guy helped me with another question so i try here again :D.
The problem i'm facing is that i want to simulate how ears perceive sounds in 3d space trought 2 channels(headphones):
What i've done so far:
imagine we have 3 vectors in 3d space one representing my center head,one my right ear and one the center of the sound source(you can think about the sound as a sphere or a circle projected);
1- first of all i calculated the distance from the head to the sound and i simply proportionally decreased and increased the volume of each channel based on that;
2- then i took my head and right points made them 2d,subtracted to the sound source(also made 2d),normalized the 2 points and from the triangle i got the alpha (with origin in the sound source) to get the angle of the ears: with that i can proportionally decreased and increase volume on each channel based on my orientation;
3-here i'm lost: in my mind i need to simulate up/down front/back sound but i didn't find any clear documentation about the argument,and i don't know if it's even possible to do such a thing properly but if for example i play a 3d game i feel like i can understand if a sound is behind me or in front,is this just an human hack or can be mathematically computed?
 
I think there's a lot more physics than you are taking into account. Also, it seems obvious to me that we would not be able to fully localize a sound based only on two sensors (though my understanding is that the shape of the outer ear helps in distinguishing directions that would otherwise sound identical).

I suggest you search for "sound localization" to learn more about it. Here is one article that looks interesting: https://physicstoday.scitation.org/doi/pdf/10.1063/1.882727
 
yes well absolutely there is a lot more,but my aim is just to approximate the real behaviour of the ear,i would just like to understand the direction of the sound from the headphones nothing more :D,i will go deeply on this then thank you anyway
 
yes well absolutely there is a lot more,but my aim is just to approximate the real behaviour of the ear,i would just like to understand the direction of the sound from the headphones nothing more :D,i will go deeply on this then thank you anyway
My point was that your simple model taking the ears as points that detect only amplitude is insufficient to distinguish front from back or up from down. You would have to take other things into account. To approximate real behavior of ears, you have to approximate real ears.

And, again, my real ears aren't very good at telling front from back. I hear sounds in the wrong direction all the time! Your model won't do any better.
 
My point was that your simple model taking the ears as points that detect only amplitude is insufficient to distinguish front from back or up from down. You would have to take other things into account. To approximate real behavior of ears, you have to approximate real ears.

And, again, my real ears aren't very good at telling front from back. I hear sounds in the wrong direction all the time! Your model won't do any better.

well you're right,i can't think of a simple way,creating a model 3d taking into account timing frequency amplitude plus tons of effects i think it's too much for me,but i won't give up... tomorrow i start to study :D good night
 
Top