# Making Music with the Pi
by Seth Kenlon

I'm a strong believer that art can be created without expensive gear. The world of electronic music has traditionally been a fairly expensive venture, whether you're paying for expensive hardware or software, the upfront investment for the tools you need to even start making music can be prohibitive. Luckily, there are plenty of free apps and open source software that generally enables people to get creative on the devices we mostly have anyway, but I wanted to see how far the famously inexpensive Raspberry Pi could be pushed as a music-making machine.

Turns out, it can be quite an amazing little sequencer, as long as you know what tools to use, and aren't afraid to learn a little something new.


## The Setup

I wanted to aim as low as possible, so I did all my work on a [Raspberry Pi v1 model B](https://www.raspberrypi.org/products/model-b) with 512 mb RAM. I do have access to a model A+, but it only has one USB port and I thought I would need two (one for a mouse, one for a keyboard) but I don't have a powered USB hub. As it turns out, I didn't end up needing a mouse, strictly speaking, so in the end I did do a little testing on the A+, so I'll discuss significant differences in performance when applicable.

The first salient point about making music on a Pi is probably obvious but it's worth stating explicitly: keep the overhead for the rest of the system as low as possible. If you're familiar with Fluxbox or Openbox or even Ratpoison, those may the non-desktops to go with, because there's nothing to them. If you're not familiar with that style of interface, then go with LXDE (which is usually the default desktop on Pi distributions, anyway).

Electronic music, traditionally, consists of two components:

1. Sequencer: a programme that keeps track of what sound will play and when
2. Synths: a programme that makes sound

Linux offers a *lot* of both, so the first order of business is to look at the options out there, and try them out on the Pi.


## Lightweight ALSA Apps

At first, I looked at a few of the "usual" suspects for low-spec sound work; I loaded up a few modular components and tested them out. I found straight away that JACK on a Pi was not practical, and since many Linux sound applications expect JACK, my options were more limited than what I am used to on my [Slackware](http://slackware.com) [workstation](http://slackermedia.ml).

I eventually settled on the modular [Seq24](http://www.filter24.org/seq24/about.html) MIDI sequencer to provide a "piano roll" editing interface for composition, along with [AMsynth](http://www.linuxsynths.com/amSynthdemos/amsynth.html) as the synth to provide sounds. I sent signals from Seq24 to ALSA's inbuilt MIDI-In to trigger AMSynth. No JACK required, and a fairly lightweight solution.

Theoretically.

After an afternoon of trying out my simple Pi audio workstation, I found that it only worked as a proof-of-concept. Once I got serious about making music on it, rather than just making loops for fun, I found that it ran very slow even with just a simple sequence, and a lot worse when I added more synths into the mix. It was fun to noodle around with, but it definitely wasn't something I'd take on the road (and by "road", I actually mean "studio") to perform or to an event to teach people about computer music.


## Milkytracker

Music wasn't always made on fast multi-core computers with gigabytes of RAM. In fact, music used to be (and still is, in some circles) made on rack units that used floppy disk drives and MIDI cables. In other words, instead of trying to use lightweight versions of modern music software, the ultimate answer turns out to be a grand old tradition of electronic music: the tracker.

A proper history of trackers is out of scope for this article, so if you're interested, look up information on the original trackers like Fast Tracker and Pro Tracker. For now, suffice it to say that the concept of trackers has been around since at least the early 90s (arguably earlier, depending on how you view some of the earlier hardware interfaces on some drum machines and sample sequencers, and there's always been enough of a following to justify a healthy market of trackers ever since.

The one I chose to use, of the three (Milky, Schism, and Sound) that are familiar to me, is [Milkytracker](http://www.milkytracker.org). Milkytracker was GPL'd in 2008, and it seeks to emulate one of the original FastTracker