4 Replies Latest reply on Feb 6, 2010 6:53 AM by Quest27

    What is ".id3tags" and how do I use it?

    Quest27

      Hello, I'm a Lingo newb and could use some help. I am trying to get metadata from MP3 files. The basics of what I'm trying to accomplish is this:

       

      I have a text cast member called "Title" and I want to make a script that will change the .text property of the Title sprite to the name of the song.

       

      I've been looking through the Lingo dictionary and have stumbled upon a property called ".id3tags". I think it might work but I have no idea how to use it.  I simply want to be able to extract the ID3 tags of whatever song I import and display them as text on the stage. If anyone can shed some light on this situation, I would be eternally grateful.

       

      Thanks

        • 1. Re: What is ".id3tags" and how do I use it?
          Sean_Wilson Adobe Community Professional

          id3tags is a property of #swa members (Insert -> Media Element -> Shockwave Audio...) and is only available after the swa file has buffered. Here's some info from Buzz Kettles (one of Macromedia's sound engineers on the Director development team):

          <quote>

           

          use preLoadMember() & wait until state=2

           

          ... normally I leave my mp3s external & use a dummy swa member to  preload the mp3s, suck out the ID3s, then link a 'regular'  sound member to the  same file & listen & control the sound playback using the standard sound  control lingo.

           

          To play true mp3 streams though, you must use the swa member for playback  ...

           

          NOTE:  these ID3 tags are available from many mp3 files ...
          Director will only read the v2.x type ID3 tags - the ones at the front  of  the file (if you drop an mp3 onto a hex editor you can see them).
          (1.x tags are attached at the end of the file, which is really really  useless, so we decided to not honor these at all)
          btw - MP3Rage (for mac) can update older tags from the back to the front of  files.
          </quote>
          1 person found this helpful
          • 2. Re: What is ".id3tags" and how do I use it?
            Quest27 Level 1

            Cool, thanks for the quick response. How are the tags extracted? Would it be a long string consisting of all the metadata, or would it be nice, neat and organized into sub-properties for artist, album, song name,etc. and if so, what are the names of those properties? Can I simply assign the .text property of a text member to the tags?

            • 3. Re: What is ".id3tags" and how do I use it?
              Sean_Wilson Adobe Community Professional

              You need to look at the data returned - it is in the form of a property list. As for property names, that depends on who added the tags and how that was done - I'm not sure there is a "standard" as such.

              Once the member has preloaded (state = 2) you can issue/execute:

              put member("swa").id3tags

              and look in your message window for the property list (and property names therein)