Community Forums Archive

Go Back

Subject:Comparing tracks ripped from CD
Posted by: msterlin
Date:1/23/2004 3:19:18 PM

I sometimes rip a track twice, invert one, and paste-mix into the other to see if the rips are identical and 99.99% of the time they are. The result is an empty waveform and statistics shows all zeros as I would expect.

However, occasionally the statistics show a single sample value is different (with a value of 1 or -1). Ripping a 3rd, 4th, etc time does not change this - comparing rip 1 to 2, 2 to 3, and 1 to 3 will always show the same results.
How can this be?

Subject:RE: Comparing tracks ripped from CD
Reply by: Rednroll
Date:1/23/2004 4:03:01 PM

It's probably due to the "error correction" that your CDrom is doing during the extraction. If there is a slight scratch on the CD, the Cdrom will attempt to do error correction, to correct the error. This is it checks the error bits, and sees that the audio data is incorrect and then fixes it to what it should be. If there is a larger scratch on the CD, then the CDrom will have to do "error concealment". That is, it looks at the previous samples and post samples and takes a good guess at what the data "probably" was. All these errors could be due to different sources, like the Cdrom reading the data too fast, or having a difficult time with that particular color of CD surface material and just plain ole dirt,smudges, scratches on the CD. Within Sound Forge extraction menu go into the "configure" menu. Pull the slider all the way to the left, so that the most read retries, and optimal error correction is done. Also, reduce the read speed to minimum. This will ensure you will get the closest possible digital extraction and maximize the error correction done. This will greatly increase the extraction rate, but highly increase the extraction integrity. BTW, one sample is not bad at all.

Subject:RE: Comparing tracks ripped from CD
Reply by: msterlin
Date:1/23/2004 5:01:35 PM

Hi Red,
I was under the impression that error correction and error concealment are only done by the drive on playback and that that is why extraction programs such as Exact Audio Copy will re-read sectors and pick the read that matches the most other reads as the 'correct' read. Based on what you said, I assume setting the extract optimization tells SF to do just that. I didn't know that but it seems backwards to me that NONE means do optimal error correction and FULL means do no error correction. Regardless, I tried it and the results are always the same - sample value of 1 at 1:54:322. This is with multiple rips, some with extract optimization at full and some with extract optimization at none and comparing every rip to every other.

The CD looks clean (wiped it with micro-fiber cleaning cloth anyway) and rip at 4x which i've found is the best speed, especially when a cd has alot of tracks. There are never any problems ripping the outer tracks at that speed whereas ripping faster sometimes has a problem with the outer tracks. Ironically one CD i have that had a visible huge scratch rips fine (ie no audible clicks) at 40X but the click is preserved perfectly when ripping slowly at 4x. I guess that's why DAE really is difficult - so many factors that can affect the result.

Anyway, like you said it's only 1 sample and that's pretty good. It sounds just fine and I'm not going to worry about it. Thanks for the info.

Subject:RE: Comparing tracks ripped from CD
Reply by: Rednroll
Date:1/23/2004 5:41:05 PM

Sounds interesting. The CD that you find this on, is it a CDR or a comercial released and pressed CD? I'm fishing, but I know a lot of CDR's will vary from brand to brand for the amount of error's that get written to the CD in the burn process. The duplication houses that I dealt with always said Mitsumi was one of the best brands for the least amount of errors. They have the tools to show the amount of error correction that must be done on a particular CD.

Subject:RE: Comparing tracks ripped from CD
Reply by: msterlin
Date:1/23/2004 6:39:21 PM

The CD that i ripped today that showed this behavior was Asia - Then & Now, Track 6 - "Days Like These" which is a commercial CD released in 1990. I am not convinced that each rip is actually different because there is no way that 4 rips can each be different from one another by a sample value of 1.

This is my logic: If the sample in question were 100 on rip 1, 101 on rip 2, 99 on rip 3 then sure rip 2 and rip 3 are different from rip 1 by the shown value of 1, but if rip 4 also shows a difference of 1 from rip 2 and rip 3, then its value must have been 100 which would have canceled exactly with rip 1 (but comparing those two also shows the difference of 1). Further, using these example values, when comparing rips 2 and 3 there should be a difference of 2, but again it shows a difference of 1.

See why i am confused? I would think the invert/flip operation is trivial with no chance of doing it incorrectly, but what about the mix? Is it possible that this is simply a rounding error of some sort when two sample values are combined? I know what you are saying about differences in media quality, but it defies reasoning (to me at least) that N rips could all differ by 1. And by the way, they all sound just fine; I'm just a perfectionist trying to find a reason.


Subject:RE: Comparing tracks ripped from CD
Reply by: msterlin
Date:1/23/2004 7:09:22 PM

Hey Red, I think it just may have to do with the invert + mixing. Here's what i was thinking: 16-bit signed integers range from -32768 to +32767. Let's say the sample in question had a value of +32767 (0db FS), after inverting I think it would be -32768, right? So when mixing, -32768+32767=-1. (sometimes i do see -1 although in the case of the Asia cd it was +1).

Thinking back to your suggestion to use the simple synthesis to generate a square wave to determine the number of samples for clipping, I thought that may be appropriate here too. So, I generate 2 1 second, 60 Hz square waves at 0dB, invert one and paste mix into the other...and guess what - the same results i am seeing with cd rips. A single sample value at 00.008 with a value of -1! (why .008?) So is this a bug with the mixing or just the way it is? I don't really know how mixing is done, but it seems logical that for this case, it would simply be an addition of the two values.

Subject:RE: Comparing tracks ripped from CD
Reply by: farss
Date:1/24/2004 4:00:01 AM

Red,
don't know if this is a dumb question or not but why are the tools to show the numbers of errors on a CD so hard to come by.
Is it because the error correction is done in the drive and hence is hidden from the outside world in which case I'd need a special drive to measure it?

Subject:RE: Comparing tracks ripped from CD
Reply by: Rednroll
Date:1/24/2004 12:35:25 PM

msterling,
I think you got it pinned down. I was just thinking about a possibility of a math round off error. The math for this is simple. You take all the samples in waveform A and subtract them from waveform B. So if a maximum sample like you say on the positive side is +32767 (0db FS), Then you invert that and it becomes -32768. You do the mix process which is just addition thus this becomes 32,767 + (-)32,768= -1. The thing is, wouldn't the sample be at the same position everytime? What happens, if you just rip the track 1 time, and do a copy and then do the subtraction of the same file? Thus, you're subtracting rip 1 from rip 1, to do a comparison.

Subject:RE: Comparing tracks ripped from CD
Reply by: Rednroll
Date:1/24/2004 12:39:32 PM

"don't know if this is a dumb question or not but why are the tools to show the numbers of errors on a CD so hard to come by.

I've kind of wondered the same thing, of what it takes to find this information out. It would be a good tool to have, to check the error content on a CD before shipping it out. I know in my Panasonic DAT player, you can put it in error correction mode and it will display the amount of error correction during playback of the DAT. It's kind of cool using this, after a DAT has been eaten and you try to straighten it out, and you can watch the error correction increase as you reach that eaten tape portion.

Subject:RE: Comparing tracks ripped from CD
Reply by: farss
Date:1/24/2004 1:27:47 PM

The problem would be that mostly devices such as hard disks do the error correction in the drive electronics. I've only delved into SCSI drives as I once wrote diagnostic software for them. They would correct the errors internally but reported that an error had been corrected, number of bits in error etc in a block of data at the end of the read request. Problem was that our software engineers had no clue what to do with that data in the standard system drivers so it was thrown away.

I'd be pretty certain that the CD-ROM drive does the error correction internally but the information must be available externally as programs such as CloneCD can make an exact copy including any errors. It will not work on some CD drives as they will not give access to the uncorrected data it seems.

I think some more research is in order here. This is not a minor issue.

Subject:RE: Comparing tracks ripped from CD
Reply by: farss
Date:1/24/2004 1:33:48 PM

This looks interesting:

http://www.riptrax.com/

Seems it may only work with SCSI CD drives but I'd spring for the cost of one just to get access to that information.

Go Back