I had been subsconsciously aware of a problem for quite a while, but had paid it no real attention: whenever I looked, a lot of my music files seemed to lack proper performer details! The tracks played fine and everything else about them seemed OK, but just no ‘conducted by, orchestra playing is, soprano singing is…’ stuff. I’d noticed it, in a casual sort of way, from time to time… but because you can live without knowing that particular information at your fingertips, I mostly just did.
I had also vaguely registered (erroneously, as it turns out!) that the problem was with a lot of music I remember buying in the 1990s and ripping in the early 2000s, so I put it down to sloppy tagging habits, waaay back before I knew any better. But it wasn’t and isn’t. It is a tale of software shenanigans and garbage programming that really kind of ticks me off, to be frank. So, first: let me show you the problem…
Here is the metadata associated with some Darius Milhaud music files:
You may be able to work out that there are 10 tags (the ‘canonical ten’) and one of them is ‘COMMENT=’ and that this particular tag has no value assigned to it. There is nothing showing on the right-hand side of that particular tag’s equals sign. This music therefore has no performer information associated with it!
Well, assigning data to canonical tags is what my very own CDDT software was designed to do, so let me use that to fix this lack-of-data problem:
So that’s me specifying the conductor and orchestra. If I save that data and re-check the metadata tags associated with these files:
So now, we have a COMMENT tag containing the relevant information. It’s currently showing as tag , but if I save this in CCDT and then re-load it into CCDT and re-display:
…you can see that CCDT tidies tags up as it saves them, so that the COMMENT tag is saved into ‘canonical position’ .
So, now that the data is safely in the COMMENT tag, let’s say that for some reason or other I opened up these music files in a graphical tag editor such as Easytag, a Linux-based tag editor I’ve been using for years to do quick-and-simple tag inspections and the occasional tag ‘touch-up’ when needed, for many years.
Something I’ve always noticed about Easytag at this point, and which you can see happening in that screenshot, is that whenever it opens any of my tagged music files, it has always emboldened their file names in the left-hand panel you see here. Now, it usually uses bold in that panel to indicate that ‘there are unsaved changes that have been made to these files’… but since I’ve literally just opened the files in the program and haven’t changed a thing, I’ve always assumed this to be a ‘quirk’ and nothing more. How wrong I was! As we shall see!!
Anyway, I’ve opened the files in Easytag, just to inspect the data and you can see that it’s all present as CCDT said it should be: the ‘Comment’ tag is there, nicely labelled ‘Comment’, too.
Now, I’ve seen what I needed to see and haven’t typed a thing, so I go to close Easytag down… and this happens:
That is, a pop-up appears warning you that there are unsaved changes and they’ll be lost if you don’t say to ‘Save’ them. Just press [Enter] at this point to make the pop-up go away (as I think a lot of users would tend to do!) and guess what: you’ve just taken the ‘Save’ option!
So let’s say you’ve hit [Enter] without thinking about it much. Let me now immediately re-inspect the files in my own CCDT program:
….and what do we notice? In ‘canonical position’ , we now see a tag called ‘DESCRIPTION’, not ‘COMMENT’. Without really telling us, or explaining why, Easytag has renamed the COMMENT tag so that it is now called DESCRIPTION.
Never mind that its own user interface calls this tag ‘Comment’ in its own right-hand pane. Under-the-hood, Easytag thinks it’s OK to change tag names -and the fact that it had changed them behind the scenes is why it displays the files in bold when they are first opened and declares that there are ‘unsaved changes’ when you go to close the program without having manually changed a thing.
Is the fact that a tag got silently renamed the end of the world? Well, not in-and-of itself, no. It’s not. The music file will play fine; it will display the composer, album and track names properly. Even the embedded album art remains safe. Indeed, even if you inspect the tags in another program, you won’t see any indication of a problem at all:
That’s the Clementine music player’s tag editor, being used to investigate the tags associated with the same music files as before. Note that it still displays the file as having a ‘Comment’, so it’s not particularly fazed by having a differently-named tag supplying the information it wants to display there. It’s reading something now called “DESCRIPTION” and displaying it in something called “Comment”, totally transparently and automatically.
This tells you that a lot of music players will quite happily play these files just fine; they’ll also (usually) allow you to search what is now your DESCRIPTION tag as effectively as they’d previously allow you to search your COMMENT tag. So, functionally, not a lot changes because of Easytag’s sleight-of-hand.
But I wrote a tool a while ago now, called the Dizwell Tag Cleaner (DTC to its friends). If run against a set of previously-tagged music files, it ‘cleans’ their tags up, removing ‘non-canonical’ tags and leaving only the canonical ones behind.
Here’s a little code snippet to explain what it does:
# Fetch existing metadata into variables
COMPOSER=$(metaflac --show-tag=Artist "$f" | sed s/.*=//g)
ARTIST=$(metaflac --show-tag=Artist "$f" | sed s/.*=//g)
ALBUM=$(metaflac --show-tag=Album "$f" | sed s/.*=//g)
TRACKNUMBER=$(metaflac --show-tag=TRACKNUMBER "$f" | sed s/.*=//g)