Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Music CD Data

by brian_d_foy (Abbot)
on May 29, 2005 at 18:48 UTC ( [id://461557]=note: print w/replies, xml ) Need Help??


in reply to Music CD Data

Not all CDs have UPCs, and even Amazon doesn't use those to identify their products (they use an ASN). The CDDB uses the length of the tracks to guess which CD you have, but sometimes that even comes up with more than one possibility. There are a couple of Perl modules for that too, but you have to come up with the CD info. A combination of those should identity a disk in most of the cases however.

I don't pay much attention to either of those: I put the CDs into the computer, let the music palyer figure it out (using CDDB), then look at the stuff the music player stores. For some of them, you don't even need to rip the disk: it remembers what it has already looked up. :)

--
brian d foy <brian@stonehenge.com>

Replies are listed 'Best First'.
Re^2: Music CD Data
by Limbic~Region (Chancellor) on May 29, 2005 at 21:54 UTC
    brian_d_foy,
    Thanks, but I am afraid your approach is too advanced. This particular relative is not IT savvy by any stretch of the imagination. This is more a matter of being able to answer a handful of questions:
    • Do I already own CD X?
    • What CD is song X on?
    • What CDs by artist X do I own?
    • Who sings song X?
    I plan on making an extremely simple web interface and so far the code above seems to be doing the trick where as other wheels don't. Personally, I don't have a lot of music to worry about - I listen to web broadcast radio stations.

    Cheers - L~R

      Hi,

      I remember seeing a perl module called CD::Info and the one on cpan, called Audio::CD, which can grab CDDB info.

      These might help, if you can stick each CD in your drive.

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a yourname@perl.me.uk? Just ask!!!

      Your task is to get the data, and that's what I answered. At some point you have to get the data from the stack of CDs. Taht could be you typing or scanning a lot of barcodes, or sticking the CD in the drive for a couple of seconds. You can make your own judgement about which you want to do, but then, you asked about populating the database, not the end user interface.

      I've already done this for myself and a few other people. I let the installed music player look at the CDDB for all the CDs then take the data it stored on all of those CDs for the database. I don't have to write a lot of code that way.

      I'm sure there a freeware or shareware program out there that does what you want already, though :)

      --
      brian d foy <brian@stonehenge.com>
        brian_d_foy,
        I'm sorry, I wasn't communicating effectively. I don't have access to the CDs nor do I feel I could explain how to set up the appropriate software to get your solution working. I am writing a web app where they can enter a new CD by typing in the UPC or answer one of the 4 questions outlined previously.

        Cheers - L~R

Re^2: Music CD Data
by bart (Canon) on May 30, 2005 at 07:18 UTC
    I agree on using CDDB, as all you have to do is insert the CD into the drive, let the system do the lookup, and you get more info than you even asked for, such as all the track titles.

    The disadvantage is IMO in limitations in CDDB. There can only be one entry per signature per genre in the central database, and I already have encountered cases where different CDs have the same signature. This is is most likely to occur for 2 track CD singles.

    CDDB is in need for a serious overhaul.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://461557]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-28 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found