Software Noise Cancellation?
DangerTenor asks: "As I flew around the world, lusting after my coworker's $300 BOSE Quiet Comfort Noise-cancelling headphones, I looked down at my laptop computer and noticed the built-in microphone. Has anyone written or considered writing software to run noise-cancellation based on the built-in mic?"
Delay would be too much. The noise 'cancellation' would be out of phase.
Unlike this FIRST POST. IN PHASE!
No.
Here is how noise-dampening works:
A quick overview of sound; all sounds are comprised of varying frequency, and amplitude pressure waves. A sound dampener 'listens' to a sound, and emits it 180 degrees out of phase. This means the crests and troughs of the 2 waves are overlapped, negating one another.
The main issue to be overcome is direction and such that shifts the pitch of sounds coming from a computer. Unless you are using a very high quality, wide pickup mic (which are rather expensive), you are probably not going to be able to get enough sound precision to be able to get the damper working effectively. Also, positioning the mic would take a while to get the best location for maximal damping effect for overall sound. This is still work checking out though cause it may yield greater results than I think it will. However, most computer users do not have high quality mics in the first place (and a $20 mic wont cut it). The more mics used, the more effective this would be due to wider sound coverage.
"What can a thoughtful man hope for mankind on Earth, given the experience of the past million years? Nothing." -Bokonon
Good god man. I'm a fucking English major, and the answer seems clear as fucking day to me.
Just how the FUCK is the sound going to get into the microphone, be processed, leave the speakers, and enter your ears FASTER than the noisy shit you want to cancel out?
Does the phrase "The shortest distance between two points is a straight fucking line" ring a bell? While we're out shopping for Impossible to Make Shit, let me know if you locate some "Noise Friction" gel that can be applied to one's hair, reducing the speed of sound.
I'm still fucking floored. Are you sure you weren't used as the model for the retarded boss sloth in Dilbert?
Although previous posters were correct in saying that it's impossible to have the speakers cancel sound on the fly, because the delay would cause the inverse wave to be out of sync, I could definitely see writing some software that would cancel constant or regular, repetitive sounds. My only isse is that the built-in mics are generally very low-quality.
Has anyone considered writing software to filter a computer's fan? That would be really cool, and probably pretty easy to do...some little tray program that constantly runs the inverse sound over your speakers...hmmm.
But there is another kind of evil that we must fear most... and that is the indifference of good men.
Mod me offtopic - those damn headphones are worth it.
quis fimum scribit?
NoiseBuster Headset. Spent $40 or so on these a year and half ago. Great for the server room.
m l for some software. That was a 3 second google search for "noise cancellation software". Never used it, but it seems based on the same principles. Not for live listening though.
http://www.spiritcorp.com/noise_cancellation.ht
I am, and always will be, an idiot. Karma: Coma (mostly effected by
i always just turn the volume down when i want the noise cancel. *nyack nyack*
You'd be lucky to be able to cancel the sound already coming in on those built-in mics. They pick up lots of vibrations from the computer itself.
except you'd need a really nice microphone, thus nullifying the effort saved on not buying expensive headphones. But it is possible, unlike what some other naysayers claim. I assume you want to cancel generic PC noise, not everything outside EXCEPT what you want to hear (that is almost impossible to begin without over-ear gadgetry or a fixed-head requirement... get big sweaty headphones instead).
What some other people here forget is that by-and-large, the noise created by a PC's fans are stationary signals. A second of training to the ambient noise in the room via an omnidirectional mic will allow you to build a frequency profile. Then, you filter the data against this profile to compensate for the ambience. Of course, you keep updating the profile, as noise levels in the room are constantly changing. One problem is that you have to deal with processing the sound in the frequency domain to compensate, so you have to transfer to and from the time domain in chunks. This all has to be accopmlished in realtime (it's not light on the CPU) and it will introduce a short delay, but the shorter that delay, the less effective it will be.
I think a better solution would be to place the crappy desktop mic (if you aren't using it for telephony) into the case of the PC, where it will work better. Then you could work on reducing the apparent machine noise (including 60Hz hum!)
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
i swear to god, thats the smartest thing i have ever heard,......and i watch dateline!
Communication within a circuit is at the speed of light in copper. Transistors take time to flip, but ultimately there's no reason you can't outrace the sound on its one-inch journey through your thick headphones.
...than to open your mouth and remove all doubt, eh?
You really are just another fucking English major, aren't you, asshole?
Sound is slow. Really really slow. While the previous poster wasn't quite correct about computer signals going the speed of light in copper, it's still up there in terms of magnitude. Figure that the signal going through the computer is going to be going 1,000,000 times faster than the sound and you'll be in the right neighborhood. That's plently of time to emit a signal that's exactly 180 degrees out of phase with the original sound, presumably in the human hearing range of frequencies.
There are active sound cancelling technologies in products such as the BOSE headset mentioned. And if it can be done in hardware, it can be done in software running on the following generation of hardware.
Great Ghu save us from people who think they know more than they actually do!
"It is our blasphemy which has made us great, and will sustain us, and which the gods secretly admire in us." - Zelazny
I have a really effective digital noise reduction system already attached to my body (in fact I even have three spare sets).
:-
It works like this...
Raise both hands to the side of your head, so that they're level with your ears with the palms facing inwards.
Now bend your index fingers (digits) downwards at the second joint so they're pointed towards your head.
Move your hands (and the attached index fingers) towards each other (with your head inbetween) so that the said fingers dock with your ear-holes.
Press a little harder and -- voila -- the noise is dramatically reduced.
In the event that a failure of some kind (amputation, congenital defect) leaves you without the full complement of index fingers, the middle fingers, ring fingers or even little fingers can be substituted.
Gosh -- is this a "method"? I must rush off to the patent office right away!
Okay, the reason it won't work isn't that the microphone is shitty, which it probably is. It's not that the computer isn't fast enough (which it probably is).
The problem is that the microphone is not near your ear.
In order for noise cancelling speakers to work, they need to maintain a constant and known spatial relationship with your ears relative to the sound source. The only practical way to do this is to locate them at the ear (that's how noise cancelling headphones work).
Thus unless the laptop's microphone is at the loci of both your ears, you're not going to do any better than just add to the racket.
Trees can't go dancing
So do them a big favor
Pretend dancing stinks!
If you have a Pentium IV or Athlon, you can probably use your computer to make toast too, but it's so impractical, you just wouldn't want to try. Leave it to the specialized devices.
(unrelated, but interesting) A few years ago, I read about a maker in Europe, maybe Airbus, who was developing a jet with lots of microphones and speakers, so that the entire cabin could have noise-cancellation.
Donate background CPU time to fight cancer.
because headwize has already been slashdotted by techtv this month please use these google cached links: Notes on DIY Electrostatic Headphones Troubleshooting Electrostatic Headphones
I didn't want to start spouting off signal analysis lingo. But apparently around here it gets you karma.
...all at once.
Okay, you bring up a number of interesting points.
Record some and run it through your favorite MP3 player, with a reasonably sized FFT filter going in realtime.
Not a good idea, MP3 encoding tends to filter out some of the noise...
Watch the FFT display jerk spasmodically. Even the wiggling isn't as regular as you think; if you could do an FFT of the FFT, you'd see that. It's noise, it really is, and even if it sounds to your ear like it's "the same" noise, your computer hears it as anything but.
But what ultimately matters is what that noise sounds like to the ear, and while we can't eliminate the PC noise entirely, we can compensate for an approximation so that it is all that more pleasing to the human listener. While the traces may "jump around" a lot (which an FFT of an FFT won't indicate clearly), what we want is to have a time-decayed sum of the power spectrum. This averages out (over a few frames) energy drift across bands, and emphasizes the stationary energy that is most annoying. We will probably doing this with overlapping windows, up to, lets say, 50ms long(which more than covers 60Hz hum), and window intervals at 4 times that rate (12.5 ms updating).
Noise is really, really dynamic, and you can't predict what it is going to do next.
Exactly. It doesn't autocorrelate, by definition. But then there's the stuff that does...
Oh, and there's no such thing as noise cancellation, by the way, only cancelling certain sounds at certain isolated locations. That's why you need two headphones, one dedicated to each ear, to cancel noise. A single microphone cannot cancel noise for two ears across a set of frequencies, period, especially if it doesn't know where those ears are.
Duh. I never said that my idea could lead to noise elimination, just that it could help.
Again, don't take my word for it, draw it. Draw equally-spaced concentric circles emanating from a point... blah blah blah
Look, the stuff that we're most interested falls below 200Hz, at this point the sound is fairly omnidirectional. So any intelligent compensation will not be in vain. You don't even care about preserving phase. What you're trying to do just a little compensation, allowing the fan noise to fill out frequencies you attentuate in the signal. (During the processing, you don't touch the complex components of the transformed signal, also make sure to window it the same way you windowed the microphone samples for attenuation). Also, there will be issue with expected trip delay, because you might want to be able to do a dry run and see how much contribution (if any) the sound output has on the input to the mic, and what the system delay is. You might want to purposefully filter the filtering information using a delayed copy of the previously outputed sound. And if you're doing that, you'll have to pay attention to clock phase drift between the input and output sections of whatever sound hardware you have (phase unwrapping... ooh fun).
Please try these things before trying to pick them apart; human intuition and wave phenomena are notoriously poor bedfellows.
?! I've been involved in projects recently doing things like this in relation to positional tracking using PSKs. I'm not offering a magic bullet or anything. But everyone here has such a bad attitude. Give me a break.
Now as to whether this could become a product marketable to audiophiles... forget it. As to whether it's worth someone's time to write this software because his PC is too noisy... she'd be better off buying quieter fans.
But it's interesting... not a waste of time if you dig that sort of thing. Just thinking about the response is getting me more excited about it.
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
GO TO RED ALERT. Space and Time are grinding to a halt.
Fucking idiot SHITSTAIN McGuspaz is speaking.
Fat man living off of government or with parents with no sex jerking off to pedophile porn and trolling Slashdot is speaking. WOOP WOOP.
Captain, people cant take much more of this shit. I'm giving it all shez got.
The alien Guspaz, with his corpulent fat face and fronds of flash drooping over belly into cheap assed keyboard try is coming. He farted on the left nacelle!
NO!!!!! That will massage his prostate, GUSPAZ likes anal pleasure, we must go to warp 69!
FAT SEXLESS GUSPAZ pursues the captain in a long brown skidmarking journey through space.
Fat fucking pig. Fat stupid. All Your Base Are Belong To Us was meant to be funny, its not the 11th commandment you dumb motherfucker.
FUCKING ASSHOLE ALARM.
It won't work unless you put a speaker right next to the fan, OR you can guarantee an exact distance to both ears from the fan.
See, not only is the inverse waveform important, but the PHASE as well. Shift ear position 180 degrees out of phase (at 13392 in/s, a 3000 Hz signal will be 180 out of phase by moving 2.232 inches) and the speaker will actually double the sound pressure.
That's why the noise-cancelling headphones work. They are guaranteed a distance from the sensing microphone to the ear. Also, noise-cancelling devices on machinery work because they are very close to the origination point of the noise, so the inverse waveform is nearly on top of the noise waveform.
...