SUBCODE ON THE COMPACT DISK


Did you ever wonder just how a CD player new exactly where it was on the disk at all times, even if it skipped? Did you ever think about how some CD players know the name of the disk before you even play a song? These and other similar little tricks are done with a portion of the CD's data called subcode. Out of every 291 bits of data that come off the disk, 8 of them are devoted to this subcode. The 8 bits are given letters designating their usage: P, Q, R, S, T, U, V and W. Most players actually only use the Q bit.

The Q bit

You might be wondering how much usefull information can be derived from just one bit? Well, the CD player gets around this apparantly small amount of data by waiting until 98 of these bits have been received and then decoding the information. It would be like you sending a letter to your friend one character at a time. This all happens so quickly though that an entire 98 bit block (called a subcode block) is available 75 times every second. It doesn't seem like such a small amount of data now, does it?

Within the Q channel (or the Q subcode block) there are basically 4 types of information: Data, Control, Address, and some Error Detection Code. The format of the Q channel is seen in the diagam below:

figure 3.30

There are 4 bits devoted to control information. The first bit tells the CD player whether the CD has 2 or 4 audio channels. Although no CD player I've seen has 4 channels output, it might be the next advance in the technology. Imagine listening to a live concert with all the real depth and sound surrounding you. Currently the closest thing to this is to use DSP to delay a copy of the 2 channel signal (along with some fancy processing) and send it to the rear speakers. Using all four channels of the CD as it is capable of would sound much more realistic. The second bit isn't defined. The third bit is used for a sort of copy protection. If the bit is set, it tells a digital recorder listening to the data not to record. This is why a DAT wont record all of your CD's so you can take them back and not have to pay for them. Record companies thought about this in advance... The fourth bit of the control is to indicate whether or not the CD was recorded using pre-emphasis. Pre-emphasis in CD players works a lot like the original dolby noise reduction techniques used to get better quality recordings on analog tapes. The process stems from the idea that most of the noise in a recording occurs in the high end of the frequency spectrum. The master recording (usually a tape) is assumed to be without noise or distortion. The high frequencies are amplified and then recorded onto the CD disk. The recording process introduces a little noise in the high end, which would be the same amount whether or not the original signal was amplified. The CD player playing the recorded disk reads off the music and attenuates the high end frequencies, reducing the noise from the recording process greatly and returning the signal back to its proper level of amplification. If the manufacturer of the disk used this pre-emphasis process, the fourth bit of the control would be set to 1, telling the CD player to turn on the de-emphasis circuit to perform the attenuation.

After the control information in the Q channel comes 4 bits of address information. These 4 bits tell the CD player what to look for in the next block in the Q channel (the Data block). There are 3 different varieties of Data blocks, mode 1, mode2 and mode3. The 4 bits of address indicate which of the three types the Data block is.

Data block mode 1

The information in the Data block when it is in mode 1 is different depending upon whether or not you are in the "lead-in" area. The lead-in area is the first area on a disk and gives such information as the table of contents for a disk. The format of the Data block when it is in mode 1 is shown below:

figure 3.31

The lead-in area is indicated by the first TNO field being 8 bits of zeros. When in the lead-in area, the Point field specifies a track number, from 0 to 99. The Min, Sec and Frame fields give the absolute starting time of that track from the end of the lead in area in Minutes, Seconds and Frames respectively (there are 75 frames in a second). If the Point field has the hexadecimal number A0 in it, the Min field contains the number of the first track, with the Sec and Frame fields set to zero. If it contains and A1, the Min field contains the number of the last track on the disk. Finally, if the Point field has an A2, the Min, Sec and Frame fields give the absolute time of the end of the music (which would indicate total disk play time). The Q-channel in the lead-in area is repeated 3 times for every entry in the table of contents to introduce redundancy in case of errors. The Q-channels as they come of the disk would give data like this:

Track 1 start time, Track 1 start time, Track 1 start time, Track 2 start time, Track 2 start time, Track 2 start time ...

... Track 99 start time, Track A0 info, Track A0 info, Track A0 info, Track A1 info ...

and so on.

When the disk is in the program area, that is when it's playing songs, the data area in mode 1 contains the current track number, the amount of time since the beginning of the track, the amount of time from the beginning of the CD, and 8 bits which can be used to indicate indexes in the track, like bookmarks. Up to 99 indexes can be encoded in each track. Using this data, your CD player gives you a readout on the display of how many seconds have elapsed, what track you're on etc. Because this information is encoded right along with the music, you can skip the CD to a completely new area, and it will always tell you exactly where it is on the CD.

Data block mode 2 and mode 3

When the Data block is in mode 2 or 3 (indicated by a 2 or 3 in the 4 bits of address in the Q channel), different information can be obtained, as can be seen in the breakdown of the Q-channel below:

mode 2 and mode 3

The data in mode 2 contains a sort of bar-code for the disk. It's a catalog number which uniquely identifies the disk and it remains constant for every mode 2 data block. This is how some CD players know the name of the disk. They read the disk to get the catalog number and looks it up in a table which maps catalog number to name of disk. The table is usually built by the user. All the user has to do is to type in what the disk should be referred to the first time it gets put into the CD player. Other usefull things can arise from the catalog nuber besides disk names, one can program in their favorite songs and put that in memory as well. When one plays the disk again, all the favorites are ready to go.

Mode 3 (if present) has a little more detail about the origin of the disk. It contains a code for the recording which indicates the country, owner, year of recording and a serial code. This data can change from track to track as the information refers to the particular song and not necessarily to the whole disk.