automatically line up and average out noise?

This section is now closed.
Forum rules
This forum is now closed.

For help with current Audacity, please post to the 2.x. board for your operating system.

Please post feedback about the current 2.x version on the 2.x.feedback board.
SunshinePatriot
Posts: 6
Joined: Wed Sep 15, 2010 11:28 pm
Operating System: Please select

automatically line up and average out noise?

Post by SunshinePatriot » Wed Sep 15, 2010 11:36 pm

I am attempting to record a particular sound effect from a game, but unfortunately, there is no option to turn off the music.

I thought that if I recorded the same effect at a bunch of different times, it would be uncorrelated, so I could average out the music. However, I can't figure out how to line up the different clips properly, so I can't do this.

Is there some script that can line up the clips and average out the music automatically?

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

Re: automatically line up and average out noise?

Post by kozikowski » Thu Sep 16, 2010 12:27 am

Not that I know of, but it's an interesting idea. You might be able to get it to work manually by inverting one of the two tracks and tune until the desired music track cancels. Then uninvert and load the next one. Slide it around until it cancels and then uninvert. Keep doing that until you get to where you need to be. Then add them all up and reduce the overall level so it doesn't overload. The bad music will be reduced by the amount you reduce the overall show.

But don't bet the farm on it. Arithmetic is working against you. You only get six dB or maybe a little less each trip and you need to come up with 50 or 60dB for an OK cancellation. That's minimum of ten passes -- each perfectly aligned.

As a fuzzy rule, you can't take a performance apart into individual instruments. You have one of the two special cases where it's not impossible, just really difficult.

Koz

SunshinePatriot
Posts: 6
Joined: Wed Sep 15, 2010 11:28 pm
Operating System: Please select

Re: automatically line up and average out noise?

Post by SunshinePatriot » Thu Sep 16, 2010 1:27 am

I tried to do it manually, but I couldn't get them lined up. The music is loud enough to mask the waveform, so I can't figure out where each one starts with enough precision.

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

Re: automatically line up and average out noise?

Post by kozikowski » Thu Sep 16, 2010 2:48 am

"Them" being two stereo tracks?

Leave number one as the "reference" track and click inside the left INFO panel of number two to select it.

Effect > Invert.

The desired music -- common to both upper and lower tracks has blue waves that are now exactly upside down with respect to each other. Everything else is a jumble.

Using the Time Shift Tool (left and right arrow) grab the bottom track and slide it back and forth carefully until the hero music vanishes on playback. That means the hero music blue waves are exactly lined up. Effect Invert and the hero music should be twice as loud as everything else.

Repeat multiple times with a succession of clips.

"Twice As Loud" means electrically twice as big, but it's not going to sound twice as loud. Your ears work a little funny that way.

You may find that exact cancellation is almost impossible to achieve, but that's what you're going to have to do to make the hero music continually boost as you add more and more clips. You should have a significant boost by the third or fourth layer and a much better idea how much of a job this is.

You can use the Mute and Solo buttons to the left to turn each track on and off as you manage it. "Solo" runs that track by itself. Mute is pretty obvious.

Koz

SunshinePatriot
Posts: 6
Joined: Wed Sep 15, 2010 11:28 pm
Operating System: Please select

Re: automatically line up and average out noise?

Post by SunshinePatriot » Thu Sep 16, 2010 1:20 pm

Like I said, it's impossible to line the tracks up manually. The waves don't look the same.

I already to do it manually, but I couldn't get it close enough to cancel out noticeably.

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

Re: automatically line up and average out noise?

Post by kozikowski » Thu Sep 16, 2010 1:43 pm

You can't view the composite blue waves for any of this because of the mixed track nature of the performance. Both tracks will look a mess.

It's possible that the sound effect you're after is different on successive passes. This can happen because even though the effect sounds the same throughout the show and probably comes from the same sound generator chipset, it has to go through the game amplifier to get to you and any distortion in the amplifier will kill you. In particular, intermodulation distortion will change the effect depending on what other sound is playing at the same time. There are other distortions, too, but that one's a biggie.

The cancellation theory only works if the sound pipeline is in perfect working order. Few GameBoys have top quality audio amplifiers.

Koz

SunshinePatriot
Posts: 6
Joined: Wed Sep 15, 2010 11:28 pm
Operating System: Please select

Re: automatically line up and average out noise?

Post by SunshinePatriot » Thu Sep 16, 2010 2:13 pm

Wow, I never even considered that there might be non linearity in the sound output. I guess this stuff is a lot harder then it seems.

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

Re: automatically line up and average out noise?

Post by kozikowski » Thu Sep 16, 2010 4:32 pm

Most of the time we just say give up and forget it, but your process should have worked given everything is perfect and you're willing to crank away at it.

Koz

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

Re: automatically line up and average out noise?

Post by steve » Thu Sep 16, 2010 5:13 pm

I agree that it's an interesting idea, and I'm also doubtful if you will be able to get it to work effectively. Perhaps if you could upload a few short samples we could give a more informed opinion of whether you have any realistic chance of success.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

SunshinePatriot
Posts: 6
Joined: Wed Sep 15, 2010 11:28 pm
Operating System: Please select

Re: automatically line up and average out noise?

Post by SunshinePatriot » Thu Sep 16, 2010 7:39 pm

I came up with a much better idea.

I recorded it once with the effect and once with only the music. That way it's easier to line up since part of it's the same. I managed to cancel out a lot of the music, but some of it is still in there.

Locked