From: dplatt@ntg.com (Dave Platt)
Newsgroups: rec.music.synth,comp.dsp,comp.sys.hp
Subject: Re: AUDIO-CD READING ?
Date: 26 Aug 92 17:18:55 GMT
Organization: New Technologies Group, Inc.  Palo Alto CA

In article <1992Aug25.092739.15002W@lumina.edb.tih.no> ketil@edb.tih.no (Ketil Albertsen,TIH) writes:

>Early demo systems, before the CD system was released to the commercial
>market, could display various text along with the music, in an alphanumeric
>display on the player: The title, name of the singer, or the words of the
>text. I doubt that that was removed from the spec when it was commercialized.
>True enough, about zero of the CDs on the market has recorded anything such
>information - or at least we think so, because we have no way to detect it.

Red Book audio CDs have "subcode" bits in each frame, which can be used
for various purposes.  The P channel of the subcode is used to flag the
start of a track, and the lead-in and lead-out areas of the disc... it
can be used for control purposes by a "simple-minded" CD player.  Very
few players depend on the P channel.

The Q channel carries a good deal more information, organized into
98-bit blocks.  Each block specifies the disc address (in effect, the
time position) of the data, its copy-protection status, whether
preemphasis is used, whether it's 2- or 4-channel audio.

The other six channels of subcode data are unspecified in the original
Red Book standard.  Their most common use has been for CD+G
low-resolution color graphics.

An audio CD's table-of-contents information... the number of tracks, the
starting position of each track, and the total disc time... is all
encoded in the table-of-contents area, which is recorded as part of the
Q-channel information in the leadin area.  Unfortunately, the TOC does
_not_ have room for textual information, such as the disc title, track
titles, or lyrics.

>Most CDs tiles have a unique ID number recorded. This info is being used
>by most or all CD-ROM readers, but pure audio readers at least make no
>visible use of it (I would think that those with "Favorite Track Selection" do).

Some discs store either the disc's UPC (Universal Price Code) bar-code
identifier number in the Q subcode, in what's known as "mode 2" format.
Some discs store the ISRC (country code, owner code, year of recording,
and serial number) for each individual track... also in the Q subcode,
in "mode 3".

There are a lot of discs without mode-2 UPC identification, and [I
believe] there are very few which have the mode-3 ISRC track
identification.

I haven't encountered any Red Book CD players, or CD-ROM readers, which
depend on the UPC or ISRC information to identify discs or do a
"favorite track selection" feature.  Most player seem to take the
information from the table-of-contents (which they have to read anyhow),
and hash it into a short (32-bit??) value which is then used as an FTS
tag.  It's possible for confusion to result, but it's unlikely, as the
information in the table-of-contents resolves down to 1/75th of a second
and there isn't much chance that two different discs will have identical
track counts, track starting positions, and track lengths.

>Then, of course, is the directory of tracks, with their playing times etc.
>Obviously, this comes out of the decoder chip, but in which format? If it
>directly switches a 7-segment display, I do get the info, but not exactly
>in the format I want. (I do not expect 7-segment, though! It probably is
>BCD nibbles; I think that is how it is recorded on the record.)

Most CD-ROM readers that I've seen will allow you to interrogate the
table-of-contents information for any CD that's placed in the drive...
whether it's a Red Book audio CD or a CD-ROM.

-- 
Dave Platt                                                VOICE: (415) 813-8917
              Domain: dplatt@ntg.com      UUCP: ...netcomsv!ntg!dplatt
 USNAIL: New Technologies Group Inc. 2468 Embarcardero Way, Palo Alto CA 94303