Well, ok....
I have a large number of audio CDs, over a thousand, collected over the past 27 years, and I was thinking of building a specialized index/database of their tracks in an xml application, the format of which I'm still cooking up. I'd like to be able to include as much data about disc structure as I can. What little information I've found about audio CDs suggests that they are astonishingly primitive data structures: there really isn't anything like a true file structure on them which, given that these things are made to a standard from around 1980, I suppose I should have guessed.
The problem is that the information on audio CD data structures is kept in something called "The Red Book," which seems to be Top Secret. Actually, you can get a copy on the web, but even a PDF version will set you back a couple hundred bucks. Why this should be for such an old standard, and one that I would think would be to the industry's advantage to have known as widely as possible, is a great mystery to me.
I had looked at the iTunes dictionary, and seen that I can get number of tracks, and also track lengths, but it looks like the track lengths are rounded or truncated to an integer number of seconds. From what little information I've been able to glean from various sources, track lengths are actually in multiples of 1/75th of a second: the "offsets" in the TOC are actually three byte pointers in the form mm:ss.ff, where each byte is two BCD digits, ss running from 00 to 59, and the "frame" ff running from 00 to 74.
With this information, I could compute track times to 1/75th of a second. What can I say? I'm a precision freak.
But this isn't actually enough information, because with the exception of a few so-called "gapless" discs, all my CDs have pauses of 1 to 5 seconds between tracks. These gaps are, I think (again I'm infering from inadequate information), identified by an "index zero" mark in the actual frames. If you've ever watched the counter on a CD player, you may have noted that the counter counts downward in negative numbers between tracks. I'm pretty sure this is just the traditional way CD players deal with index zero frames, and to get the true time of a track, you have to subtract these from the offset differences which you could get from the TOC -- if you could get to the TOC. I'd like to be able to experiment to check this hypothesis.
Also, I do have a few rare CDs that actually make other use of index numbers. One in particular is very odd: it's Glenn Goulds' performance of the Goldberg Variations, and the various variations are identified by index numbers rather than track numbers. There's only one track on the disc, which makes playing it very awkward, and I've never known whether this was done deliberately or whether it was some kind of mistake.
Do you know if some high-end CD manipulating program, like Roxio Toast, is (a) AppleScriptable, and (b) allows access to this low-level data? I hate to buy a program just to have a look in the dictionary.
Thanks