New Top

All Products By Category

Build a Hackable Bytebeat Player at the RI Mini Maker Faire


The Rhode Island Mini Maker Faire is this Saturday, featuring dozens of makers alongside the usual music and shenanigans of AS220’s annual Foo Fest. Each year we run a soldering workshop as part of the Faire; this year we’ll be making a hackable bytebeat player from Modern Device, the Byteseeker Junior.

Download the assembly instructions here.

The Byteseeker is an Arduino-variation with a headphone jack, two pots and two buttons based on the Real Bare Bones Board. The code we’ll be using at the Faire is kind of like an iPod Shuffle for Bytebeat “songs.”

What’s Bytebeat you ask? It’s a genre of 8-bit beatmaking that tweezes complex repeating patterns of sound out of one line math expressions. A more in-depth description may be found in this blog post, but here’s a quick video to give you an idea of what the thing sounds like:

Byteseeker Jr. from Shawn Wallace on Vimeo.

What is Bytebeat?

The idea is described in the most detail by Ville-Matias Heikkilä in the paper Discovering novel computer music techniques by exploring the space of short computer programs. The basic idea is to create a one-liner C program that increments a variable t, then evaluates an expression over and over again.

The program is compiled and the resulting numbers are redirected to the /dev/dsp device (on a Unix-like system). You’re essentially sending a raw stream of numbers directly to your sound card, which by default will interpret this data as an 8-bit mono PCM (pulse code modulation) signal, at an 8kHz sample rate. (It turns out these values happen to work well with 8-bit microcontrollers as well.) So the low byte of the evaluated expression is the amplitude of the audio signal for that particular sample.

The best way to wrap your head around the idea is to visit @greggman’s HTML5 Bytebeat Live Coding Visualizer. You can plug any of these example expressions into that page and get instant feedback.


The expression in the C code shown above (just the variable t) will generate a sawtooth wave at around 31 Hz. That’s because 8000/256 = 31-ish. In other words, when the expression is evaluated at 8kHz, the low byte will turn over to 0 about 31 times a second. Multiply t by a number and you’ll get a saw tooth wave at a higher frequency:

You’ll start to see some aliasing effects as the multipliers get larger:

It’s the aliasing effects that make things interesting. Other bitwise operators can be used as well:

or bitwise logic:

You’ll quickly see complex behavior emerging from evaluating these expressions; it’s kind of like looking at a cellular automata through a small (8 bit) window.

The Byteseeker adds a couple of parameters to the expression, which can be changed using the A and B potentiometers. The previous and next buttons will cycle through the various expressions. Here are a few of the expressions in the current version of the code:

Some of the beats on the device are original work, but most were adapted from this master list of beats.

How Does It Work?

The Byteseeker is a simple Arduino-variant microcontroller and can be programmed using the Arduino IDE, along with an FTDI cable or a USB-BUB adapter.

The mini headphone jack is attached to pin 11 (in Arduino nomenclature) of the microcontroller, which generates a PWM signal to simulate an analog audio waveform. One of the timers on the Atmega is set up to fire 8000 times a second, during which the variable t is incremented and the next value of the signal is calculated from the expression. The buttons and potentiometers are polled, and the state and a and b parameters are changed accordingly.

Here’s the code:

Here’s the schematic:


The Eagle schematic and board files are open and available as well.

Other Bytebeat Players

Start with the HTML5 visualizer mentioned above. There are also a couple of apps for the iPad (and iPhone?) GlitchMachine and Bitwiz. Another hardware solution is the Noiseplug