» Fast ID3 tagging
This is solely for my friend saper who was recently telling me how much he loves it when people post snippets of code that they come up with during their everyday lives, even if they are relatively pointless in the grander scheme of things. Well, today I was listening to a few old mp3 files while coding more important stuff and realised that some had no id3 tags, which was a good excuse to put good ol’ PERL and some shell magic to some use to tag them all, fast. Here’s the two-minute script for tagging files based on the filename (note the ‘[trackno] – [title].mp3′ regex). I ran the script twice, once for the trackname and once for the track number (not shown below, is trivial and left as an exercise for the reader). Hope this is useful to someone, although I guess it mostly serves as proof as to how much you can do with one line of PERL/shell scripting magic. Enjoy =)
ls *.mp3 | while read f; do TRACKNAME=`echo "$f" | perl -e '$a = <STDIN>; $a =~ /(\d\d) - (.*).mp3/; print $2;'`; id3 -t "$TRACKNAME" "$f"; done
The Silicon Alley Insider raises an important question, with regard to Radiohead’s testimony against RIAA in a case against a college student: Would Radiohead be able to take that stance if they hadn’t sold millions, “without the protection and promotion of an RIAA that Radiohead now blithely dismisses”?
But while arguing RIAA’s importance with regard to the vast majority of musicians is mildly amusing in its fallacy, the article doesn’t stop there:
We love Radiohead, but we’re not sure if the band realizes they’re superstars, and the normal rules don’t apply to them anymore. The band’s “pay what you want” idea for the In Rainbows album may have been successful, but for every one Radiohead there’s ten thousand would-be rock stars selling CDs out of the trunks of their car (or MP3s on some little-visited web site) and starving.
So, one Radiohead per ten thousand would-be rock stars. Apparently the authors ignore that this is exactly the status quo that the RIAA nurtured in decades past, exactly what the internet, mp3, file sharing and indeed Radiohead’s testimony help change: total control over music promotion, repertoire selection, bias in favour of genres/artists by a few multinational corporations aimed at nothing more than profit maximisation. Put another way: A small minority of artists getting all the exposure [and some of them going bankrupt despite the megacorps' multi-million contracts], while millions more being unable to promote their music, make money, live off it. Those same approaches that have led to a just few hundred artists getting millions and the rest starving. If anything, testifying against the RIAA, especially if you’ve attained superstar status, goes against that. Lastly, Radiohead — whether you like or dislike their music — have proven their artistic integrity as well as their popularity time and again, most certainly without RIAAs help. There’s no doubt that the interests of musicians around the world should be protected; RIAA never did that and most probably never will.
The first fully DRM-less music store is here, offering ‘over 2 million songs’ by EMI and Universal encoded in 256kbit mp3s — the largest unencrypted music downloads offering to date. Although the service is currently in beta, I have a feeling this is going to usher a new era in music downloads and spur competition. Let’s hope more record labels align themselves behind either Amazon’s or Apple’s store. What’s sad, although completely understandable given the very low proliferation of capable devices, is that tracks are using the ageing mp3 format instead of newer and higher quality codecs, such as AAC. Maybe in the future I guess.


