There is something unusual about the following set of Irish tunes.
It turns out that applying technology to Irish traditional music is something of a tradition in itself - there are iPad versions of many of the instruments, there’s an electronic uilleann bagpipes emulator (for practicing silently), and there’s a widely-used tune-identifying search engine called TunePal.
Earlier, I trained a type of machine learning algorithm called an artificial neural network to generate names for Irish music tunes. This kind of algorithm learns by example, so when I gave it a list of 1200 existing Irish tunes, it came up with hilariously plausible examples such as:
Tripping on the Rock
The Rolling Old Man
Thing Mop the Bog
Seat of Slugs
Sailin the Donkey
Trap the Barry Durpers
In part, that’s because there’s lots of very tempting data available. There are huge databases of tens of thousands of tunes, thanks to sites like thesession.org that have been crowdsourcing them for years, or to people who have made public-domain historical collections available - like O'Neill’s, Cobb’s, and Nottingham. What’s more, these tunes are already in an alphanumeric format that’s readily digestible by machine learning, thanks to ABC notation.
For example, here’s thesession.org’s ABC notation and corresponding sheet music for the reel “The Eel in the Sink” (yes, that’s its real name). Note that there’s only a single melody line - no chords or harmony.
T: The Eel In The Sink
e2AB cdec|d2BG dG (3Bcd|eAAB cdef|1 gedg eAAc:|2 gedg eAAe||
a2ea aged|cdef (3gbg fg|a2ea agab|gedg eAAe|
a2ea aged|cdef (3gbg fg|afge fdef|gfgd BAAc||
So, if you give a learning algorithm a bunch of tunes in ABC notation, it has to figure out how to specify a time signature, key, measures, and repeats. There’s also a high-level structure to figure out: tunes usually are made of an A part (here, the first line of the sheet music) and a B part (the rest). Some have a few more parts. Each part is usually 8 measures long. Oh yeah, and the actual melody has to sound good.
And how are the tunes that neural networks generate?
Well, many of them are terrible. Here’s an example posted by irishabc.com showing a tune that doesn’t have the right number of beats in a measure, doesn’t have the right number of measures in the A and B part, and has other weird timing issues, and has a gnarly impossible chord (how do you even play a double-D?).
But it turns out that a neural network can eventually produce tunes that generally obey the rules. With help from a human to fix remaining errors or to tweak parts that just don’t fit, the tunes can sound quite passable. Like the tune in the recording at the beginning of this post (a folk-rnn creation), they can even sound good. I’ve tried that one on my flute, and it fits well, is easy to learn, and even sounds and feels half-familiar, as if it was a tune I’ve heard a few times, or knew how to play once. That’s a good sign.
It’s the human involvement that’s key, though. ABC notation and sheet music don’t capture all the life that traditional Irish musicians add to tunes, the subtleties of ornamentation and variation that mean a simple 16-measure melody can sound completely fresh in the hands of different musicians.
For example, here’s another neural net-generated tune called The Bat in the Hat. A human at irishabc.com probably fixed some errors, maybe composed a bit to improve some weak spots, and certainly added the piano accompaniment. But as-written, it’s still not that appealing. In the video below, the tune is played by a machine that follows the bare-bones notes.
Now here’s The Bat in the Hat played again, this time by me on flute. Notice that I’m constantly doing small variations, adding articulations, changing where I place breaths and pauses. I also made an edit of my own, playing both A and B parts just one time each before repeating the whole tune, making it match the convention of a “single reel”.
And, having learned it and played it, I can definitively say: The Bat in the Hat is a fun tune. It’s interesting in just the right places, a bit unexpected without being confusing, and lends itself well to variation. I like it better than some human-composed tunes I’ve played. If I played this for other musicians and didn’t tell them it originated with a computer, they would probably never know.
So, now what? It’s weird to think that there is a near-infinite supply of quite decent Irish tunes available to anyone who wants to sift through a neural net’s output and spruce up the promising tunes. Just to drive that point home, there’s an “Endless Traditional Music Session” demo which generates and electronically plays tunes for as long as you can stand to listen to them. Judging from the screenshot below, for me it was approximately 18 seconds.
One major reaction from the Irish music community to all this has been unease, and I certainly see why - there are already more Irish tunes out there than a person can learn in a lifetime, and decent tunes are probably fading from the repertoire all the time. Are we now faced with a flood of AI tunes?
Probably not, judging by what’s happened so far. The folk-rnn github has a list of dozens of recordings based on the neural net’s tunes, and they’re mostly experimental mashups and reactions, venturing into other forms and genres. It’s been years since the generation of The Doutlace, The Drunken Pint, and X#6197, and they’re not classics yet.
I might learn the Bat in the Hat and the unnamed reel in that first set (can I call it Thing Mop the Bog?) for the sake of novelty, but I can see that after the first couple of tunes, the novelty of the “generated by a computer!” story wears off. The human-composed tunes tend to have meaningful names, stories, and even sometimes lyrics. Even when I’ve forgotten their names and composers, they’re connected to places I’ve been, or people I learned them from. It’s been fun venturing into the world of generated Irish music, but the most lasting effect of this on me might be a renewed appreciation for the human stories that go along with tunes.
But I still think neural net generated tune names are funny.
Flowers of Wallow
Mrs. Croves of Brone Moloney’s Jig of Brown Ale