Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Is CD-DA -> .WAV really losless ? (Read 16402 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is CD-DA -> .WAV really losless ?

Hi folks.
Is CD-DA to .wav conversion really a losless procedure ? I would be interested in the technical background.

If it's really losless, if I rip a audio CD to wav files and burn another CD from these wav files and rip those wav files again ... would CD1 be 100% identical to CD2? And would the first set of wav files be 100% identical to the second ?

Thanks.

Is CD-DA -> .WAV really losless ?

Reply #1
CDDA is essentially raw, headerless wave data, so a wave file is just the same data but with headers to describe the content. So, yes, in simple terms, both will be the same. There's a bit more to it in practice, but the theory is correct.

Is CD-DA -> .WAV really losless ?

Reply #2
It is very well possible to create a bit identical copy of a CDDA disc, as John33 said. If you take good care in all the individual steps involved in the process.
A good starter could be the EAC article in the HA wiki.

Perhaps this thread would fit better in CD Hardware/Software

Is CD-DA -> .WAV really losless ?

Reply #3
[...] would the first set of wav files be 100% identical to the second ?
Not unless the combined read/write offset of the process was zero and samples where overreading/overwriting was required were faithfully reproduced, otherwise certainly not.

if I rip a audio CD to wav files and burn another CD from these wav files and rip those wav files again ... would CD1 be 100% identical to CD2?
There is more to it than just wave files.  In some instances a perfect copy may not even be possible.

As far as the concept of sound quality, there will be nothing lost if you go
[blockquote]cdda -> wave (or comprable lossless format) -> cdda[/blockquote]and the rip that created the lossless audio data was free from ripping errors, regardless of the finer points I have raised.

Is CD-DA -> .WAV really losless ?

Reply #4
Thanks for all your replies, the move greynol and the link Hanky.

(1) Set aside hardware (CD drive) inaccuracies, resulting in offset, ripping errors etc. it is possible then, right? I was more interested in the theoretic possibility then the practical feasibility.

(2) And greynol, what are you referring to with "it's more than just wave files" and in which cases it might not "even be possible" ?

(3) So, and my last question - I know - will be *very* vague, but I don't know how to make it clearer .... maybe you will manage to read something into it. Some years ago I read an article here on hydrogenaudio (which unfortunatley I can't find anymore) which somehow suggested that an audio CD describes the audio in a different way than the .wav format does and therefore the respective resulting audio signals are not the same. It said that the audio format on the CD is not just the bytes inside a .wav files in a rearranged form (sub-bytes, error-correction data,etc.), but that the audio format itself is different. Both .wav and CDDA are uncompressed, but the transformation is not losless.
To explain it, the article used the analogy of color spaces in digital image processing. Uncompressed image data (like in tiff images) compare to uncompressed audio data (for example .wav) and lossy compressed images (for example .jpeg) compare to lossy compressed audio data (for example .mp3) [... although the lossy part of the analogy is not used for our example here].
The article went on by saying that much like the CMYK and sRGB color space cannot reproduce the same colors, CDDA and .wav don't produce exactly the same audio signal.

I'm convinced it's not true, but wanted to see what the experts say here ...

Is CD-DA -> .WAV really losless ?

Reply #5
It's not true.
Both CDDA and WAV uses same technique - PCM (Pulse Code Modulation), so, in terms of colour space, they are both in CMYK (or RGB or smth else).
Caede te ipsum per murum.

Is CD-DA -> .WAV really losless ?

Reply #6
Yes, but depending on the disc reader, the music can be more or less colorful ;-)

Is CD-DA -> .WAV really losless ?

Reply #7
Yes, but depending on the disc reader, the music can be more or less colorful ;-)

Nicely played the analogy

It's not true.
Both CDDA and WAV uses same technique - PCM (Pulse Code Modulation), so, in terms of colour space, they are both in CMYK (or RGB or smth else).

Relieved to get this confirmation. But what about "it's more than just wave files" then ? Is it about the sub-channels and those other things you have on the CD, but not in the wave file ?

Is CD-DA -> .WAV really losless ?

Reply #8
Yes, but depending on the disc reader, the music can be more or less colorful ;-)

Nicely played the analogy

Noooooooooh... the transport must not influence the bits.



It's not true.
Both CDDA and WAV uses same technique - PCM (Pulse Code Modulation), so, in terms of colour space, they are both in CMYK (or RGB or smth else).

Relieved to get this confirmation. But what about "it's more than just wave files" then ? Is it about the sub-channels and those other things you have on the CD, but not in the wave file ?

The only significant difference is in hidden tracks and track changes.

Is CD-DA -> .WAV really losless ?

Reply #9
Play one audio CD on two different CD players and there might well be a difference in what you hear. The easiest to quantify difference, and usually the most obvious, is likely to be loudness (i.e. volume level, not vis a vis the loudness war). This has nothing to do with the CD or the audio on it, it is because of differences in the DACs and output circuits of the CD players; the audio data is identical. If this kind of difference fits your definition of “lossy” ... well that’s ridiculous. Go chase your own tail, I have nothing relevant to say.

First consider a wav file on a computer. It is easy to make one or more copies of it, on different drives, on different partitions, in different folders, in the same folder with different names. There are various tools that can tell you the copies are identical to the original, bit for bit. Hopefully you can agree this copying is lossless.

Write the file to an audio CD-R. Extract it back to disk. Use the tools to compare the extraction to the file used to write the CD. The extracted file will be identical to the original. Do it a thousand times and the result will still be identical, bit for bit.

It is possible for errors to occur reading or writing to the optical media, but if the equipment and blanks are good, these are rare. If they do occur, they are not “lossy” they are just errors. Except for the few bytes with errors, the rest will be bit for bit identical to the original.

The audio data is encoded on the audio CD in a very different manner than it is on a hard disk or on a data CD. It is not simply a matter of a different header or other control information. Also, the data is arranged in a very different way along the audio track. These are mainly tricks for ensuring the data gets off the disk during playback with as few errors as possible. If you were to make an exact image of the audio CD on your hard drive, you could not compare it to the original hard disk wave file with those tools I mentioned and find any kind of match -- unless you used some program that first converted the image to a wav file(s).

The data is still the same, however, there is nothing lost or “lossy” because of the encoding method. Likewise, offset and gaps between tracks are irrelevant to lossy/not lossy. These later may be important to someone who cares about minuscule differences between optical disk copies, but they are not part of the audio data.

Is CD-DA -> .WAV really losless ?

Reply #10
Set aside hardware (CD drive) inaccuracies, resulting in offset, ripping errors etc. it is possible then, right?
Right.

And greynol, what are you referring to with "it's more than just wave files" and in which cases it might not "even be possible" ?
Non-null samples that exist well into the lead-in and lead-out.  I can't think of any burning software that can recreate this phenomena.  This doesn't include hardware limitations such as the ability to overread and overwrite.

Both .wav and CDDA are uncompressed, but the transformation is not losless.
No.  The transformation definitely is lossless. (please, no Clinton-isms)

Is CD-DA -> .WAV really losless ?

Reply #11
Thanks for your patience greynol.
Non-null samples that exist well into the lead-in and lead-out.
whooo ... never heard of that ... is that dangerous ?   
I mean, how does this manifest itself when I listen to the CD? And if burning software cannot reproduce it, then my song will be truncated ?
Quote
No.  The transformation definitely is lossless. (please, no Clinton-isms)
Sorry, I'm not English. What are Clinton-isms? Twisting of words ?
Anyway, I wrote that I was convinced it wouldn't be true, but I wanted to free myself (and others) of any possible doubts ... thx.

Yes, but depending on the disc reader, the music can be more or less colorful ;-)
Nicely played the analogy

Noooooooooh... the transport must not influence the bits.
No,but their interpretation.If I'm not mistaken the same CD three different CD players (let's say a very old one, a contemporary Hi-Fi device and a Disc-man) can result in different listening experience even with the same headphones attached, no ?

Likewise, offset and gaps between tracks are irrelevant to lossy/not lossy. These later may be important to someone who cares about minuscule differences between optical disk copies, but they are not part of the audio data.
Even if the audio material is gapless (for example a live recording) but still split into different tracks ? If there are minuscule differences, you might hear clicks at those gaps ...

Is CD-DA -> .WAV really losless ?

Reply #12
whooo ... never heard of that ... is that dangerous ? 
<searches for the crassest of jokes, gives up>

I mean, how does this manifest itself when I listen to the CD?
It doesn't; it's essentially silence.

And if burning software cannot reproduce it, then my song will be truncated ?
You'll be able to reproduce enough samples as defined by the TOC minus the half-dozen or so offset samples unless your burner can write these.  It's less than trivial.

Quote
Sorry, I'm not English. What are Clinton-isms? Twisting of words ?
"It depends upon what the meaning of the word 'is' is."

If there are minuscule differences, you might hear clicks at those gaps ...
Nope.

EDIT: Ok, I'm going to bed now.

Is CD-DA -> .WAV really losless ?

Reply #13
Play one audio CD on two different CD players and there might well be a difference in what you hear. The easiest to quantify difference, and usually the most obvious, is likely to be loudness (i.e. volume level, not vis a vis the loudness war). This has nothing to do with the CD or the audio on it, it is because of differences in the DACs and output circuits of the CD players; the audio data is identical. If this kind of difference fits your definition of “lossy” ... well that’s ridiculous. Go chase your own tail, I have nothing relevant to say.
Hm, I'm confused now ... are you talking to me, or to kjoonlee ? Remember we have expressed opposite points of view ...

Is CD-DA -> .WAV really losless ?

Reply #14
whooo ... never heard of that ... is that dangerous ? 
<searches for the crassest of jokes, gives up>
ok, is that good or bad for me? LOL
Quote
And if burning software cannot reproduce it, then my song will be truncated ?
You'll be able to reproduce enough samples as defined by the TOC minus the half-dozen or so offset samples unless your burner can write these.  It's less than trivial.
OK,I guess the bottom line is that in the worst case I loose a bit of near-silence, right ?
Quote
"It depends upon what the meaning of the word 'is' is."
Ah yes, I laughed a lot when I heard that.  There were a lots of others but of course that's the most obvious one ...
Quote
... you might hear clicks at those gaps ...
Nope.
Well, I have already had gap issues due to inappropriate choice for gap handling in EAC, but I'm probably replying out of context.

Is CD-DA -> .WAV really losless ?

Reply #15
Play one audio CD on two different CD players and there might well be a difference in what you hear.
Well, that's what I said, too, wasn't it?

Quote
the audio data is identical. If this kind of difference fits your definition of “lossy” ... well that’s ridiculous. Go chase your own tail, I have nothing relevant to say.
Nooooooooo .... AndyH-ha shows up ...  you know what Andy, you've been haunting me since the first day I've poked my nose into HA. One of the first threads I read here was this monster-philosophical-flame-thread and - funnily enough - I just happened to spend my last two hours with re-reading it and albeit very interesting I swore to myself that the one thing I'll never ever do is start a philosophical discussion with you about the meaning of lossless or lossy  ....

Not only because, in this case here, I have never given any definition whatsoever of lossy and certainly did not imply that resulting audio signal of different hardware devices was any prove of it not being lossless, which is absurd of course ... please be aware that this point was brought up much later and not even by me ...

Write the file to an audio CD-R. Extract it back to disk.
Yes, that's basically the same example that I've used.

Is CD-DA -> .WAV really losless ?

Reply #16
The audio data is encoded on the audio CD in a very different manner than it is on a hard disk.
Hmmm ??? Encoded differently ? I thought both are encoded via PCM ?

Quote
It is not simply a matter of a different header or other control information. Also, the data is arranged in a very different way along the audio track. These are mainly tricks for ensuring the data gets off the disk during playback with as few errors as possible.
You mean EFM? Well very obviously there are differences in the physical storage of the data, but this thread was not about the physical but the logical level.


Is CD-DA -> .WAV really losless ?

Reply #18
Quote
Hmmm ??? Encoded differently ? I thought both are encoded via PCM ?

AndyH-ha means the way data is written on the media.

Quote
Well very obviously there are differences in the physical storage of the data, but this thread was not about the physical but the logical level.

And there's your mistake. Audio CD is a very simple format, it doesn't have physical and logical levels. And because of it such programs as EAC exists - CDDA has no sector markup on the media, no CRC data... Just lead-in and lead-out markers, where's the beginning and where's the end - it's all that you know for sure. In the middle of the track you have to control your reading all by yourself.
Caede te ipsum per murum.

Is CD-DA -> .WAV really losless ?

Reply #19
Quote
Well very obviously there are differences in the physical storage of the data, but this thread was not about the physical but the logical level.
And there's your mistake. Audio CD is a very simple format, it doesn't have physical and logical levels.
Ok, then I was using "logical" inappropriately. I actually wanted to distinguish between the physical level (channel bits, EFM) and the audio-encoding (PCM).

Quote
CDDA has ... no CRC data...
contradicts:
Quote
The Red Book specifies the physical parameters and properties of the CD, the optical "stylus" parameters, deviations and error rate, modulation system (Eight-to-Fourteen Modulation, EFM) and error correction (Cross-interleaved Reed-Solomon coding, CIRC), and subcode channels and graphics.
and
Quote
Die Daten werden in Frames gespeichert (auch "Mini-Frame" genannt). Jeder Frame enthält 33 Bytes. Davon sind 24 Byte Audio-Daten (also genau 6 Stereo-Samples), 8 Byte enthalten Fehlerkorrekturdaten und ein so genanntes "Subcode"-Byte.
(which translates to:)
Quote
The data is stored in frames (also known as "mini-frames"). Each frame contains 33 bytes. Of these, 24 bytes are audio data (that is exactly 6 stereo samples), 8 bytes contain error correction data and one is a so-called "subcode" byte.
... no ?

Is CD-DA -> .WAV really losless ?

Reply #20
Both, WAV and CDDA are PCM encoded audio data.
They contain exactly the same data representing the binary code of the quantized values of the audio signal - just the container format is different.

Best regards,
Chris

Is CD-DA -> .WAV really losless ?

Reply #21
Quote
CDDA has ... no CRC data...
contradicts

Yes, audio CD has error correction bits, but they are not meant to always correct errors 100%, but rather to minimize uncorrected errors. Uncorrected errors are then handled by interpolation etc.

A data CD, on the other hand, has additional CRC correction information to make the data (hopefully) 100% corrected. The additional CRC data explains why the capacity of a data CD is less than that of an audio CD.

Is CD-DA -> .WAV really losless ?

Reply #22
>data (hopefully) 100% corrected

not just corrected but detected if there is an error, audio cds have less correction and less detection of errors when compared to data cds.

Is CD-DA -> .WAV really losless ?

Reply #23
My intention was not to ruffle any feathers, merely to point out that it is easy to empirically determine for oneself that the audio can be transferred from media to media indefinitely without any changes. However, if one actually want to observe this, there is a detail that must be accommodated. Possibly some means of comparing the original with the DAE copy automatically takes account of this, but I’m not sure that is possible.

The extracted copy will have some small number of additional samples at the beginning of each file, and possibly also at the end, samples that were not in the original. These may all be digital zeros but it has been too long since I did the experiments; I don’t remember if there may be some small amount of very low level noise.

Since the comparison between the copies is on a sample by sample basis, mis-aligning the two files by even one sample gives very different results. One must therefore determine what has been added and start the comparison after it, or delete it. Therefore, as in so many other situations, anyone attempting to play with computer audio without a good audio editor that functions at the sample level seems destined for frustration.

These extra samples do not change an of the original audio data, they are simply extra. They may or may not be on the CD; they could simply be an artifact of extracting. Their presence, or number, may depend on the hardware and or the software used. I only know they were on my test tracks.

Because of these extra samples, finding, in the DAE, the place where the original sample string starts can sometimes be quite tedious. It is thus helpful to mark the beginning, or near the beginning, of the original file(s) by pulling up (or down) a single sample (before writing to CD-R) and using that as the alignment point.

Is CD-DA -> .WAV really losless ?

Reply #24
A data CD, on the other hand, has additional CRC correction information to make the data (hopefully) 100% corrected. The additional CRC data explains why the capacity of a data CD is less than that of an audio CD.

And you have your wild fantasies backed up by some facts?
Reed-Solomon != CRC.