Noise Cancellation

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
shoebox
Posts: 18
Joined: Sat Mar 01, 2014 2:58 pm
Operating System: Please select

Noise Cancellation

Post by shoebox » Sat Mar 01, 2014 3:06 pm

I read the active noise cancellation takes in the unwanted sound and uses opposing sound waves to cancel out that sound. Is it possible to use audacity or some other software to somehow take a known sound and simply flip it to cancel it out? I don't expect audacity to do this in real time but I thought I could maybe make a clip and simply play it to cancel out the noise.

Thank you

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Noise Cancellation

Post by steve » Sat Mar 01, 2014 3:17 pm

It is theoretically possible to cancel out noise to some extent, provided that you have recordings with and without the sound that you want to keep. The "noise" in each recording must be as close to "identical" as possible, otherwise the cancellation will not work. Just "sounding the same is not close enough, the waveforms must be very near identical.

"Flipping" is done with the "Invert" effect (Effect menu).
"Adding" the sounds together is done with "Tracks menu > Mix and Render".
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

shoebox
Posts: 18
Joined: Sat Mar 01, 2014 2:58 pm
Operating System: Please select

Re: Noise Cancellation

Post by shoebox » Sat Mar 01, 2014 3:28 pm

http://www.freesound.org/people/Biblica ... ds/196139/

I have an issue with car horns bopping. I tried inverting the sound wave. I was hoping it would be not audible to me. It sounds pretty much the same by inverting it.

Any other suggestions? Thank you for the prompt response.

I don't understand the other step "adding the sounds".

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Noise Cancellation

Post by steve » Sat Mar 01, 2014 3:35 pm

To see "cancellation" working, try the following steps:
1) Record or import a sound.
2) While the sound is selected (highlighted), press Ctrl+D to duplicate the track.
3) Double click on the duplicate track to select it, then from the Effect menu select "Invert".
4) Press the play button.
You should hear (or "not hear") silence.

Press the mute or solo button on one of the tracks. You will now hear just one of the tracks (not "cancelled").

Zooming in really close you can see how the duplicate is the "inverse" (equal and opposite) of the original track.
tracks001.png
tracks001.png (16.71 KiB) Viewed 2353 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

kozikowski
Forum Staff
Posts: 69374
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Noise Cancellation

Post by kozikowski » Sat Mar 01, 2014 3:58 pm

Sounds are mechanical vibrations (usually) in the air. They produce tiny, quick high and low air pressures that the ear knows how to hear. This leads to the Hollywood dilemma of presenting a dramatic scene in space. No air and no sound. No sound and no music. No music and most theatrical scenes fall over and die.

If you just invert the sound, the pressures can go from high, low, high, low; to low, high, low, high. The little pressure changes just change places. Pretty much indistinguishable. However, if you add them to each other, the lows and highs cancel out, leaving no vibration and no sound. The same thing happens inside Audacity with the up and down blue waves

You always need two of something to get cancellation. Unfortunately, straight inversion inverts everything, the car horn and the show. The problem with almost all noise removal is trying to "know" what's noise and what's show. This is what usually kills you. That's why one good, reliable way to destroy a show is to leave the TV on in the next room. The sound of the TV announcer is indistinguishable from the actor. If the software can't tell which is the commercial for laundry soap and which is the actor in the scene, then they're both actors in the scene.

Software Intelligence is another thing you have to worry about. Software doesn't "know" anything. All it has is a collection of blue waves on the timeline. The difference between a basso profondo opera performance and a truck/lorry air horn is happening inside your head. It's the same blue waves. It would be like inspecting the ripples by the side of a lake to decide which were made by a pickerel and which were made by a carp.

Hard to program that, although it's not impossible. But it's certainly not cheap.

Koz

shoebox
Posts: 18
Joined: Sat Mar 01, 2014 2:58 pm
Operating System: Please select

Re: Noise Cancellation

Post by shoebox » Sat Mar 01, 2014 4:16 pm

Very interesting! I am trying to cancel car horns from the outside, not in a recording. I was able to achieve silence, or at least a great deal of quiet when both opposing sound waves were played at the same time (in audacity). Forgive me if this is a dumb question, but could I record the unwanted sound and the inverted sound at the same time, and then play it back through the stereo to cancel car horns from the outside?

Or would it just be the inverted sound that I would play through stereo to cancel car horn from the outside? If so, do you think that to acheive this objective of silence I could have two stereos. One stereo playing the unwanted car horn. Then another stereo playing the inverted sound. Then when a car horn were to bop from outside could possible be cancelled.

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Noise Cancellation

Post by steve » Sat Mar 01, 2014 6:21 pm

shoebox wrote:could I record the unwanted sound and the inverted sound at the same time
In practice, probably not.

If you have two microphones that are specially designed (or adapted) to pick up minimal sound from the back, then you could tape them together facing opposite directions, on facing your mouth (assuming that we are recording vocals) and the other facing away, then you may be able to achieve some degree of cancellation (the two microphones will already be "inverted" relative to each other).

Just using a "similar" sound will not work at all.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

kozikowski
Forum Staff
Posts: 69374
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Noise Cancellation

Post by kozikowski » Sat Mar 01, 2014 9:23 pm

There is a very old trick that Electro-Voice used to use to demonstrate the superior quality of their microphones -- specifically that they all matched.

Take two ordinary 635A, omnidirectional microphones...

http://www.electrovoice.com/product.php?id=100

...and tape them together so their heads touched and their connectors touched. Now make up a special "Y" microphone cable with two female and one male, except you reverse one of the females (pins 3 and 2 reversed).

These microphones would pick up practically zero sound because of their close manufacturing tolerances, they were close to each other and that they were wired out of phase. You could walk into the world's most insanely bad recording environment and by simply speaking very close to and directly over one of the two microphones, walk out with a useable show. Nobody would mistake that for a studio performance, but everybody else on that shoot would have walked away with audio garbage.

Cancellation does work, but it has to be surgically planned, not just set two mics out and hope for the best.

Koz

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: Noise Cancellation

Post by Robert J. H. » Sun Mar 02, 2014 2:52 am

I do in fact use your suggested trick quite a lot.
I have a Rode NT4 Stereo mic. The capsules are arranged at 90 degrees, one above the other.
It is very sensitive and can pick up the wall clock's ticking in the kitchen.
The advantage of the stereo recording is that I can isolate the center - my guitar for example and all else that came in from the sides is practically removed.
You can do it with two mics as well, one in your direction and the other e.g. towards the window.
In this case, you would remove the center and keep either the left or right channel.
There's been a topic "Recordings in the wilderness" or so, where I've demonstrated some of these tricks.

Trebor
Posts: 9954
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: Noise Cancellation

Post by Trebor » Mon Mar 03, 2014 9:45 am

shoebox wrote:http://www.freesound.org/people/Biblica ... ds/196139/
I have an issue with car horns bopping. I tried inverting the sound wave. I was hoping it would be not audible to me. It sounds pretty much the same by inverting it.
Any other suggestions?
That freesound is dual-mono , not stereo*, so the noise reduction techniques which rely on stereo won't work.
You could use Audacity's envelope-tool to manually attenuate the horn noise without losing sync with the video.

Image

Or replace [overdub] the horn with a patch of faint background noise from nearby on the soundtrack.


[ * the camera must be a type which has two microphones for a stereo recording ]

Post Reply