Comparing two supposedly identical tracks.

Effects, Recipes, Interfacing with other software, etc.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
KlarkKentThe3rd
Posts: 98
Joined: Fri Apr 19, 2013 6:12 pm
Operating System: Please select

Comparing two supposedly identical tracks.

Post by KlarkKentThe3rd » Mon Dec 01, 2014 1:34 am

I know there is a way to check if two audio tracks are 100% identical. However, I don't know that way.

Can anyone tell me how to do it? I have 2 supposedly identical AIFF tracks, and I want to compare them to the last bit to see if they truly are the same.

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

Re: Comparing two supposedly identical tracks.

Post by steve » Mon Dec 01, 2014 1:55 am

Import them both into Audacity. Apply the "Invert" effect to one of the tracks. Select both tracks, then from the "Tracks menu > Mix and Render".
If the tracks were identical, the result will be silence. To check that it is absolute silence, select the full (mix) track, and open the "Amplify" effect. If the Amplify effect says that the "New Peak Amplitude" is "-infinity", then the mix track is totally silent and the two imported files have identical audio.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Comparing two supposedly identical tracks.

Post by kozikowski » Mon Dec 01, 2014 1:59 am

While giving it little or no thought, I would import both of them, invert one and mix and render to a new track. If the new track is completely silent, then they're the same.

But I know that doesn't tell you about a match down to bit level and I also know it will miss a little due to the way digital audio works. I created a known, good, working matched track once that would not perfectly cancel. It also creates problems if they're bit identical but they don't start at the same time.


I also know that we're sensitive to the parts of the post that you didn't say. Like, "... see that they match so I can sue the pants off somebody in court."

Koz

KlarkKentThe3rd
Posts: 98
Joined: Fri Apr 19, 2013 6:12 pm
Operating System: Please select

Re: Comparing two supposedly identical tracks.

Post by KlarkKentThe3rd » Mon Dec 01, 2014 7:23 am

They are supposed to be literally the same file. I just want to compare them as an experiment.

Also, I cannot import both and apply an effect to one. Any effect I try is applied to both.

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

Re: Comparing two supposedly identical tracks.

Post by kozikowski » Mon Dec 01, 2014 7:42 am

Select one of them by clicking just above the Mute button.
Koz

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

Re: Comparing two supposedly identical tracks.

Post by steve » Mon Dec 01, 2014 9:35 am

kozikowski wrote:Select one of them by clicking just above the Mute button.
For a track that has one continuous piece of audio, you can also select it by double clicking on the waveform.

kozikowski wrote:But I know that doesn't tell you about a match down to bit level
It will tell you if they are identical.
kozikowski wrote:I created a known, good, working matched track once that would not perfectly cancel.
Then it was not "identical".
kozikowski wrote: It also creates problems if they're bit identical but they don't start at the same time.
Tracks always import starting at time=0.0. If the "audio" starts in different places, then the files were not "bit identical".

The method that koz describes (the same as I described) works because "adding" (mixing) a track to the "inverse" of the track, is mathematically identical to "subtracting" one from the other. Each sample value is summed with its negative, and adding a number to its negative always = 0.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

KlarkKentThe3rd
Posts: 98
Joined: Fri Apr 19, 2013 6:12 pm
Operating System: Please select

Re: Comparing two supposedly identical tracks.

Post by KlarkKentThe3rd » Mon Dec 01, 2014 10:08 pm

Again, how do I "import both"? I either get one track on top of the other, or one right after another.

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

Re: Comparing two supposedly identical tracks.

Post by steve » Mon Dec 01, 2014 10:46 pm

KlarkKentThe3rd wrote:I either get one track on top of the other
That's what you want. One above the other so that you can then invert one of them and then mix the two together.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Comparing two supposedly identical tracks.

Post by kozikowski » Tue Dec 02, 2014 4:13 am

If you have one above the other, Audacity will try to play them both at once. Pretty much what you need in this case. The volume may double if you do that and cause speaker distortion, so be careful.
Then it was not "identical".
It was the Left-Right Mono test. The two-track mono portion was done by duplication since the show was ever only a single mono recording. Vocal Removal did not take the track to flat zero.
the files were not "bit identical".
Since we don't know where the files came from, the clip could be identical within another show. That turned out to be a false assumption, but that was not a false assumption in a neighboring post.

Koz

KlarkKentThe3rd
Posts: 98
Joined: Fri Apr 19, 2013 6:12 pm
Operating System: Please select

Re: Comparing two supposedly identical tracks.

Post by KlarkKentThe3rd » Sat May 16, 2015 11:54 pm

So yes, neither of the suggestions worked, and two months later I still hope someone will tell me how to make it work.

Post Reply