# Estimating the direction of the sound

4 views (last 30 days)
Chris on 4 Jul 2022
Commented: Jonas on 6 Jul 2022
Hello
I have same wav files that i want to estimate roughly their direction.
Like read the wav files and due to the amplitude of each ear to estimate the direction that the sound in coming from exmp:(30 degrees,-30 degrees).
i want to import each binaural impulse response and roughly check what angle was the microphone positioned at and chech that the filename that i have given (angle) is correct in terms of the labelling.
if you guys have any related links or any ideas of how to implement let me know
Jonas on 6 Jul 2022
using level for estimation is more difficult, since the damping caused by the head is frequency dependent. Also the damping of air is frequency dependent, which adds up to the normal 1/r law. This all becomes more difficult when not beeing in the free field, when reflections are present. Thatsw why i guess using the ITD (interaural time difference) would be easier to start.
i want to import each binaural impulse response and roughly check what angle was the microphone positioned at and chech that the filename that i have given (angle) is correct in terms of the labelling.

Image Analyst on 4 Jul 2022
I believe I made a demo for this in response to a similar question years ago. See attached demo.
% Uses fitnlm() to fit a non-linear model to determine likely location of an explosion.
% Here is the "polygon" - the place where artillery men perform their training. Let it have square form of 10x10 kilometres.
% Several seismic sensors are planted at the different points of this place. We know their coordinates exactly (they have built-in GPS).
% With this sensors it is possible to register the timestamp of all shell explosions occuring at the polygon.
% Since there is usually some distance between explosion point (let call it ground zero) and each of sensors, the timestamp registered by them is slighthly behind the time of the explosion itself. We assume that the "shake" of the ground travels (or propagates) with the constant (but unknown) speed through the soil.
% For example if the seismic wave made by the shell occured at 12:00:00.000 time and the speed of propagation is 1000 m/s then the sensor at 2.5km distance will register it at 12:00:02.500.
% The task is to determine the locations and times of explosions by the records from seismic sensors.
% Requires the Statistics and Machine Learning Toolbox, which is where fitnlm() is contained.
##### 2 CommentsShowHide 1 older comment
Image Analyst on 5 Jul 2022
If you had two channels in your wave file and you knew they were recorded by microphones separated by a known distance, and the sounds all emanated from a single point source then you could use triangulation to get the location of the point. I don't have the formula on the top of my head but knowing the attenuation of the sound with distance it's just geometry and algebra I think.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by