Theoretical question about how CD's work


Theoretically, can the contents of a CD be printed out onto sheets of paper in 1’s & 0’s, re-entered digit by digit (say, by a generous helper monkey with an infinite lifespan) into some sort of program, and the same sound will be replicated? Just trying to understand how CD’s work (though I’ve been trying for 25 years and it still seems like magic to me).
sealrock

Showing 6 responses by almarg

P.S. to my previous post:

I recall seeing measured data a few years ago indicating that erroneous reads by the laser mechanism occur vastly more often when ripping at high speeds than when ripping (or playing) at normal (1x) playback speed. Although even when ripping at high speeds the hardware will usually correct at least the vast majority of those errors bit-perfectly (assuming disc and drive are in good condition).

That would suggest, though, that if the particular ripping program being used cannot detect erroneous data and perform multiple re-reads as necessary, and provide an indication to the user if and when uncorrected errors cannot be overcome by re-reading at the particular speed, it would be desirable to rip at low speeds, e.g. 1x or 2x or thereabouts.

Regards,
-- Al
IMO the reason many of the tweaks mentioned above by Geoff may be beneficial in some situations has nothing whatsoever to do with bit errors or error correction.

The main reason in most cases is likely to be related to electrical noise generated by the servo mechanisms and circuitry in the transport part of the player, as it tracks the disc, coupling into unrelated downstream circuitry in the player, causing jitter in the D/A conversion process, and/or intermodulation or other effects on the analog signal path. The degree to which that occurs will be dependent on the design of the particular player, of course, as well as on the condition of the disc.

From this Wikipedia writeup:
Reed-Solomon coding is a key component of the compact disc.... In the CD, two layers of Reed-Solomon coding separated by a 28-way convolutional interleaver yields a scheme called Cross-Interleaved Reed Solomon Coding (CIRC).... The result is a CIRC that can completely correct error bursts up to 4000 bits, or about 2.5 mm on the disc surface. This code is so strong that most CD playback errors are almost certainly caused by tracking errors that cause the laser to jump track, not by uncorrectable error bursts.

Note that the term "error correction," as properly defined in this context, refers to bit-perfect correction. "Error interpolation" is the term used to refer to the less than bit-perfect approximation that can occur (rarely) when bit-perfect correction fails.

And from a post by member Kirkus (who probably has more hands-on experience with the internal workings of CD players than the rest of us put together) in this Audiogon thread:

CD players, transports, and DACs are a menagerie of true mixed-signal design problems, and there are a lot of different noise sources living in close proximity with susceptible circuit nodes. One oft-overlooked source is crosstalk from the disc servomechanism into other parts of the machine . . . analog circuitry, S/PDIF transmitters, PLL clock, etc., which can be dependent on the condition of the disc.... One would be surprised at some of the nasty things that sometimes come up out of the noise floor when the focus and tracking servos suddenly have to work really hard to read the disc.

Apologies to the OP for the digression.

Regards,
-- Al
 
8th-note 6-27-2019
@almarg mentions EAC and FLAC. When I rip a CD to FLAC using db Poweramp what does the data on the FLAC file look like. Since it can be compared to a perfectly accurate copy (whatever that means) it shouldn’t need the error correction wizardry.

I made no mention of FLAC, which as stated above is a lossless format for storing audio data in compressed form. EAC ("Exact Audio Copy") is a software program that is widely used for "ripping" (copying) the contents of audio CDs onto computer hard drives. It provides the capability of re-reading data on a CD multiple times that depending mainly on the condition of the disc and the drive mechanism may not be captured accurately on the first pass (i.e., on the fly).

The "error correction" that I have been referring to is invisible to the user, is performed by circuitry associated with the drive mechanism, and makes use of error correcting codes that are on the CD and are an inherent part of the CD format. My understanding is that **for a CD and a drive mechanism that are in good condition** something like hundreds of bits or even more will typically be misread by the laser mechanism during a single pass, among the billions of bits that are on a CD, and all or very nearly all of them will be routinely corrected by that circuitry to bit-perfect accuracy, on the fly. Use of a program such as EAC, which can make multiple passes if necessary, provides additional assurance that will happen, and will flag an error if for some reason it does not happen.

When I rip a CD to FLAC using db Poweramp what does the data on the FLAC file look like. Since it can be compared to a perfectly accurate copy (whatever that means) it shouldn’t need the error correction wizardry.

I’m not familiar with db Poweramp, but even if it only rips using a single pass chances are that all or nearly all of your rips are bit perfect (assuming discs and drives are in good condition), with the necessary error correction having been performed by the hardware invisibly, ***prior to db Poweramp even seeing the data.*** EAC, as I said, just provides added assurance, especially if disc or drive condition may be marginal.

Regards,
-- Al

I would emphasize at this point that the intent of the OP's question is that he is "just trying to understand how CD’s work."

Discussions of why a given CD can sound different when played on different players, or why different physical CDs containing the same 1's and 0's may sound different when played on the same player, or why CDs, ripped files, and CDs burned from those ripped files and containing the same 1's and 0's can sound different, are separate (and complex) subjects that are unrelated to the stated intent of his question.

Regards,
-- Al
 
@Millercarbon, it seemed to me to be implicit in the OP’s question that the monkey would have to be provided with some means of converting the physical representation of 1’s and 0’s that is used by the CD medium (namely the transitions between pits and lands that I referred to in the first paragraph of my previous post, and that has also been referred to by Geoff, you, and others), into actual 1 and 0 numbers that could be written out.

One way in which that could be done would be to provide the monkey with a computer having a CD/DVD drive and a program such as EAC. By using that program he would assure bit-perfect reads of the data into the computer. (Or in the relatively unusual case that a CD is simply unreadable after many successive attempts, without uncorrectable errors occurring, the program would flag an error). All of that is of course no different than what many of us do when ripping.

The computer could then be provided, if desired, with a simple program that would convert the ripped data into a visible/printable series of 1’s and 0’s, and of course that could be accomplished with bit-perfect accuracy.

Providing the monkey with those provisions would make my previous short answer of "yes" to the OP’s question entirely applicable, as well as saving the monkey a good deal of time by automating much of the process.

Regards,
-- Al
The short answer: Yes!

A longer answer:

First, the monkey would indeed be busy for a very long time, as a typical CD contains something like six or seven billion 1’s and 0’s (referred to as "bits," which is short for "binary digits"). The bits being physically represented by transitions or lack of transitions between the pits and lands Geoff referred to.

Some of those bits don’t represent data, but rather are provided for control purposes, i.e., to make it possible for the laser mechanism and associated circuitry to identify, track, and read the data. Numerous bits are also provided in the form of "error correcting codes," which allow most and in many cases all erroneous reads that may occur for various hardware-related reasons to be mathematically corrected to bit perfect accuracy by the subsequent processing circuitry in the player.

The rest of my answer, though, pertains just to the bits which represent musical data. We are all familiar with decimal numbers, where each digit in the number can range from 0 to 9. Computers and most digital circuitry uses binary numbers instead, where each digit in the number is represented by either a 0 or a 1. Any decimal number has a binary equivalent; decimal and binary are simply different ways of expressing the same quantities. (It’s actually a little more complicated than that, as numbers expressed by 0’s and 1’s can be in various formats such as "2’s complement," or "offset binary," or "straight binary," but you needn’t get into those distinctions for the purposes of your question).

The musical data on a CD conforming to the standard "Redbook" format contains for each of the two channels 44,100 samples per second that are proportional to the amplitude of the music signal at the instant the sample was taken. While "amplitude" can be thought of as volume, keep in mind that for an audio signal it can be either positive or negative.

Each of those 44,100 data samples that are present for each channel during each second of the recording consists of 16 bits, i.e., a group of 16 digits each of which can be either a 1 or a 0, representing a number that if expressed in decimal form would be integers (i.e., whole numbers) ranging from -32,768 to +32,767. With each such number, as I said, being proportional to the amplitude of the music signal in the corresponding channel at a given instant of time.

So, yes, given enough time and given appropriate and accurate playback hardware and software, an accurate transcription of those numbers by the monkey would allow the music to be reproduced consistently with the data on the CD.

Regards,

-- Al