Schroeder

DIY Electronic Piano using ChromeOS

The goal of this project is to create a physical musical instrument that is powered by web—as in world wide web—technologies. The best case scenario would be that you plug the keyboard in, wait for it to boot up, and then you can play the keyboard just like a piano.

Ultimately, there are still some kinks to work out, especially around making the underlying technology transparent to the musician. That said, below is a collection of photos and information that I hope will explain how Schroeder works, and how you could create a web-powered instrument yourself.

Just to be really clear, the software consists of an HTML web page, JavaScript code, and some audio files. It's literally a website. However, because I didn't want the instrument to require internet access, I packaged the code into a Chrome web app. This allows the code to be installed and run like a regular program, whether on a macbook or something lighter weight that runs ChromeOS.

The reason that it's possible to relatively easily make music software using web technologies is the Web Audio API, an API that has been in development for several years. It's present in all the major browsers.

The fundamental action that the software performs is converting MIDI input from the keyboard into sound. While a synthesizer could accomplish this, I wanted to simulate the Wurlitzer electric keyboard sound. To do that, I sampled the best software sampler of this keyboard available, Native Instruments' Scarbee A-200. While the Scarbee has many velocity layers and individual samples for each key, I only sampled 7 velocity layers and eight or so keys across the keyboard.

When a key is struck, the code looks for the closest available sample match in terms of velocity and pitch. It then adjusts the pitch of the sample to match the desired note and plays the sample. For example, say that we sampled middle C (C4), and someone strikes D4, which we don't have sampled. We need to retrieve the C4 sample at the correct velocity and adjust its playback rate to 293.66 / 261.63, or 1.1224.... This lets us seemingly play notes that we haven't got literal samples for, and it works well on keyboards provided that you don't need to adjust the pitch too far.

Down the line I would like to sample a live Wurlitzer, at which point I could share those samples and the entirety of the code that runs Schroeder.

The project slumbered for over a year. In January, 2015, IRCAM held the first Web Audio Conference.