Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is this how noise-cancelling headphones work?


Everyone is getting really excited because they think this is how it works, but no, not exactly.

The shutter sound comes from the same speaker as the anti-shutter sound. The phone is mixing the tracks together and playing nothing.

It's not like both sounds are played and they neutralize each other as sound waves.


It's the same process that would happen if you actually played both sounds. The superposition is just happening in software instead of air.


Inverted sound waves can cancel each other in air, I've heard (or not heard) the effect with my own ears.


Right, but for any point source this is effect is going to vary spatially. That's why you can't make one speaker totally cancel out another speaker over a whole room.


Sure, but my point is that there is only one speaker involved so the cancellation happens in the electronics, before any sound is made.


It's interesting to think of 'cancellation' in different mediums. Waves in physical space. Radio in electromagnetism. And now 'computed' waves cancel each other too.


Since it would have more general applicability, I am curious how effective could the noise-cancelling-like method could be? What would be the constraints on its effectiveness?


Yes. They have a microphone and a circuit that inverts that input and mixes it into the recording.


That's not really what happens in noise-cancelling headphones. The transforms required are fairly complex, simple mixing is a long way from what is required to achieve good results.


Thanks for the info, I didn’t realise the tech was mor advanced than my understanding of it.


The transforms aren't complex... They're inverted. What's complex is getting the timing right (can only occur at a fixed distance from the ear so they can delay the generated canceling waves appropriately).

It's just wave addition. -1 + 1, occurring at the same time, is 0.


> The transforms aren't complex... They're inverted.

Again, It's not that simple. Most ANC headphones use a digital feed-forward control system using a variant of the LMS algorithm to provide coefficients to an adaptive FIR filter(s). Generally you also have to apply additional filters to model the loudspeaker / system response. Better systems will use a hybrid analog/digital approach, either way, there is a lot more to it than 'invert the mic signal and add'.

The reason that ANC headphones didn't really exist until recently is that sufficiently high performance yet low power DSPs were needed to perform the necessary computations.


Thanks for the correction. I assume that the simple

  v(t) + -1*v(t) = 0
approach is unworkable because you can't generate the canceling signal (-1 * v(t)) fast enough? By the time you have received it, amplified it, and played it back, it's too late? So you need a predictive approach.


It's more that sound waves aren't simple 1D sine waves varying over time. Sound is a 3D pressure field varying over time. A single microphone on the outside of the can doesn't give you a full picture of what noise is entering the inside of the headphone. The nature of the noise, the headphone fit on the user's head, even the shape of the user's ears can all influence what the noise field looks like inside the headphones. ANC headphones use 1-3 microphones on the outside and 1 or more microphones inside the can. The DSP makes a guess as to what it should do based on the signal from the outside microphones, then has to make corrections based on what the internal microphones hear, all of this while filtering out your music signal (which the microphones also pick up) so it knows what is noise and what isn't. This is why the system can't be instantaneous, the overall system response is time varying, so the correction filters have to be adaptive. It's also why they do a really good job at blocking continuous noise that they can zero in on an ideal correction for over time, e.g. aircraft cabin noise, but don't do a great job with 'spiky' sounds, like speech.


Thanks. I have an EE background, but I'm not familiar with the design considerations around these systems.


Not sure, but it's how a lot of karaoke tracks are made.


And if an artist releases instrumental or a capella versions of their track, you can usually use this to get the other. Only works if they're exactly the same as the original of course.


Another trick is to invert one of the stereo channels and add it to the other one: this eliminates everything that was mixed in with neutral pan. That's typically where the voice is. It will also remove e.g the drum kick, but this can be salvaged with a low-pass filter. Note that you end up with a mono track.


While on the subject of these tricks -- disconnect the ground from the audio out, and tie the speaker grounds together. This causes the speakers to use each other as ground, which in effect causes the middle voice to cancel out.


I used that trick to get a cheap rear channel from my thrift store stereo back in my high school days.


That's really interesting. I never knew how they did that. Canceling out the frequencies of the voice makes complete sense.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: