Detecting playing song

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Saser
    New Member
    • Jul 2009
    • 17

    Detecting playing song

    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.
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    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

    Comment

    • Saser
      New Member
      • Jul 2009
      • 17

      #3
      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

      Comment

      • GaryTexmo
        Recognized Expert Top Contributor
        • Jul 2009
        • 1501

        #4
        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.

        Comment

        • Fr33dan
          New Member
          • Oct 2008
          • 57

          #5
          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.

          Comment

          • Saser
            New Member
            • Jul 2009
            • 17

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

            Comment

            Working...