PDA

View Full Version : How does iTunes recognize your CD??


Pages : [1] 2

intv7
01-29-2007, 06:04 AM
Hi all-

Just wondering if anyone can help me figure this one out. I'm wondering what criteria iTunes uses to figure out what CD you've got in your drive. Is it the number of tracks + the track times? Or is it something embedded in the disc, or what?

The reason I ask is that something very weird happened this weekend. In the past, I've put in some pretty obscure discs -- even some bootlegs -- that iTunes has recognized. The album title and song names all appear in iTunes when the disc is inserted.

The other night, I copied an album (The Doors' Other Voices) to my standalone CD recorder with the intention of putting the album on my iPod. I do not have any CD version of this album, so my only option was to make a CD of my original Elektra vinyl. I recorded straight from the turntable (an analog connection) and manually inserted the track breaks as the album played.

This final disc can't possibly have the same exact track times as any past commercial release of the CD -- but still, when I put this homemade disc into my computer, iTunes immediately pulled up the correct album name, song titles, and album cover!! :wtf:

How in the world did iTunes know what was on this disc??? Unless it's a million to one shot, and the track times match exactly to an official release of this album (seems pretty unlikely....), I'm convinced that Apple had someone peeking in my window. :laugh:

Anyone with any knowledge of how this works? Your input is appreciated!

Thanks

ShowsOn
01-29-2007, 06:07 AM
Someone else possibly recorded the vinyl, then the iTunes database found your copy and decided it was the closest match.

Claus
01-29-2007, 06:07 AM
iTunes uses an online database (internet service) to get all the infos from the CD.

intv7
01-29-2007, 06:09 AM
iTunes uses an online database (internet service) to get all the infos from the CD.

Right, but wouldn't my CD be a one-of-a-kind?

intv7
01-29-2007, 06:12 AM
Someone else possibly recorded the vinyl, then the iTunes database found your copy and decided it was the closest match.

Simply based on the track numbers and lengths?

ShowsOn
01-29-2007, 06:17 AM
Simply based on the track numbers and lengths? Yes that's right, I assume you divided the songs into different tracks?

Perhaps it is a particularly unique album, with some long songs in uncommon places?

I know it seems amazing, but so many people use the database that it is just full of heaps of data.

Having said that I often laugh when it can't find an obscure Australian CD single :)

Jamie Tate
01-29-2007, 06:22 AM
I once did a needle drop of an obscure Oscar Brand (Bawdy Sea Shanties) and it recognized it!

Then again, there was an Elvis CD released in 2004 and it didn't recognize it.

http://www.stevehoffman.tv/forums/showthread.php?t=46383

intv7
01-29-2007, 06:22 AM
Yes that's right, I assume you divided the songs into different tracks?

Perhaps it is a particularly unique album, with some long songs in uncommon places?

I know it seems amazing, but so many people use the database that it is just full of heaps of data.

Having said that I often laugh when it can't find an obscure Australian CD single :)

Yes, I divided the tracks -- though I'm sure it isn't precise....I know a few tracks have 2-3 seconds of silence before the song begins, which is why it's all the more surprising to me that it was recognized.

I guess it is a slightly unusual album in that there are only 8 tracks, clocking in at just under 40 minutes. It seems a bit hard to believe, though, that in the history of recorded music, that's the only disc in the iTunes database that matches.

Come to think of it, I have had one or two cases where it gave me two entirely different choices for the identity of a CD. Must be that those two albums matched identically in track lengths?!?

stereoptic
01-29-2007, 06:24 AM
int - check out these threads:

iTunes recognized the songs in my needle drop. Huh!? (http://www.stevehoffman.tv/forums/showthread.php?t=48205)

How does CDDB work? (http://www.stevehoffman.tv/forums/showthread.php?t=23519)

ShowsOn
01-29-2007, 06:29 AM
Come to think of it, I have had one or two cases where it gave me two entirely different choices for the identity of a CD. Must be that those two albums matched identically in track lengths?!? Yeah, it just uses the closest match, if there are two or more matches that are equally close then it asks you to decide.

It may also favour CDs that get looked up more often, because it assumes that there is a greater probability that you will have the more common one.

intv7
01-29-2007, 06:29 AM
Ahhh!! Those old threads, as well as the replies I got here, have all been helpful. Good to know that it wasn't some paranormal event. :laugh:

ZenArcher
01-29-2007, 06:55 AM
I transferred Stevie Wonder's "Looking Back" 3-LP set to two CDs. Lo and behold, CDDB recognized my burned discs and gave me accurate track listings. Guess I'm not the first to have done that!

intv7
01-29-2007, 07:02 AM
Thanks folks -- now I'm wondering about the CDDB -- when you change or alter the CD info on iTunes (as I do every so often, to correct misspellings and customize things for my iPod), does this info get uploaded to their database?

Metralla
01-29-2007, 07:04 AM
The idea had been around for ages. I first played CDs from a drive connected to my Unix machine back in 1997 or so, using a CD player software GUI written in Motif. All the source code was available, and I looked at the code to see how it calculated the magic number it used to look up the database.

The hashing index was calculated by adding up the times in seconds for each of the tracks, and then doing some calculations.

In those days there were plenty of CDs it did not know, and I posted many listings to their database. Fun stuff.

aswyth
01-29-2007, 07:18 AM
It connects to CDDB, which recognizes CDs by the following process:

1) It determines the time of track #1 and eliminates all CDs which do not have their track #1 as this same length.

2) It does the same for track #2, and continues this process until . . .

3) There is only one album left, but sometimes . . .

4) There are no tracks left, but it has not narrowed the field to one choice. It then asks you to make a choice.

If you have a CD with a single track, it produces lots of choices, because there's only one chance to eliminate other CDs. Thus, Redd Foxx's 42+ minute (single track) CD "You Gotta Wash Your ***" is mistaken for a classical CD!

People like me, when they input a CD and get no info, are the ones who upload track times and whatnot. I think I must be one of the few who doesn't misspell song titles every other time!

Jamie Tate
01-29-2007, 07:39 AM
Thanks folks -- now I'm wondering about the CDDB -- when you change or alter the CD info on iTunes (as I do every so often, to correct misspellings and customize things for my iPod), does this info get uploaded to their database?

In iTunes go to the Advanced menu and click "Submit CD Track Names." It may take a few tries to correct mistakes others have submitted but your computer will at least remember the changes you've made.

Jamie Tate
01-29-2007, 07:40 AM
Thus, Redd Foxx's 42+ minute (single track) CD "You Gotta Wash Your ***" is mistaken for a classical CD!

:biglaugh:

RicP
01-29-2007, 07:47 AM
It connects to CDDB, which recognizes CDs by the following process:

1) It determines the time of track #1 and eliminates all CDs which do not have their track #1 as this same length.

2) It does the same for track #2, and continues this process until . . .

3) There is only one album left, but sometimes . . .



This is not entirely correct; not for GraceNote anyway. The code that I worked with for GraceNote uses a computed key, not individual track times. This computed key is a hash based on a combination of:

1) The number of tracks on the disc
2) The total time of the disc
3) The approximate track times on the disc (rounded)

These three data points are used to create the hash key. This key is then matched in the master hash table and returns one or more discs that share this hash key. This is also why you can have a self-burned disc that is a few seconds off on each track and have it still be recognized. The individual track times are the least important data point.

Graham Start
01-29-2007, 10:19 AM
If you have a CD with a single track, it produces lots of choices, because there's only one chance to eliminate other CDs. Thus, Redd Foxx's 42+ minute (single track) CD "You Gotta Wash Your ***" is mistaken for a classical CD!


It's particularly bad if you have a radio promo CD (the kind with just one track under 5 minutes long). You'll get about a dozen choices, and often not the correct one among them.

AKA
01-29-2007, 10:44 AM
I put in a CD-R someone made for me of both Traveling Wilburys CDs on one disc, and iTunes recognized it.

Squealy
01-29-2007, 10:48 AM
If you create a tracklist for a disc yourself, does iTunes send this tracklist out to a master database?

joelee
01-29-2007, 10:55 AM
When I created my needle-drop of Stadium Arcadium it was recognized.

pitro
01-29-2007, 11:04 AM
I did a needledrop of All Things Must Pass and recorded it on one CD-R (minus last LP) and iTunes recognised it!

Metoo
01-29-2007, 11:27 AM
Big Brother? :D

Andreas
01-29-2007, 11:32 AM
It connects to CDDB, which recognizes CDs by the following process:

1) It determines the time of track #1 and eliminates all CDs which do not have their track #1 as this same length.

2) It does the same for track #2, and continues this process until . . .

3) There is only one album left, but sometimes . . .

4) There are no tracks left, but it has not narrowed the field to one choice. It then asks you to make a choice.
The actual algorithm is way more complex and clever than that.