MIDI Drum Kit by Spikenzie Labs

  • 0

MIDI Drum Kit by Spikenzie Labs



Just as 2015 was wrapping up I put together a MIDI drum trigger kit from Spikenzie Labs. The Drum Kit Kit – All Included (DKK-AI) comes with everything you need to set up six triggers using piezo discs. Programming is done via an Arduino IDE using the built-in ATMEGA328-PU chip, so you don’t need a separate Arduino board for the project. A 5-pin DIN connector is provided for interfacing with legacy MIDI gear, and this is how I planned to use it for the moment.

The DKK-AI went together quickly with no issues in about an hour. Unit comes pre-loaded with a sketch that assigns the pads to MIDI notes as follows:

unsigned char PadNote[6] = {52,16,66,63,40,65};

On the first try, using Ableton Live set to receive on all channels, this worked perfectly. However, the default MIDI notes used in the DKK-AI are not in the best range for most of Ableton’s drum kits.

DKK-AI - easy to build!

DKK-AI – easy to build, but configuring may take some time!

While General MIDI is a standard, each hardware/software manufacturer can come up with different approaches to how they implement the standard. Often with today’s advanced software, the actual MIDI note assignment is buried under one or more layers of settings. Typically that is OK because you simply use the defaults. But the DKK-AI uses six pads, which is a bit strange compared to most modern controllers that work in groups of eight.

Ableton Drum Kit with default DKK-AI mapping

Ableton Drum Kit with default DKK-AI mapping

To reassign the MIDI notes that the DKK-AI is sending, you only need to edit one line of code (above), and re-load the sketch. This is where things got interesting.

Spikenzie Labs provides a lot of documentation, but they left out a few key things. Thankfully the folks at Spikenzie Labs were accessible (even on New Year’s Eve) and later in 2016 they walked me through the issues I was having.

Assembled DKK-AI with test pad

Assembled DKK-AI with test pad

Working with the Code

The DKK-AI uses an FTDI connection for reprogramming the device. I already had an FTDI cable from a past project, and thought this would go pretty smoothly. The first issue I ran into was how to set up the Arduino IDE to communicate with the DKK-AI while the ATmega328 chip was installed. Previous versions of this Drum Kit used an Arduino Uno to act as the programmer, but I didn’t want to do that. The whole point of having the FTDI header was to program the DKK-AI directly.

I tried numerous board settings, but all returned the error:

Both retured error: avrdude: stk500_getsync(): not in sync: resp=0x00

If you plug that error into Google, you’ll see that it is very common and has dozens of possible causes – some quite involved. I didn’t really have the patience to go down a lot of bizarre rabbit holes for this, so I pushed forward.

The FTDI drivers installed on my laptop were CDM v2.10.00 WHQL Certified, but I downloaded a newer 2.12 version and installed those. The DKK-AI was successfully found on COM5. Eventually I had more success using Pro Mini 3.3v/8Mhz ATmega 328, with programmer set to USBtinyISP. My new sketch with new MIDI note values uploaded successfully.

unsigned char PadNote[6] = {53,17,67,64,41,66};

sketch edit

However, at that point I couldn’t get a successful test with Ableton. I saw MIDI input, but the new pad note of 53 (F4) was clearly not sounding. Oddly, striking the pad returned a green TX light as appropriate. We’ll come back to this a bit later…

Taking a step back I reloaded the old sketch and went back to Ableton to repeat my initial, out of the box, test. This time, this test FAILED. This led me to believe that something was wrong with how the sketch was loading.

I explored a variety of 3.3v vs 5v settings for the Pro Mini 5v/16Mhz ATmega 328 and got the original sketch to load. Again, striking the pad looked good on the board’s green TX light, but I still didn’t see activity in Ableton.

It was at that point where I contacted Spikenzie Labs via Facebook, and they offered to help via email. Our email exchange didn’t take place until later in the week. My burning question was: what board setting do you use??

2016-01-01 19.09.09

VIDEO: Sketch upload via FTDI (PC test)

2016-01-01 19.11.31

VIDEO: TX light activity for pads (PC test)


2016-01-02 00.53.02

VIDEO: TX light (Mac test)

Let’s Pop Some Chips Out

While I was waiting for Spikenzie Labs to get back to me, my father suggested that I could verify that the DKK-AI’s ATMEG328 chip was OK by pulling it out of the DKK-AI and putting it into one of my Unos. Then I could load the sketch using the typical Arduino Uno board setting. This wasn’t ideal because I didn’t have an Uno with an open ATMEG slot, so this also meant pulling a perfectly good chip out of an original Uno. Still, curiosity got the best of me, and after performing this operation, what did I get??

avrdude: stk500_getsync(): not in sync: resp=0x00

So that didn’t get me anywhere. I put everything back together and continued experimenting with board settings, hitting upon the Duemilanove 328, which was successful, but the sketch doesn’t work (flashing TX light, etc). Thinking this might be a laptop issue with either my sound card or other settings, I took the project to my Macbook and verified same experience with MIDI setup in Ableton. No triggering taking place.

The DKK-AI has an option for using the FTDI serial connection to send MIDI instead of the 5-pin DIN connector. This isn’t what I wanted to use, but I thought it might be worth a shot. However, for this to work, I had to install a helper app (MIDI Yoke) to take the serial data and translate it to MIDI data. MIDI Yoke is a pretty old program, and doesn’t look like it is supported any longer. I was hesitant to install one more thing on my development machine, but really wanted to see if it made a difference.

Same issue. MIDI still not getting to Ableton even though TX light on circuit lights up.

Yeah, pretty frustrating.

Alesis SR-16 MIDI Drum Machine tests

Up to this point my focus was on making the DKK-AI transmit. On the other hand, the problem could be with receiving data in Ableton, and after all of the obvious checked (using correct port, etc) the only other option for testing was to use another MIDI-generating device. Luckily, I had an Alesis SR-16 drum machine on hand.

MIDI OUT to Ableton worked just fine. So with a quick swap of the MIDI cable to the DKK-AI, I could see again that no signal from DKK-AI was getting into Ableton (despite green TX light flashing when pad is hit).

Maybe try another DAW?

Ableton us usually a bit easier for quick MIDI mapping tests. For me, Ableton is such a blank slate with little clutter to get in the way and you can immediately see what’s happening. My experience with the Audio Cubes using Ableton brought me into contact with a lot of routing and mapping that just doesn’t take place as easily in other DAWs.

But for testing purposes, I wanted to see if maybe a different DAW – like Reason – would demonstrate the same problems. Using Reason’s KONG drum device, I proved that incoming MIDI notes are indeed recognized (using the Alesis). This required a little detour into the default MIDI note assignments on the Alesis, which gave me the following:

Pad # Note
Kick 036 C1
Snare 038 D1
Cls Hat 042 F#1
Open Hat 046 A#1
Claps 039 D#1
Perc 2 067 G3
Tom 1 048 C2
Tom 2 045 A1
Tom 3 041 F1
Ride 051 D#2
Crash 049 C#2
Perc 1 065 F3

So the next step was to take six of these and see if DKK-AI would trigger using same note values that I confirmed were good for mapping to Kong. Back from the original sketch we had:

unsigned char PadNote[6] = {52,16,66,63,40,65};

This became:

unsigned char PadNote[6] = {36,38,42,46,39,67};

Used the Duemilanove 328 setting, got a successful load, but the sketch didn’t work. Still getting green TX light, etc.

The Six Hour Mark

At this point I had 6 hrs troubleshooting into the DKK-AI. It was time to stop. The other issue I was dealing with is that Ableton runs like a dog on my HP laptop, and I had lots of time taken up just waiting for it to load for each test. I was trying not to run Arduino IDE and Ableton at the same time for fear that they might bog down the machine further. I also think that adding MIDI Yoke to the equation added to the system resources that Ableton was using, and I probably should uninstall it. Even when Ableton isn’t listening to MIDI Yoke channels, it seems there’s a performance hit on program start because the program has to account for the possibility that MIDI Yoke might be used.

Spikenzie Labs to the Rescue

1/13/16 – Spikenzie Labs took a while to get back to me, but their tips were very helpful.

1. Set baud rate in the DKK sketch to 31250 bps – This was an obvious note in the tutorial, and I thought this was already set. It’s possible it got reset while I was massing about. However, since I did not plan to use the MIDI over serial, I dont think this had an impact. I purposely only wanted to use the 5-pin MIDI out.

2. Serial.print vs Serial.write in the MIDI_TX void section of the program –

This should be Serial.write but in older versions of the Arduino IDE it was Serial.print.

Once that was changed, IT WORKED!

2016-01-12 22.18.39

VIDEO: Success!

Spikenzie Labs then confirmed that the board setting I found by trial and error was correct. They recommend “Arduino Duemilanove W/ATmega328 as the board. If your version of IDE gives you the choice of speed it is 16mhz.”

This can make all the difference and sends many people down various troubleshooting rabbit holes that waste a lot of time….

More Mapping

All of the energy spent getting the sketch to load properly was a major distraction from the main goal – to come up with a suitable mapping for Ableton. When I say “suitable” I mean something that easily fits into Ableton’s Drum Rack device, and can be easily recalled. If you think of a physical drum kit, you usually have:

Hi Tom
Mid Tom
Low Tom

Depending on the style of music, you might have more or less individual drums, and for some more electronic styles, you might have completely different components, or multiple kick drums. Hi hats often have notes reserved for open and closed hi hat sounds.

Since the DKK-AI has only six pads, if you want to play a typical drum kit, you have to determine which sounds you want to assign to each pad, and then what note is going to be used to trigger that sound. Again, this is all somewhat subjective, and there is no “right” answer, but you generally want to make it easier on yourself by using consecutive note numbers, or following the conventions used in the General MIDI spec (see below).

The point here is that if you indicate note X is a kick drum, and you have a performance of a kick drum part that uses that note (boom, boom, boom, boom) , it will be fine. But if your mapping isn’t consistent, you could be triggering a cymbal with that kick drum part (crash, crash, crash, crash). This can have interesting creative possibilities. The GM standard is also very biased toward Western (European) music and doesn’t take into account Middle Eastern or Asian forms. So some imagination is needed to tweak it for use in those styles. These days, the software usually does all of that for you under the hood.

Drum machines have evolved from the General MIDI mapping, and as various electronic and dance music styles evolved, so did the conventions for mapping the drums to controllers. People who use AKAI MPC drum machines might use their own mapping:

Ableton Live Drum Rack mapping for MPC devices…

Pad 1- Note # 60
Pad 2 – Note # 62
Pad 3 – Note # 64
Pad 4 – Note # 65
Pad 5 – Note # 67
Pad 6 – Note # 69
Pad 7 – Note # 71
Pad 8 – Note # 72
Pad 9 – Note # 60 (On MIDI Channel 2A)
Pad 10 – Note # 62 (On MIDI 2A)
Pad 11 – Note # 64 (On MIDI 2A)
Pad 12 – Note # 65 (On MIDI 2A)
Pad 13 – Note # 67 (On MIDI 2A)
Pad 14 – Note # 69 (On MIDI 2A)
Pad 15 – Note # 71 (On MIDI 2A)
Pad 16 – Note # 72 (On MIDI 2A)

Trying the first six MPC mappings for DKK-AI:

unsigned char PadNote[6] = {60,62,64,65,67,69};

Ultimately this wasn’t a very good mapping for Ableton’s Drum Rack. I got a bit closer to what I wanted with:

unsigned char PadNote[6] = {35,36,37,38,39,40};

The problem with this setting is that 35 falls on a different pad set and is rarely mapped to any sound (unless you manually change it). So I shifted this over and chose to start with 36.

Ableton Drum Kit DKKAI Map

Ableton Drum Kit DKKAI Map


Pad 1 = 36 (from bottom left)
Pad 2 = 37
Pad 3 = 38
Pad 4 = 39
Pad 5 = 40
Pad 6 = 41

unsigned char PadNote[6] = {36,37,38,39,40,41}; // Ableton Drum Rack 3rd attempt

This is based on Ableton’s “GM Suggestions” for drum mapping. This is all relative of course – you can map anything wherever you want. You could even make several mappings depending on the project, and comment out the ones you don’t need at the moment.


The lesson here: General MIDI conventions for drum mapping are nice, but sometimes they don’t line up very well. Much depending on how the manufacturer decided to implement the standard. Propellerhead Reason is a little more predictable in this case, perhaps because it relied on MIDI for so long before Propellerhead added audio recording capability. Ableton has deep programmability and can handle whatever you throw at it, but the Drum Racks often use multiple kick drums and (I’ve found) aren’t always consistent when importing third party MIDI drum performances.

DKK-AI with prototype pads

DKK-AI with prototype pads

GM Drum Layout (Reference)

#  Note  Name
35 B0 Acoustic Bass Drum
36 C1 Bass Drum 1
37 C#1 Side Stick
38 D1 Acoustic Snare
39 Eb1 Hand Clap
40 E1 Electric Snare
41 F1 Low Floor Tom
42 F#1 Closed Hi Hat
43 G1 High Floor Tom
44 Ab1 Pedal Hi-Hat
45 A1 Low Tom
46 Bb1 Open Hi-Hat
47 B1 Low-Mid Tom
48 C2 Hi Mid Tom
49 C#2 Crash Cymbal 1
50 D2 High Tom
51 Eb2 Ride Cymbal 1
52 E2 Chinese Cymbal
53 F2 Ride Bell
54 F#2 Tambourine
55 G2 Splash Cymbal
56 Ab2 Cowbell
57 A2 Crash Cymbal 2
58 Bb2 Vibraslap
59 B2 Ride Cymbal 2
60 C3 Hi Bongo
61 C#3 Low Bongo
62 D3 Mute Hi Conga
63 Eb3 Open Hi Conga
64 E3 Low Conga
65 F3 High Timbale
66 F#3 Low Timbale
67 G3 High Agogo
68 Ab3 Low Agogo
69 A3 Cabasa
70 Bb3 Maracas
71 B3 Short Whistle
72 C4 Long Whistle
73 C#4 Short Guiro
74 D4 Long Guiro
75 Eb4 Claves
76 E4 Hi Wood Block
77 F4 Low Wood Block
78 F#4 Mute Cuica
79 G4 Open Cuica
80 Ab4 Mute Triangle
81 A4 Open Triangle

Category : Electronics

About Author



Owner of Pepperhead Studios, guitarist in Fricknadorable, and Electro-acoustic sound designer/experimenter.