Myself, Coding, Ranting, and Madness

The Consciousness Stream Continues…

Music Tagging: Introduction

7 Dec 2011 8:00 Tags: None

Structure is nice. Order and regularity do appease the side of me that some might label Obsessive/Compulsive. One wonderful example of this is music - something of which I have a lot of, which I spent (and still spend) a lot of time making sure it's tagged correctly.

Correctly is an interest concept here, actually. The way that tagging is handled in music files is a mess. A huge mess. Leaving aside the issues of normalisation, which I'll cover later, there is no unified tagging format, no unified set of tagging fields. And, for once, this isn't even really an issue of multiple conflicting big standards, just that no standard was ever that popular.

So, what makes the most sense as a way to go about it. If we abstract away from the how data is stored in the individual files, what we're almost always going to want is analogous to a database of the data - which is actually how most music players treat the data overall. However, we end up with having to store it back in the files at some point, so each file must keep its own copy of data that is logically shared - such as the details of the album it's on.

This post is just an introduction to how I manage and use my own music library. Asides from the initial importing of music, almost all the work is done using foobar2000, a prayers that Windows File Sharing / Samba are both fully featured1. foobar has a rather powerful text processing system built-in2, which is used to do a large amount of the magic.

At this point, I'm just going to point to the gist where I keep a copy of my configuration strings, and leave you with the list of tags that I use in files, as I have them sorted in foobar. I'm planning to go in an explain the existence of many in some detail soon but, if you're impatient, or want to ask about one you don't think I'll cover, drop us a comment!

Displayed NameTag Name3
Track TitleTITLE
SubTitleSUBTITLE
Artist NameARTIST
Album TitleALBUM
CompostitionCOMPOSITION
DateDATE
GenreGENRE
ComposerCOMPOSER
PerformerPERFORMER
ConductorCONDUCTOR
FeaturingFEATURING
ProducerPRODUCER
Album ArtistALBUM ARTIST
PublisherPUBLISHER
Release TypeRELEASE_TYPE
Track NumberTRACKNUMBER
Total TracksTOTALTRACKS
Disc NumberDISCNUMBER
Disc TitleSET SUBTITLE
Total DiscsTOTALDISCS
CommentCOMMENT
Sort:ArtistARTISTSORT
Sort:AlbumALBUMSORT
Sort:Album ArtistALBUMARTISTSORT
Media:ASINASIN
Media:Catalogue NumberCATALOGNUMBER
MB:TrackMUSICBRAINZ_TRACKID
MB:ArtistMUSICBRAINZ_ARTISTID
MB:AlbumMUSICBRAINZ_ALBUMID
MB:Album ArtistMUSICBRAINZ_ALBUMARTISTID
MD:PUIDMUSICIP_PUID
Latin:TitleTITLE_LATIN
English:TitleTITLE_EN
Flag:CompilationCOMPILATION
Flag:LiveLIVE
Flag:InstrumentalINSTRUMENTAL
Flag:Split AlbumSPLIT
Flag:DemoDEMO
Note:VersionVERSION
Note:MixMIX
Note:RemixREMIX
Note:EditEDIT
Note:TakeTAKE
Note:Take NumberTAKE_NO
Note:FestivalFESTIVAL
Note:Accurate Rip ResultACCURATERIP_CONFIDENCE
Lyrics:UnsyncedUNSYNCED LYRICS
Lyrics:LRC SyncedLYRICS
  1. 1 Which they really do appear to be
  2. 2 Foobar2000: Title Formatting Reference
  3. 3 foobar does go on and convert some of these to 'traditional' values - for example, %album artist% is actually written to %band%