MP3 ID3 Tags
I was working today on something similar to boombox. Mostly as a side project to understand some concepts better, but also as a proof of concept. Anywho… I have been investigating discovery techniques.
The first is simply scanning directory structures and building data from that (ie. folder name at artist level gets read as artist name). The second is to use the metainfo from the file itself (ID3 for mp3s, Field Keys for MP4, etc.).
Both have pros and cons. Scanning doesn’t require tags (duh) and is slightly more forgiving. Tags otoh allow for far more information to be processed. Case in point, the compilation flag.
in iTunes, there is a nifty little checkbox on the Get Info dialog that allows you to indicate that a track is part of a compilation. This has the benefit of allowing you to capture the true artists name in the appropriate field, but have it be grouped by the album. Otherwise, each artist in the compilation would have their own album entry with one song in it.
Funny thing about that checkbox… its not a standard ID3 tag. Apple creates a new tag (TCMP) and sets the value to 1 for comps. If its not present, or value is 0, then its not part of a comp.
This is all “legal” – the standard allows for custom tags to be created and used. But Apple gets even tricksier.
The format of this tag requires that the tag be version 2.3 or higher, as the previous versions had different encoding schemes. If the tag isnt at the right level, apple stores the information in the xml dump of your track info instead of upgrading your tag.
All well and good when you are just using itunes. But makes for crappy data retrieval when trying to scan the items themselves.
Moral of this story? Be good netizens with your music tracks. Make sure to upgrade tag versions before transferring files. Also, my pet peeves, use the Of fields ( i.e Track 1 of 17 not just Track 1 ), use the Compilation checkbox. If its mostly one Artist but one track has a “Featuring Another Person” use the Album Artist field to group them all together as the main artist.