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.
The enclosure is a wooden box 16" x 12" x 2.5" in dimensions. The top and bottom are composed of medium-density fiberboard, 1/4" thick. The sides are cut from lengths of 2" x 1" common wood. All very inexpensive stuff. A handsaw, an electric drill, and a hack saw (for the tighter spaces) were sufficient for 99% of the woodworking. I would quickly realize that the dimensions of the enclosure were very optimistic in terms of what I could fit inside it.
The keyboard was acquired by taking apart a Korg microKEY MIDI controller. I don't know another practical way to get a keyboard with USB out. I used consumer parts throughout this project, including here. The upsides are ease of interconnectivity, reasonable assurance of quality, and availability. The big downside is that it's more expensive than finding suppliers for the individual parts. But this isn't a factory, so it's not likely that sourcing components for a single unit would have been cost effective.
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.