DrumKit Arduino
DrumKit is meant to encourage the user to explore music, math, programming, electronics, and acoustics.
The system works with any Arduino-compatible software. The mallets themselves are mobile, connected with standard network cables to a hub, which is linked to the Arduino controller as well as a central power source.
In the prototype, each mallet is a simple lever driven by a solenoid. The Arduino sends a 5-volt pulse for each stroke of the mallet, triggering a relay which turns on the solenoid at 24 volts. The Arduino signal also turns on a BlinkM for the duration of the stroke (see below). The length of the pulse can be varied in order to change the way the mallet strikes the drum surface; a quick pulse results in a fast recoil and a quick staccato, while a longer pulse holds the mallet against the drum and changes its sound.
Because the mallets require two circuits at different voltages, we took advantage of network (Ethernet) cables, which have multiple conductors and can carry a relatively large amount of power. Each mallet is connected by an Ethernet cable to a “hub” which, in turn, is connected to both the Arduino and a 24-volt power source. This means that users can unplug and reconnect the mallets, switch to longer cables, and connect the hub to other devices which might be developed in the future.
Each mallet uses a BlinkMs as a feedback mechanism. A BlinkM is an LED (light) that can be programmed to play back a sequences of color when it receives power. On a mallet, the BlinkM's color reflects the motion of the mallet. The light also makes it possible to see the signal received by a mallet even if the solenoid's power source is disconnected.
When a mallet is triggered, the BlinkM first turns red and then fades, or “cools down”, to blue, representing the decay of the drum hit. For short mallet strokes, the light simply flashes in red before turning off. The longer the mallet is held down, however, the closer to blue the color gets. Eventually, the color stops changing because an excessively long stroke no longer affects the sound of the drum.
The BlinkMs are shown in this video.
DrumKit can be programmed in one of two ways:
Scratch for Arduino allows a user to avoid writing code and instead create programs through a drag-and-drop interface. Its flexibility with DrumKit is limited, but it makes it easy for a user to test multiple program structures (that is, rhythms). Modkit will also provide similar functionality once it is released.
DrumKit can also be programmed with the regular Arduino software. A user can experiment with different kinds of control structures and build rhythms from mathematical patterns. This can support any level of complexity, from simple beats to algorithmic composition, even incorporating input from sensors or other data.
The DrumKit library for Arduino provides several functions to control mallet strokes and timing:
strike(3,0) tells mallet 3 to strike quickly, and strike(3,1) tells mallet 3 to strike slowly. (Mallets are numbered from 1 to 3.)rest(1/2) tells the system to rest half a beat. Any number of beats can be used, and the length of the rest is determined by a global tempo.beat() returns the current time, in beats. The system begins on beat 1 and automatically keeps track of time based on the strike() and rest() functions. Using beat(), a program can change the behavior of the mallets based on the length of time that has passed, or act based on certain conditions—for example, strike a mallet on every 4th beat.The library can be extended to build upon these functions and make other time-based or beat-based calculations.