Connecting Tech Pros Worldwide Help | Site Map

Detecting playing song

Newbie
 
Join Date: Jul 2009
Posts: 17
#1: 3 Weeks Ago
I'm thinking of making a program which must detect when a song played in, for example, iTunes. Whenever a new song is playing, either if a song has ended and another one start or if the user choose to play another song, I want my program to detect that and tell the user which artist, album and song name it is, maybe using ID3. Is there any way to do that?

Thanks in advance,
Saser.

Oh, and I'm not asking for code, but for ideas of how it would work.
Familiar Sight
 
Join Date: Jul 2009
Location: Calgary, Alberta, Canada
Posts: 211
#2: 3 Weeks Ago

re: Detecting playing song


To be honest, I'm not sure if this is an "ok" thing. The only way I could think of would be to basically hook into iTunes and get the data from there, but I'm not sure how legal it is. I know for games, it's basically cheating, but sometimes programs provide an API for people to write 3rd party plugins.

You might want to do more research to find out what's legal or not.

I don't really see how you could do it generically though... each program would handle things differently in different data structures.

Heh, another option without the legal gray area would be like that nifty iPhone app that "listens" to a song and tells you what it is. Your program could "listen" to the output of your speakers and say what the song is :D
Newbie
 
Join Date: Jul 2009
Posts: 17
#3: 3 Weeks Ago

re: Detecting playing song


I don't think it's an illegal thing. I mean, somehow Windows Live Messenger catches up what you're listening to, even in iTunes. How does it do to catch the data?

And for that iPhone app, I don't think so. :P
Familiar Sight
 
Join Date: Jul 2009
Location: Calgary, Alberta, Canada
Posts: 211
#4: 3 Weeks Ago

re: Detecting playing song


I didn't know MSN did it with iTunes, I just knew it did it with Windows Media Player. Since WMP and MSN are both Microsoft, I figured they either have an API, or did their own little trick :)

If MSN reads both, there's a fair chance there's an API you can make use of. A quick google search turned up nothing useful for me though.
Newbie
 
Join Date: Oct 2008
Posts: 17
#5: 3 Weeks Ago

re: Detecting playing song


I believe iTunes has an SDK that includes a COM interface you can use to get that kind of information. Although you need to register on their development connection site to get it.
Newbie
 
Join Date: Jul 2009
Posts: 17
#6: 3 Weeks Ago

re: Detecting playing song


I downloaded that SDK, but I don't know how to use it :P
Reply


Similar C# / C Sharp bytes