Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve track data of audio CD from online database 1

Status
Not open for further replies.

JackTheC

Programmer
Feb 25, 2002
325
NL
When I insert a music CD in the CD player of my laptop and I start Windows Media Player (or Audiograbber) the name of the artist, album and songtitles are looked up on the internet and displayed.

Is it possible to retrieve these data programmatically in VFP so i can incorperate it in my program. Is there an API or something?
 
The keyword is CDDB. CDDB server (the largest free one hosted by freedb.org) have their own proprietary CDDB protocoll for requests about CD meta data.

I can't tell you more, I am also just using CDex to get this CDDB info. You need to dig deeper to adress this more directly.

Bye, Olaf.
 
Thanks Olaf,

Via i found a list of freedb aware applications. I checked out an application component called uFreedb.ocx. Googled it and downloaded this OCX.

I also found a VBScript example at robvanderwoude.com

I translated this script to VFP and it worked.

The basics are here in VFP code. Mind that all the error checking etc. is left out to make it an easy read:

Code:
clear
objFreeDB = CreateObject( "FREEDBControl.uFREEDB" )
mycd='e'   && letter of CD player

With objFreeDB
    .AppName      = "Test"
    .AppVersion   = "1.00"
    .EmailAddress = "test@test.com"
    .CDDBServer   = "freedb.freedb.org"
    .CDDBMode     = 0  

    .LookupMediaByToc(.GetMediaTOC(mycd))

	? .GetArtistName 
	? .GetAlbumName
	? .GetAlbumYear 
	? .GetAlbumGenre 
    ? .GetAlbumLength,'sec'
	? 
	
	For tt = 1 To .GetAlbumTracks
		? tt, .GetTrackName(tt), .GetTrackTime(tt),'sec'
    Next
endwith
 
I gave you a star Olaf, but it don't show up...
 
Nice,

the only downside with this OCX is, there is no support and continuation for it. It seems to have been done and provided by freedb.org themselves, from what I found, but you don't get it from them anymore, you just find several download centers to offer it.

That's just a minor issue, no legal issue, no functional issue, just for the sake of it's future perspective. What runtime does the OCX use? Have you used dependency walker on the OCX to find out it's dependencies?

Bye, Olaf.
 
in regard to the star: don't mind. I find tek-tips was having a little trouble in the last few days, answering requests, internal server error, something with their coldfusion code or database...

Bye, Olaf.
 
in regard to the star: don't mind. I find tek-tips was having a little trouble in the last few days, answering requests, internal server error, something with their coldfusion code or database...

That might explain why I keep getting emails every time someone posts a message to a thread I'm taking part in. The "email notification" checkbox seems not to be behaving at present.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mike,

my main problem was directly starting into often caused an internal server error, while the homepage itself worked.

But I also see the notification change. Despite of what you have set in your profile information, every thread you even don't start but just answer in, is flagged for mail notifications. You can unmark it in the thread list.

Bye, Olaf.
 
Despite of what you have set in your profile information, every thread you even don't start but just answer in, is flagged for mail notifications. You can unmark it in the thread list.

Yes, that's what I'm seeing now. But, in the previous couple of days, I couldn't even see the big red checkmark in the thread list.

Anyway, no doubt the management is on top of it.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top