Browsed by
Category: Blog

The pull of MusicBrainz contributing

The pull of MusicBrainz contributing

MusicBrainz contributors tend to be quite… thorough sorts of folks. Lets take a look at what I’ve been up to over the course of the past few days.

Day 1

I’ve worked on a few Picard patches recently, including one that allows tagger script to access metadata from loaded files, and another that saves MusicBrainz track IDs to files. In the interest of giving these a thorough workout, I loaded my entire music library into Picard and went through album-by-album, reviewing the changes that Picard was going to apply and saving if the changes looked good.

Now, it’s been a few months since I’ve last done this, and the metadata in my collection is fairly out of date. There’s a fair number of changes being made to my files, so I’m making a few tweaks as I go – selecting the correct edition of a few albums which have gotten newly added data, and keeping an eye out for any “bad” edits that I may have missed.

Along the way, I notice that one of the CardCaptor Sakura soundtrack albums doesn’t have a catalog number or barcode. “An easy fix!” I think, as I go to look up the release in the MINC database, which is run by the Japanese music industry and has pretty comprehensive details on major label releases from the past 25 years or so.

Naturally, the soundtracks are also missing ISRCs, which I add, and are missing works, which I also add. I manage to finish adding these details to the first 3 CardCaptor Sakura albums before heading off to bed.

Day 2

Along the way while editing the soundtrack albums, I had noticed that the data for 丹下桜 (Tange Sakura) was a bit of a mess. I had left a tab open on her page to remind me to take a look later – and since it is now later, I take a look. A good place to start when cleaning up an artist is always recording merges. There’s usually a few fairly obvious ones: recordings off pseudo-releases that should be merged with the corresponding ones from the real releases, recordings off compilations that should be merged with the ones from the original releases.

Next I take a quick look at her works page, and… it’s practically empty. (And also has a duplicate, which I go ahead and merge.) So I open up an album in the release editor, and start looking up work info. (For Japanese releases in this genre, cross-referencing Wikipedia, VGMdb, and the MINC database will give very comprehensive information.)

Out of curiosity, I start following links in the MINC database to see what other releases the songs I’m looking at have been released on – and I find out that 丹下桜’s is far, far from complete.

By some time very early in the next morning, I have managed to put something like 1 compilation, 2 albums, and 3 or 4 singles into their rightful place on MusicBrainz, all complete with crosslinked recording and work information.

Day 3

There hasn’t really been any new revelations on this day. I simply continue to fill in 丹下桜’s discography by following links to see where else particular songs have appeared. By the end of the day, I’ve added another 2 albums, 1 mini-album, 5 singles, and 2 compilations. The number of tabs I have open containing things to look at has been going down steadily – and with each release, I find more and more recordings that I can reuse, or works that are already present in the database. Things are going well!

Perhaps one more day and I can finish adding works to the 4th CardCaptor Sakura soundtrack (and maybe the movie soundtrack and some of the compilations too).

I wonder if I’ll manage to ever finish retagging my music collection in Picard like I had originally intended.

Windows 8 Benchmarking Timing?

Windows 8 Benchmarking Timing?

It’s kind of curious that there’s a bit of a ruckus going on with regards to benchmarking accuracy on Windows 8. From what I’ve heard, the actual cause of the inaccuracy is quite simple:

Windows 8 appears to use the processor’s TSC as a timing source on modern processors. There is absolutely nothing wrong with this: it provides a very fast high resolution timing source as long as the TSC on the processor runs constantly and at the same rate. Modern Intel processors set CPUID bits that indicate this to be the case (nonstop_tsc and constant_tsc). Linux has supported using the TSC for timing for several releases, with no issues.

The only catch is that to turn the TSC into a clock source, it has to be calibrated against an external clock. Linux does this once at boot, calculating the value based on the processor’s reported frequency and double-checking against a realtime clock. Presumably Windows 8 does something similar.

The problem with the benchmarks comes in only on overclocked (or underclocked) systems where the clock speed of the processor is changed while the system is running, using for example a utility provided by the motherboard manufacturer. These utilities usually change the base clock rate that the processor is using as a reference. The key point: This changes the speed at which the TSC runs. And the utilities don’t bother telling the operating system to recalibrate the clock; presumably there is no standard API to do so.

So, what can be done? I don’t know. But if motherboard manufacturers want to push in-OS overclocking solutions, they’re presumably going to have to pressure Microsoft into offering an API to tell the Windows timesource to recalibrate the TSC clock, or even just tell Windows to switch to an older, less performant timing mechanism.

Migrated to WordPress

Migrated to WordPress

So, my site is now looking a little different from how it used to. I’ve actually changed how I’m hosting the service, completely. My original site was on Google Sites via my Google Apps account, but I’ve never really been satisfied with Google Sites and the limited control that was offered. So I took the plunge and got myself a “Droplet” on DigitalOcean, and installed WordPress.

The site may look different, but barring a couple of articles that I haven’t migrated yet (in particular, a couple of my old Anime Tierlist posts are still missing for now), all of the links from my previous site should still be active – either at the same location, or with a redirect. Please let me know if that’s not the case!

For the time being, my old Google Sites page will remain operational, but it will go away once I’m sure all content has been moved here.

Network UPS Tools (nut) and systemd

Network UPS Tools (nut) and systemd

Thanks to the Fedora developers, nut does actually ship some unit files for systemd. Unfortunately, those unit files provide a somewhat minimal functionality, with fairly fixed startup order and without taking advantage of systemd’s unit activation features. This caused some problems when I was building my new server a while back. This new machine is quite wicked fast with a quad-core IVB and an SSD—so fast, in fact, that systemd was starting nut’s UPS driver before the UPS itself was probed on the USB bus. As a result, startup failed quite badly, and it didn’t automatically recover.

So, obviously, we have to delay the startup of the nut driver until the USB device has been probed. But what about the other services? As it turns out, nut-server(upsd) and nut-monitor(upsmon) are actually perfectly happy to start up in any order with no more than a few warning messages in the logs as they wait for the other services to become available. So lets simplify the unit files for those. First, /etc/systemd/system/nut-server.service:

Description=Network UPS Tools - power devices information server



If you have configured upsd to listen to a particular network interface or on a particular network address (in upsd.conf) it almost certainly needs the interface to be configured first; you should add in

Now, we can tweak the unit file for the monitoring process: /etc/systemd/system/nut-monitor.service:

Description=Network UPS Tools - power device monitor and shutdown controller



I’ve left in the After=nut-server.service for only one reason: To reduce the warning messages in the log output when starting both upsd and upsmon on the same system. It’s not strictly required.

One thing to double-check: Ensure that the nut packages on your system have installed the file /usr/lib/systemd/system-shutdown/nutshutdown. This file doesn’t need any modifications, but it’s required to handle emergency poweroffs and test reboots correctly. It should look something like this, and it must be executable:

/usr/sbin/upsmon -K >/dev/null 2>&1 && /usr/sbin/upsdrvctl shutdown

Now for the fun bit; handling starting up the nut driver for the USB UPS automatically once it’s been probed by the kernel. Ideally, we want to make this independent of things like which USB port it happens to be plugged into—this means creating a device file symlink with an appropriate stable name. Lets see what we have available…

# udevadm info --attribute-walk --name /dev/bus/usb/003/003

  looking at device '/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1':
    ATTR{serial}=="4B1111P37995  "
    ATTR{version}==" 1.10"
    ATTR{product}=="Back-UPS ES 550 FW:843.K2 .D USB FW:K2 "

I’ve stripped out a fair bit of the output, but as you can see we have some things to work with. The idVendor and idProduct will identify the device as a UPS, and the serial number will give a nice unique id for this UPS. Lets write a udev rule! I stuck it into the file /etc/udev/rules.d/53-nut-usbups-systemd.rules

ACTION!="add|change", GOTO="nut-usbups-systemd_rules_end"
SUBSYSTEM=="usb_device", GOTO="nut-usbups-systemd_rules_real"
SUBSYSTEM=="usb", GOTO="nut-usbups-systemd_rules_real"
SUBSYSTEM!="usb", GOTO="nut-usbups-systemd_rules_end"


ATTR{idVendor}=="051d", ATTR{idProduct}=="0002", TAG+="systemd", SYMLINK+="ups/$attr{serial}"


With this, my UPS is now available with device file /dev/ups/4B1111P37995. And since I’ve tagged it with “systemd”, we will be able hook it up to our systemd unit. In order to keep things matching up, I defined the driver in my ups.conf as follows:

        driver = usbhid-ups
        port = auto
        serial = "4B1111P37995"

Ok, lets go and write the systemd unit file to start up the driver for my “apc” UPS device. I’m going to make use of another cool systemd feature here, template unit files and instances. Create a unit file named nut-driver@.service, with the following content:

Description=Network UPS Tools - power device driver controller

ExecStart=/usr/sbin/upsdrvctl start %i
ExecStop=/usr/sbin/upsdrvctl stop %i

So far, so good! Now here’s the clever bit. Right now, systemd is exposing a unit for the device, but it’s using the name sys-devices-pci0000:00-0000:00:1a.0-usb3-3\x2d1-3\x2d1.1.device which is not only very ugly, but it’s also dependent on the usb path and port probe order. Lets create a unit with our new device name, in the file /etc/systemd/system/dev-ups-4B1111P37995.device:

Description=APC Back-UPS ES 550_FW

You don’t actually need any more in the file; systemd will handle hooking it up to the appropriate real device automatically. But now we can hook up our unit file to be automatically started when the ups becomes available:

# mkdir /etc/systemd/system/dev-ups-4B1111P37995.device.wants
# ln -s ../nut-driver@.service /etc/systemd/system/dev-ups-4B1111P37995.device.wants/nut-driver@apc.service

Note that in the symlink that was created, I’ve added the string “apc” after the @ sign. When the unit is started, this will be substituted for the %i in the nut-driver@ template unit file. This will cause the upsdrvctl command to look for the driver named “apc” in ups.conf, thus completing the chain and starting the the appropriate driver.

And now my UPS drivers reliably start, even when my computer can boot faster than USB can probe.

The unfortunate part is that a lot of this work is fairly system-specific. I’m not sure that it is all suitable for use in the upstream nut package, due to the customization required. I’d appreciate any comments or thoughts.

No More Google Reader: Part 2, The Old Reader

No More Google Reader: Part 2, The Old Reader

This project has actually been around for quite a while now; the name comes from it being a clone of “the old Google Reader”, prior to the removal of the social features. As I mentioned in the introduction, I never actually used those features—so we’ll just see how it goes as a RSS reader application.

Signup is pretty easy—you can just log in through your Google or Facebook accounts. Transferring your feed selection from Google Reader to The Old Reader isn’t as seamless as Feedly, however: You have to export your feeds via Google Takeout and then upload them to The Old Reader.

I’m not off to a great start, though: “There are 35171 users in the import queue ahead of you.” The service has been very heavily hit with the sudden influx of users migrating away from Google Reader. They do load up a Trending feed that lets me go through the user interface immediately:

The Old Reader

And, well, it does pretty much exactly what I want. Full article views and show only unread are supported; it even defaults to my preferred ‘oldest first’ on the All Items view.

There are minor quirks, of course. One of the happiest days of my Google Reader usage was when I finally figured out how to hide the sidebar (see the screenshot in the introduction). And The Old Reader brings the sidebar back, in full unremovable glory. I don’t really mind the space lost; the article page is big enough. The real problem is simply that if the mouse cursor is over the sidebar, the scroll-wheel on my mouse won’t scroll the page!

If I could hide the sidebar, The Old Reader would be perfect. As it is, it’s very good. One question is left: will they recover from the influx of Google Reader users and get the feed refreshes back up to speed? I hope they do.

No More Google Reader: Part 1, Feedly

No More Google Reader: Part 1, Feedly

Feedly is the first in the list of cloud RSS reader software that I’m taking a look at as a replacement for Google Reader (see the Introduction for the index of all the parts.)

Somewhat ironically, Feedly might be at least indirectly responsible for Google Reader’s shutdown. It’s been around for quite a while, but Feedly doesn’t actually run its own RSS aggregator. Instead, it’s simply a front end that accesses your feeds in Google Reader via an undocumented and apparently private API. They have recently announced that they are writing their own RSS aggregator backend, and will have it deployed in time to seamlessly switch over when Google turns off Reader.

A curious result of their use of the private Google Reader API is that Feedly isn’t actually an application hosted on a web page. Instead, it requires installation into your browser as an extension, available for Firefox and Chrome. This is an issue to me, as I regularly switch browsers—and interesting hardware like my ebook reader simply can’t use it at all.

At first glance, it certainly is prettier than Google Reader ever was:


And it is quite full featured, and can be configured to replicate my preferred view from Google Reader: only show unread, with oldest messages first. There’s minor bugs in various places—e.g. if I have no unread articles, it will instead show a seemingly random set of previously read articles—but they seem responsive to user feedback. They haven’t switched away from the Google Reader backend yet, so how well they will scale is still an unknown.

The layout at the moment is somewhat annoying; the narrow columns cause some images—comics in particular—to be rescaled at smaller than original size, making text difficult to read. I suspect that advertising will grow at some point, although they may offer a paid subscription service in the future. One curious thing is that they hope to open up their backend (which has a Google Reader compatible API) to allow other services to use it!

Feedly is nice, but the requirement for browser extensions and special mobile applications is somewhat limiting. I’m still searching for the perfect Google Reader replacement…

No More Google Reader: Introduction

No More Google Reader: Introduction

Like many other people online, I’m a heavy user of the Google Reader application now left to find some replacement for this aggregator of interesting news that I’ve subscribed to. I know that Reader had some social features at some point, but I’ve never actually used them. There was a single thing that I valued about Reader: it allowed me to leave off checking my feeds on one computer, and resume later on a different box. It’s a “cloud-based” RSS reader, to use the modern parlance.

Since Google has announced that they’re cutting the service off, I’m now looking for an alternative. But first, let’s take a look at what I have right now:

Google Reader

There’s my feed. I use Google Reader in its most simple mode; a continuous list of entries ordered from oldest to newest with previously-read entries hidden and with article content inline. As I scroll past each message, it’s automatically marked as read; and I use the “Keep unread” option to mark things that I pass by now, but want to take a look at when I have more time.

While much of this could be gotten via social media, the experience is completely different. Social Media is constantly running in a ”push” stream. It always shows you the newest thing first, popping that down and out of view as soon as something else comes in. Social media is limited to tiny sound bite clips. With the RSS experience I use, it’s the other way around; things wait for me to come view them, and I see everything come in the order that it happened. (Particularly important if I, say, don’t check one day and miss a strip from a daily comic!) The longer form allows you to get at minimum a detailed introduction into what is linked; and many sites will inline entire articles and full-sized images so you can browse without even opening another tab.

I’m sure lots of other services are popping up now with alternatives to the soon-to-be-gone Google Reader. I’m trying a few of them, and I’ll let you know how they go, in these follow-up articles:

A MusicBrainz report on Pseudo-Releases

A MusicBrainz report on Pseudo-Releases

As an implementation of support for translating or transliterating the tracklists on foreign releases, MusicBrainz has something called “Pseudo-Releases.” They are meant to be used alongside the database entry for the original, real release to contain alternate tracklists.

Unfortunately, many MusicBrainz users weren’t quite sure on when the “Pseudo-Release” status should be used, and incorrectly set it instead of the correct status like “Official”, “Bootleg”, or “Other” on some releases. And a few translated tracklists have the status set correctly—but aren’t linked back to the original version of the release.

In order to help find and fix these issues in the database, I’ve created a new report: “pseudo-releases without transl*tion relationships”, in code review now. It looks pretty sweet:

But 2261 releases to fix up means there’s a ways to go.

MusicBrainz contributions – Search result and stats improvements.

MusicBrainz contributions – Search result and stats improvements.

I’m pleased to see that two of my MusicBrainz contributions have been merged in time for the 2012-01-26 server update, and are now live on the site!

The first change isn’t exactly visible to the naked eye, but it should hopefully provide improvements in the Google Search result listings for MusicBrainz artist pages by providing a nicely formatted <meta description> tag to help Google (and other search engines, of course) list a more relevant “snippit” of the page in the search results.

The second change is in a little-known area of the site, the timeline statistics graph. I talk about this a bit more on my Google+ post, but it’s nice to see the feature live.

Music in Review, 2011

Music in Review, 2011

So, what did I spend 2011 listening to? As it turns out, quite a lot. This is the first year that I’ve had a portable music player capable of holding (nearly) my entire music collection, and I have a habit of listening to everything on shuffle. That said, a few things managed to stand out. My “top 10” in reverse order, from my listening statistics:

Tied for 8th place

Xbox 360 Game &quot;Steins; Gate&quot; Intro Theme &quot;Sky Kuraddo no Kansokusha&quot; / Kanako Ito


The opening theme song from the Xbox 360 Steins;Gate game, this song was actually released back in 2009. Since I watched the Chaos;Head anime, I’ve been a fan of いとうかなこ, and this is my favourite song of hers from the Steins;Gate series.

&quot;Macross Frontier The Movie 1st: The False Songstress&quot; Insert Song: Pink Monsoon / Sheryl Nome starring May'n

starring May’npink monsoon

Despite never having watched any of the Macross anime series, I have heard the music for it. This is helped along by Macross Frontier having music composed by 菅野よう子 (one of my favourite composers), including this powerful song which was used as the character’s debut single within the movie.

TV Anime Blassreiter New Outro Theme: A Wish For The Stars / Kanako Ito


The second song by いとうかなこ that made my top 10 list, this one’s a little unusual. It’s the b-side to the single “A Wish For The Stars”, itself a very good song—but this is one of those b-sides that is amazingly awesome yet destined to disappear into the mists of time.

binaria – sonido


binaria, the group featuring やなぎなぎ, Annabel, and yoshihisa nagao, is an independent group with a particular soft style and harmonizing vocals. They have a lot of good songs, and this one in particular rose to the top for me this year.

A Best 2 -White- / Ayumi Hamasaki


One of the few people on this list who is a legitimate “big” pop star in Japan. I didn’t do anything in particular to pick this song out, like I did with some of the others on this list—it just naturally rose up the ranks on its own merits as a good song.

Tied for 6th place

TV Anime "Yoku Wakaru Gendai Maho" Intro Theme: programing for non-fiction / Natsuko Aso

Programming for non-fiction

From a single released prior to her bigger breakout songs, this served as the opening theme to the not-widely-acclaimed anime series よくわかる現代魔法 (“Modern Magic Made Simple”). I prefer it to her more recent works, with its softer electronic style that makes better use of her voice.

Primary – Rotate


I seem to remember this one from last year—just goes to show that good songs never die, right? Although yuiko has come out with several new songs and albums since this one was released way back in 2007, Discolor—with its simple pop-rock style and strong musical hook—has consistently remained one of my favourite songs. And to think I originally got it on a whim…

Tied for 4th place



With vocals by Tsubaki and a really catchy beat, leaving this song on repeat a few times was surely responsible for propelling this song near the top of my list, as it was released almost exactly one year ago. A Touhou arrange song, although as the years go by it sometimes gets harder and harder to tell where the “Touhou” is in them… but never mind, it’s a fun song.

Fuwafuwa / Yui Makino


In her first single after switching labels to Epic Records, her producers apparently wanted to try something different from the soft and slow songs that 牧野由依 had become known for. As a result, this song is catchy and up-beat and shows a side of 牧野由依 that we hadn’t seen before. Also, a sweet piano intro.

In 3rd place

binaria second mini album: forma


I’ve never been quite sure how to describe the style of binaria’s songs, but this one fits in with them as being just as… whatever it is… as the rest of them. A very minimal arrangement allows the vocal harmonization between やなぎなぎ and Annabel to be the star of the song.

Tied for 1st place

It almost feels like cheating a bit, with two first-place songs; but based on my listening habits, that’s exactly what I have right now. Let’s take a look at what we have:

EastNewSound – Felsic Mirage


Like PiPiPiPARU, this is another song with an addictive, catchy beat and vocals by Tsubaki. It’s the older of the two EastNewSound songs that made this list, which both share a few similarities—including arrange by crouka. But when comparing two great songs one usually comes out on top, and this year, this was the song that I listened to slightly more often.

IOSYS – 東方銀晶天獄

IOSYSstar river

Come to think of it, this song actually appeared in the same spot on this list last year, having been released back in March, 2010. Somehow it has managed to retain that #1 spot over an entire year on the strengths of its arrangement, including an awesome piano melody and strong vocals. At the end of last year, IOSYS actually released an updated version STAR RIVER (D.watt alternative), but it didn’t make a dent in the listings—the lyrics were translated into English, and the vocalist wasn’t as strong in that language, not to mention that it lost the piano intro!

The last word

Yes, I know there are 12 songs in my “top 10”. But it really didn’t seem right to arbitrarily exclude two of the songs from the #8 spot.

Anyways, I guess that’s really a summary of what music I liked this year. Of course, I listened to a lot of music over the course of the year, and most of it—by far—was nowhere near this list. The spread was actually pretty small! My #1 tracks were only listened to a total of 19 times, while the #8 tracks only played 9 times. Which is really a side-effect of playing a lot of music on shuffle; I hear most songs just occasionally, unless I actively seek them out.

I do seem to be rather partial to female Japanese vocalists, though…