100 Days Of ML Code — Day 096

100 Days Of ML Code — Day 096

100 Days Of ML Code — Day 096

Recap from day 095

In day 095 we talked about HRTF (head-related transfer function) and closed with what binaural sound essentially is.

You can catch up using the link below. 100 Days Of ML Code — Day 095 //medium.com

Today, we’ll look deeper into binaural sound.

Binaural Sound

A binaural sound is essentially spatialized sound designed explicitly to be heard over headphones. There are two different ways that we can we can create binaural sound. One is that we can use a special microphone called a binaural microphone. Below is a picture of one.


The microphone as seen above essentially looks like a pretend human head with pretend ears sticking on the side and then what actually happens is there is a little microphone embedded inside of that pretend ear, and so we can put the microphone in a place when we’re recording and that’s going to mimic the inner aural delay time because those microphones are placed apart from each other somewhat according to the placement of our ears in our heads and also, the material that it’s made out of is going to mimic that head-related transfer function of the sound passing through our heads and our ears.

Say we play back the sound over headphones and we send what was recorded in the left ear to our left ear same as was recorded in the right ear to our right ear we’d get a very good sense of how the sounds were in space at the time that we were recording and what was in front of us, to our left and right, behind us and so on and so forth.

The other thing that we can do of course is we can try to simulate those effects digitally through applying artificially the phase difference in the interval delay time and some filtering, changing the frequency response to mimic that head-related transfer function to simulate sound coming from a particular location of space.

Binaural sound is great if you’re listening over headphones but it doesn’t work so well if we’re listening over speakers because when we’re listening over speakers If we have, say stereo speakers we don’t have the luxury of having only the left channel go to our left ear and only the right channel going to our right ear.

We don’t get that isolation. They’re both going to go to both of our ears so we can’t really simulate the interaural delay time or head-transfer function so well over speakers, where both channels are going to both ears.

So if we can get some limited sense of spatialization with stereo left and right but if we want to get more serious, we need to get more speakers involved and you all have probably heard of a 5.1, Surround Sound, for instance. That’s the basic idea that we have.

We have in the front, we would have a left, centre and right, and then in the back, we’d have a left and a right, that’s how we get our five channels of sound. This is what is used in movie theatres, that’s what’s used in home theatre systems as well most of the time to try to give a basic sense of sound moving through space.

If we have those five channels, we can do that. We can obviously have more channels, too. it’s fairly common especially in kind of the academic world of computer music to have eight or ten or even more channels of surround where there are more and more speakers around the space to be able to simulate space a little bit more precisely. And when we do this we have special software that can usually help us to figure out how much of each sound we want to send to each speaker.

That’s all for day 096. I hope you found this informative. Thank you for taking time out of your schedule and allowing me to be your guide on this journey. And until next time, be legendary.