Novell Home

TagLib Sharp: Developer Notes: Artists and Performers

From Developer Community

One major problem every media player faces is how to sort albums with multiple artists. The only two viable solutions I've seen are from the big two media library applications:

  • Windows Media does this by separating Album Artists and Performers as two separate fields. For example, the album artist is D.J. Krush, but the performer of a track may be Company Flow. Thus when sorting by albums, Windows Media Player can simply sort by the album artist and then by the album name.
  • Apple's iTunes takes a different approach storing only a generalized artists field so for the same track the artist would be stored as Company Flow or "D.J. Krush (feat. Company Flow)" Since this would be a total mess to sort, iTunes supports a "compilation" option for files, essentially marking any album with multiple artists as "Various Artists" for sorting purposes. I assume more goes into this, like the artist of Track 1 being used to position the album in the sort, but I'm not sure.

To the point, TagLib# uses the Windows Media approach as it seems a better dispite the need for two fields (AlbumArtists and Performers). This is simply the preference I chose when designing the library, perhaps due to the fact I think the ASF spec is clearer and more logical than the MPEG-4 spec, perhaps due to the fact I'm using an MS designed language, or perhaps because it is better. As such, TagLib# supports TagLib.Tag.AlbumArtists and TagLib.Tag.Performers for all files and it would be best for all TagLib# applications to use this design for consistency's sake.

All formats except MPEG-4 should support this easily, and for the MPEG-4 case:

if (TagLib.Mpeg4.AppleTag.IsCompilation == true)
   AlbumArtists == "Various Artists"
else
   AlbumArtists == Performers

It would be best for any editor to detect if the file format is MPEG-4 and replace an "Album Artists" field with a "Is Compilation" checkbox.

Novell® Making IT Work As One

© 2009 Novell, Inc. All Rights Reserved.