What is DrumKid?
DrumKid is a drum machine for your web browser. It's designed for live performance, so you can adjust the beat in real time.
What's the point?
Drumming is hard and there aren't many good drummers around, but drum machines can be restrictive and don't lend themselves to fluid live performance, IMO. I wanted to design a drum machine that could be played by anyone, and that could be played live without prior setup or programming. I also wanted to create something with enough subtlety and range that it could be learnt and mastered over time; one day, I want to hear the phrase "he's really good at DrumKid".
How do I play it?
DrumKid starts by blending two basic beats that you choose from the drop-down menus at the bottom of the screen. The mix between these two beats is controlled by the "blend" slider. The other sliders all control different aspects of the beat and can be adjusted while the beat plays. DrumKid is designed so that you can play around with the sliders without knowing exactly what each one does, but for the curious among you, here is an explanation of every available control:
- Tempo: changes the number of beats per minute (displayed at the bottom of the screen)
- Time signature: changes the number of beats in the bar. This change takes effect at the end of the current bar. If you use a beat that does not match your desired time signature, the beat will be either looped or truncated to make it fit.
- Blend: crossfades between the two selected beats.
- Hyperactivity: each step, a random amount of volume is added to each drum. The hyperactivity slider controls the magnitude of this random component.
- Zoom: progressively fades in the volume of smaller and smaller steps. When the zoom control is at zero, only the first note of each bar is played. As you increase the zoom, the third beat becomes louder, until it is at a maximum. Increasing the zoom further fades in the second and fourth beats until they reach a maximum, and so on with smaller increments (half beats, quarter beats, etc).
- Pitch: changes the speed (and hence pitch) at which the drum samples are played. The kick drum is not affected by this control.
- Kick/snare/percussion/toms: simply changes the volume of the kick, snare, percussion and toms.
- Ceiling: changes the threshold volume level below which a sound will not play at all.
- Volume: master volume control.
How did DrumKid come about?
How does it work?
DrumKid uses the Web Audio API to play sounds with a high degree of rhythmic accuracy - this is a fairly new piece of technology that is only available on certain browsers, but should spread to all modern devices and browsers in time. My code is basically a sparkly version of Chris Wilson's Web Audio Metronome. The code for DrumKid is available on GitHub; please feel free to fork it and make your own custom version.
I have a few ideas for what to do next with DrumKid. For starters, I want to make a better version based on feedback from people who have played around with it. Then I want to make a version for the Raspberry Pi and mount it in a box with knobs, mainly because it's fun to solder things. I think this would be possible by getting the project to run in Node, replacing the touch/mouse interface with physical input and writing to an audio stream using a library in Node instead of the Web Audio API.