HOME APPS PROJECTS BLOG ABOUT
SUGARCUBE  
( 2014 )  

The Sugarcube is an extension of the work I've been doing on the monome project. It's an open source, grid-based, standalone MIDI instrument that can be booted up into various musical applications. It communicates with other electronic MIDI instruments and software environments like Ableton and MaxMSP. An Arduino Uno generates all of its MIDI data and drives 16 LEDS, 16 buttons, a 2 axis gyroscope, a 3 axis accelerometer, and two potentiometers. The whole device is powered by a LiPo battery for easy portability. Full build documentation and more information can be found at Instructables. Arduino and MaxMSP code can be found on Github.

The video above shows two MIDI applications that take advantage of the Sugarcube's built in accelerometer and gyroscope. In the first application a single pixel is lit to trigger a MIDI note. When the device is tilted in various directions, the pixel moves around as if it is being affected by gravity, while at the same time triggering MIDI notes along its path. In the second application, up to four pixels bounce against an edge of the device, triggering MIDI notes on each bounce to create complex polyrhythms. The direction and speed of the bounces are dictated by the direction and angle of tilt. The height of each pixel's bounce (and subsequently, the rhythm of the composition) is controlled by the buttons. This application also features a "shake to erase" function, where shaking the device causes all the lit pixels to disappear. I've written many more applications, including a step sequencer, arpeggiator, and some more gesturally-oriented applications like the ones I've just described.

Two USB ports on the Sugarcube - one for programming and one for MIDI communication. Power jack charges the LiPo battery within.

The inputs and outputs of the Sugarcube may be configured for any number of purposes using an event-based programming protocol, however, I have been following some general design guidelines in the creation of Sugarcube apps. I typically use the accelerometer to control pitchbend or to incorporate “gravity” into a more gesturally-focused app. I use a combination of the accelerometer and gyroscope to implement a “shake to erase” function in many apps, clearing the current configuration. One of the potentiometers is typically used to control the base pitch of a keyboard app or speed of a sequencer app, and the other is used to pan the visible window across a larger available space of play.

This controller also has the option of communicating serially with MaxMSP to control various processing-intensive audio applications. In the video above, the device is sending button data of the form (x, y, state) to Max via a serial USB connection. Max uses this data to control an audio application called "beat slicer," where an audio loop is cut up and arranged in various ways. Then Max generates LED data (also of the form x, y, state) and sends this back over to the Sugarcube via USB. The Arduino inside the Sugarcube processes the incoming serial data and turns on the appropriate LEDs.