100 Days Of ML Code — Day 094

100 Days Of ML Code — Day 094

100 Days Of ML Code — Day 094

Recap from day 093

In day 093 we’ve talked about bit width, what it means in terms of binary digits. We also talked about its implications in terms of when we record sound, we’re going to take advantage of our bit width but not go beyond the binary digits that are available to us.

You can catch up using the link below 100 Days Of ML Code — Day 093 In the last two days, we talked about sampling rate, and how to determine an appropriate sampling rate to represent…medium.com

Today, we’ll address the question of how many channels we need to record sound in different scenarios to represent the location of a sound in space.

Channels and spatialization

We’re going to address the issue of channels and spatialization; essentially how many amplitude values do we need to record in each sample and time in order to set an amount to multiple ears of headphones or multiple speakers and to simulate the location of sounds in space.

As we talk about channels and spatialization, I first want to talk about two important phenomenon related to this Interaural Delay Time and Head-Related Transfer Function and then we’ll talk about how these can combine to simulate the spatialization of sound through headphones, through a process called binaural sound. And then we’ll talk about what we might need to do differently if we’re sending sound out over multiple speakers with sound diffusion.

Interaural Delay Time

First I want to talk about Interaural Delay Time and the Head-Related Transfer Function.

So let’s pretend that the image above showing your head and then we have a sound from the speaker over there. As that sound is travelling to your ears, imagine, that there’s a sound wave kind of going to your right ear, a sound wave going to your left ear.

Now, what’s important here is that the length of those two yellow lines that I drew in the image a little different from each other. It’s going to take longer for the sound to get to your right ear than to your left ear because it has to travel just a little bit further and so, there’s going to be a difference in phase between those two sound waves as they reach your two ears.

When we’re listening to sounds in the real world, we can automatically kind of process that difference in phase and use that as a cue to understand where that sound is coming from. So, that’s called interaural delay time, IDT that difference in the time delay between when sound gets to your right ear and when it gets to your left ear.

That’s all for day 094. 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.