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.
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?
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.
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.
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.