Viewing a single comment thread. View all comments

frzx1 t1_j2di665 wrote

Okay. Imagine a sound. A simple 'ting' from your phone. Sound travels in waves, you do know what waves look like, right? They're like recurring crests and troughs; up and down respectively. So, for the sake of this example, let's assume that the wave the sound 'ting' makes is one crest and one trough. One up and one down. What noise cancelling earphones do is create the opposite waves of that sound that just entered into them from your environment; which is 'ting' in this case. The earphones will recognize that the wave signature of this sound is one crest and one trough, so what it will do is create one trough and one crest (in that exact order), which are opposites of the 'ting' sound. Then it's going to place this newly created sound over the one that's coming from your phone. When you superimpose both of them together, you get a resultant zero and like that, you end up with noise cancellation.

​

Edit: This explanation may seem a little vague, or I should say 'impractical'. If you're free, have some time, do watch this video to truly see this happening in real time.

109

GanondalfTheWhite t1_j2dipov wrote

I'm always amazed that it's able to respond so quickly. I'd think the processing time required would introduce more offset than it does.

50

Implausibilibuddy t1_j2dk2br wrote

It is quick but not instant which is why active noise cancellation works well on low frequencies and not too well for higher.

Low frequency sounds have a wider wavelength (and thus occur over a longer period of time). You can have a little latency between the live and generated sounds and they will still mostly overlap and cancel out. For high frequency sounds there could be several peaks and troughs in the offset gap and they're less likely to line up with the generated sound.

39

IShouldBeHikingNow t1_j2ewg8x wrote

Which is why they're great an cancelling out the low hum of the airplane but not the shrieking banshee child two seats over?

19

hgrunt t1_j2ftc1s wrote

It doesn't help that we're particularly sensitive to crying/screaming because it's a sign of distress

3

frzx1 t1_j2djr04 wrote

There's a lot that goes into noise cancelling, they are not always doing everything in real time. There are specially designed and fully dedicated chips on the sound devices that do just one thing, noise cancelling. They recognize certain sounds and apply the noise cancelling beforehand, thus eliminating that time window. They've been trained on millions of hours of noise and have gotten really good at what they do. Power of data, indeed.

27

angermouse t1_j2ewgfw wrote

I didn't know noise canceling relied on machine learning. It doesn't need to and the older ones likely did not.

3

angermouse t1_j2dw1jh wrote

It takes advantage of the fact that light and electrical fields travel about a million times faster than sound (300 million m/s versus 300 m/s). If you think about it, sound is extremely slow. Hearing echoes is a common occurrence and animals like bats even use it for navigation.

12

noopenusernames t1_j2edsft wrote

It doesn’t have to be perfect to still be effective. Let’s say you have a sound coming in at 150 dB, which is definitely not hearing safe, and the headphones have a delay so they can’t perfectly match up the anti-wave directly over the incoming wave - as long as the anti-wave moves the crests and troughs in the right direction, you create this new wave that’s mostly cancelled out, but you might get some, like 5 or 8 or 3 dB through, which is much safer

4

The_quest_for_wisdom t1_j2e3wkw wrote

We assume the speed of sound is much faster than it is. Locally it seems almost instantaneous, when it is not.

If you have a large bell like the kind used in a church steeple you can see this disconnect with your own eyes.

If you get more than about an eighth of a mile away you will see the ringing bell move quite a bit out of sync from the sound of the bell ringing that you hear.

It gets even wielder when you consider that the image of the bell being rung is also arriving in your eye AFTER the bell is actually being rung, due to the speed of light. It's just a much shorter delay.

It might be tempting to just hand wave that away and say that the light travels effectively instantaneously, but that thinking with sound is exactly how we ended up here in the first place.

3

GanondalfTheWhite t1_j2elevv wrote

> thinking with sound is exactly how we ended up here

While everything you said is true, the speed of sound, which, yes, is much slower than light, is still pretty damn fast when we're talking about how much time there is to process something in the time between a soundwave passing from one side of your earbud to the other. Right? Cuz that's what we're talking about. Not how long the sound of something vs. the light of something takes to hit your brain.

Ultimately what we're talking about is that the earbud needs to be able to detect the soundwave, compute its opposite waveform, and emit the counter wave all in the same time that it takes for the soundwave to pass the earbud so that the original wave and the counterwave hit the eardrum at the same time. Right?

So if we assume the earbud is maybe half an inch thick, means it has to do all of that in about 1/27,000th of a second. 0.04 milliseconds.

Even knowing how fast sound travels, that ability to process seems unintuitively quick. That's all I'm saying, it's unintuitive and pretty darn cool.

4

IsardIceheart t1_j2eb5hh wrote

I'm pretty sure they use pure hardware, no software to do it, because software is too slow.

(This information may be out of date, but this was true not that long ago)

1

frzx1 t1_j2edyaa wrote

Hardware alone cannot do a lot of stuff that we see today, the true power lies in silicon, and consequently the computation it does. Also, software is far from being 'too slow', I'd even go ahead and say that software at present is far more quicker than hardware.

−3

f4f4f4f4f4f4f4f4 t1_j2ekf2k wrote

Hardware meaning integrated circuits, which are made from silicon...

2

IsardIceheart t1_j2epxzg wrote

Lmao, yeah this guy is dense.

Also... software is never faster than the hardware it runs on, by definition.

3

frzx1 t1_j2eknuz wrote

What do you think I'm talking about? CRT monitors?

−2

IsardIceheart t1_j2eg99f wrote

Yeah, okay buddy.

I did some research and it looks like active noise canceling is still done with purely hardware, because software cannot process the sound fast enough.

By purely hardware I mean it is an analog system, not digital.

1

wbsgrepit t1_j2fc7vq wrote

This is kind of true and kind of false, Software speed is limited by the hardware it runs on — there is certainly software that is fast enough to do this work very well (given the right hardware to run on), however, given the constraints of many noise canceling headphones it is currently much more cost effective to bake that logic into chips especially designed for this work vs using a much more expensive general purpose cpu etc.

3

IsardIceheart t1_j2fjr4l wrote

Yeah, I guess the point is that general processing is unsuitable for the work, rather than incapable.

0

JesusLuvsMeYdontU t1_j2dnzjo wrote

So ting comes in and my headphones tang out?

2

AtomicRobots t1_j2fv8y2 wrote

The scientific term for the opposite of “ting” is “gnit”. Ting + gnit = the hollow emptiness of my life these past few months. I need more Ting and less Gnit

1

chipdipmcgillicuddy t1_j2dj34b wrote

I’ve never used noise cancelling headphones…my question is, do they have a slight white noise to them at all times? That can’t be good for your ears if they do.

−2

frzx1 t1_j2djei4 wrote

In my opinion, bad noise cancelling is worse than no noise cancelling at all. Yes, when the noise cancelling isn't that good and responsive, there are moments of noticeable white noise. But with time, brands have gotten really good at noise cancelling and the manufacturers claiming to have noise cancelling in them do their job well.

8

chipdipmcgillicuddy t1_j2dksvz wrote

So say you have some good ones, when the headphones hear a noise and play the inverse to cancel it, can you hear that at all? Also, is there a delay? If there was a gunshot far enough away where the headphones could manage to cover the volume of the shot, would it be able to cancel it out in real time? I just don’t understand how sound can be cancelled without some sort of other sound that plays to replace/mask it, in which case it’s not cancelling it just lessening it.

1

frzx1 t1_j2dlnsp wrote

No, you can not hear it, and that's because it's not being played into your ear, it's being laid on top of the sound that's coming into the audio device. There is no significant delay in it because there are fast dedicated chips in the sound devices that do a lot of computational work when it comes to sound waves. So, they're not always doing this in real time, sometimes they're predicting the sound before it's even completely addressed by the device. If there was a gunshot, far away, yes, it would mask it to a certain degree. That degree is what makes noise cancelling good or bad. There's a lot of other stuff that's done to facilitate the sound cancelling, one of them being plugging the ear completely so that no sound wave enter into the ear directly; no ear cavity is left unsealed. Watch THIS video and you'll be amazed to see how apparent this entire process is.

6

chipdipmcgillicuddy t1_j2dn3k0 wrote

I thought about it for a few minutes longer and realized this can work because your wearing something right next to your eardrum. Before I was thinking how could sound be cancelled, if I yell at a concert when the band is playing my yell is still there but it’s drowned out, but I guess because the headphones are right next to your ears that must be a big part of why it works.

1

Techial t1_j2drnu0 wrote

Well, sort of. You also have massive "noise-cancellation" systems built on the same principle when big artists perform live concerts. They literally have subwoofers between the stage and the actual sound-producing subwoofers pointing out to the crowd, and these noise cancelling subwoofers play the same bass sounds (albeit a bit delayed to account for travel) but polarity switched. Imagine sound as a wave going up and down, now if you play the exact same wave but flipped, the waves will cancel out eachother.

2

nipsen t1_j2dn1d3 wrote

It's a little bit less magical than what people are suggesting here.. You don't actually hear as well, so to speak, as a microphone. So there's enough time to invert the soundwave and play it back before you start picking up the vibrations that produce sound you hear.

Alternative way to think about it - you delay the incoming sound slightly and then play it back as perfectly out of sync as you can. The question really is the response, and how quickly you can generate the wave accurately.

The trick is that you should be producing a sound-wave that sounds like what is actually heard behind the clogs, for example. And you really don't want to play back a really, really loud sound, or increase the wave too quickly based on some extrapolation, etc. And it's typically not perfect, so you get noise. You can also mask it all and increase response, so to speak by having a noise-floor.

But yeah, if you play back some fairly low volume sound where the noise is not physically noticeable, and you allow for some noise on the bottom here -- an exactly out of sync wave is going to cancel the sound out, in the sense that your ear is not going to vibrate and make you hear sound.

2

WickyNilliams t1_j2dlt8r wrote

I imagine a naive solution would be to add a gate to only cancel noises over a certain db threshold. Also you'd apply some digital signal processing to smooth incoming signal, something like a rolling average or low pass filter to avoid sudden spikes

In my experience the best case for noise cancellation is when there's a constant low level hum eg traffic or airplanes. It works wonders then. I was hesitant about getting a pair but they have been great for me (Sony WF-1000XM4)

3