Tuesday, June 13, 2017

Capacitive Touch Janko Keyboard for Moog Werkstatt

Published on Feb 13, 2017 Ben Bradley

"This is a Janko-layout touch keyboard I made at the 2017 Moog Hackathon at Georgia Tech, February 10-12. I'm playing a few classic bass and melody lines from popular and classic tunes. I only have one octave (13 notes) connected so far.

The capacitive touch sensors use MPR121 capacitive-touch chips, on breakout boards from Adafruit (Moog Hackathon sponsor Sparkfun makes a similar board for the same chip). The example code from Adafruit was modified to read four boards (using the Adafruit library and making four sensor objects and initializing each to one of the four I2C addresses is remarkably easy for anyone with moderate familiarity with C++), and code was written to send a gate (key down) signal to the Werkstatt, and to write a binary representation of the pressed key (low note priority) to an Arduino port connected to a precision R-2R ladder to generate the voltage for the VCO exponential input.

The capacitive touch sensors can be used to make a touch keyboard with any configuration, not just the Janko. With these sensors it's remarkably easy to make a functioning electronic musical keyboard, as no mechanical switches or moving parts are needed. The feeling is at least as responsive as a "real" keyboard, as response to touch and release feels instant as far as I can tell. If anything, there's a "problem" in that if you accidentally, even slightly, touch a key it will sound, whereas with a mechanical keyboard you have to "accidentally" press a key down for it to sound.

A traditional seven-natural-and-five-sharp-keys layout would have been just as easy, but less "interesting." I chose the Janko layout after having read about it for many years (see Paul Vandervoot's piano video "Demonstration of 4-Row Janko Keyboard" - he describes the layout at 4:06). The Janko has, from left to right, six whole steps per octave, thus is one less key wide per octave than the traditional keyboard, so with the same key spacings the Janko octave is a shorter distance. Going up or down diagonally is a half step, so a chromatic scale of all 12 notes is a zig-zag pattern. A major scale is the first three notes in a line (whole steps), diagonally up or down to the next key (a half step), this and the next three keys across (whole steps), and then diagonally again (a half step) to get to the octave key. You can start on any key and the major scale is the same description. This is the remarkable property of the Janko layout, there are very few patterns to memorize for the different scales and chords.

ETA Feb. 18:
Here's a blogpost I just wrote, it includes a schematic diagram and the Arduino source code:

No comments:

Post a Comment