Maker creates a capacitive touch piano out of bananas, using an Arduino and Clojure with Overtone.
If you’ve ever attended a Maker Faire in the past, then you’re well aware that the banana piano is a pretty basic hack. Think Makey Makey, where an array of ordinary fruit is transformed into a magical touch sensor, emitting songs like “Chopsticks,” as onlookers are left in awe.
“There’s a couple of ways we can make bananas act as tangents, one of them is to use the bananas as capacitive touch sensors. Using a nice little hack it’s possible to do this using regular digital pins on a microcontroller,” Eikeland writes.
“The number of cycles needed before the pin goes high will depend on the capacitance of whatever connected to the pin. A banana might require 8 cycles before the pin goes high, while a touched banana might require 15.”
As the Maker explains, he was able to connect a number of bananas to an Arduino Nano (ATmega328), iterate over the pieces of fruit, read their cycle count before banana-pin went high, and then transmit a message via a serial connection to indicate the pin number if the cycle count was above a given threshold.
Meanwhile, Overtone serves as a client to the SuperCollider synthesis server. This language interpreter runs in a cross-platform IDE and communicates via Open Sound Control with one or more synthesis servers. In essence, as Hackaday’s Eric Evenchick puts it, “Overtone simply tells Supercollider what to do, letting you easily program sounds in Clojure.”
Whenever the Maker taps the banana, the ATmega328 based board sends a character from 0 to 7, which is relayed to Clojure using a serial-port library. The program then maps the banana to a musical note and triggers that note on Overtone’s built-in piano sampler. And presto! Music is played.
Head over to the Maker’s official project page here, while also watching it in action below!