Drum machine

How to write a simple drum machine that runs in the browser.


Click the buttons to turn the beats on or off.

Video of Mary livecoding the drum machine

Annotated source code

The heavily annotated source code is 114 lines long.

Getting the code

Clone it from GitHub:
$ git clone git@github.com:maryrosecook/drum-machine.git


The code is open source, under the MIT licence.