Electronic drums for Linux

Public Chat
Similar projects worth following
Electronic drums, especially good ones, aren't cheap. The drum module is usually the most expensive bit, and for good reason: it's the heart of the system. Although it's tempting to buy your own piezos and make your own drums in order to save a little bit of money, making a good drum module is very difficult.
The goal project is to use a Raspberry Pi to make a drum module. As far as the software goes, it is written in C++ and uses Gtkmm to display a nice graphical user interface (GUI) on a Raspberry Pi official 7" touchscreen. The hardware consists of some accelerometers or piezos connected to an analog to digital converter (ADC).
It's also possible to use eXaDrums as any other musical instrument, check out my other project: eXaMusic.


Electronic drum modules process the data provided by the drum triggers in order to generate sounds in real time. It's quite challenging to make a good drum module, as it needs to process all the triggers' signals, synthesize the sounds, and play them within a few milliseconds. To achieve such results, the software has to be both flexible and fast. When I started to write the source code in C++, I opted for the Raspberry Pi B in order to run the software. That led to RaspiDrums.

At first, I just wanted to make sure that the Raspberry Pi B was powerful enough to be a decent drum module. That's why the hardware had to be as simple as possible (MCP3204, and accelerometers evaluation boards as drum triggers), and the software headless in order to run in real-time. RaspiDrums showed good results, and demonstrated a latency lower than 10ms.

A few days before that result, the Raspberry Pi's official touchscreen was released, and the very cool thing about it is that it doesn't use the GPIO at all, so, it doesn't interfere with the ADC chip (which uses the SPI bus). Thus, I started to work on a GUI for RaspiDrums, using Gtkmm (a C++ wrapper for Gtk). Although I didn't publish my work, the results were quite good, even with the slow CPU of the Raspberry Pi B+. It was clear in my mind that RaspiDrums was going to become eXaDrums, which is just a fork of the former. Now I use a Raspberry Pi 3B+, and the system works very reliably with a latency that is below 8ms.

How to play drums with eXaDrums!

There is a script to install eXaDrums automatically on your Linux OS, all you need is to follow the instructions listed here.

Once everything is installed and configured, you can have fun and play drums, or you can train and improve your skills by using the built-in metronome.

  • 1 × Raspberry Pi 2B or 3B [£33.984]
  • 1 × 8GB SD card [£7.50] For the Raspberry Pi
  • 1 × Raspberry Pi 7" Touchscreen [£57.588] The official one.
  • 1 × USB Soundcard (Startech ICUSBAUDIO2D) [£28.128]
  • 1 × eXaDrums PCB

  • Arduino Nano Every Trigger Board

    Jeremy09/03/2023 at 15:39 0 comments

    As you may have noticed, last year I announced that I was working on a new input board for eXaDrums.

    A few things have happened since then, and I've release more info about that board.

    If you want to know more about it, there's a post here: that gives all the details you need, as well as links to all the posts related to the board.

  • New Arduino Nano Every Trigger Board - Part 1

    Jeremy05/06/2022 at 16:49 0 comments
  • Raspberry Pi OS - Bullseye

    Jeremy11/14/2021 at 14:36 0 comments
  • libexadrums.js

    Jeremy10/19/2021 at 17:34 0 comments
  • TD-4KP Configuration

    Jeremy09/28/2021 at 20:23 0 comments
  • &

    Jeremy09/02/2021 at 19:28 0 comments

    The official website is now live!

    I also did my best to make a nice video to describe exadrums visually:

    There's also a new website, dedicated to the project news:

    From now on, I'll post all the news on the web page, and I'll just reference them here on hackaday, in the project logs.

  • The future of exadrums

    Jeremy08/25/2021 at 14:44 0 comments

    The future of exadrums is probably different than what you may think.

    So far, exadrums is a two-part software, there's a library, libexadrums, and another component, the user interface. The whole drum module is, in fact, in the library, and exposes a C++ API. That means libexadrums can be used with other languages, such as Python, Javascript, etc.

    A C++ user interface has its advantages, but exadrums could benefit from other languages. For instance,  a more "connected" experience would be easier to implement in Python or Javascript.

    And that's how I see the future of exadrums: a Connected Open Source Drum Module. Some things are already in the works, but others will take some time, however, I'll do my best to publish news more frequently, to keep you informed about the project.

    About that, the project website will be online pretty soon! Hope you'll like it.

  • exadrums is in Debian Bullseye

    Jeremy08/21/2021 at 15:48 0 comments

    It's been a week now, that Debian Bullseye has been released, and exadrums packages are part of it!

    If you use Debian, and have upgraded to Bullseye, you can now install exadrums via apt:

    sudo apt install exadrums

    What about Raspberry Pi OS?

    It's only been a few days since Debian 11 has been released, so there's no news about the next Raspberry Pi OS (formerly Raspbian). Let's give them some time to publish a proper release. I can already tell you that you'll get the same version of exadrums as Debian in Raspberry Pi OS, it'll be exadrums 0.6.0.

    Anyhow, when the new Raspberry Pi OS will be released, you'll be able to install exadrums via apt on your Raspberry Pi.

    Using Debian Bullseye on a Raspberry Pi

    If you don't want to wait until the version of Raspberry Pi OS comes out, you can install Debian Bullseye on your Raspberry Pi using one of the images available at: Tested images. I haven't tried any of them, but they've been tested, so they should work.


    Jeremy01/01/2021 at 12:14 0 comments

    First of all, happy new year everyone!

    And to celebrate this new year, I'm proud to announce that I'm working on a brand new website for exadrums: I plan on releasing the finished website mid 2021, so here's what you get for now:

    Links to the project pages on Hackaday, Github, OSH Park, etc, are listed on that page.

    The main goal of this website is to provide a comprehensive user guide, so that you can build your own drum module or e-drums flawlessly.

    Some of the content will be based on the current documentation (which is a work in progress) available here:

  • eXaDrums: A Drum Module You Can Make (3)

    Jeremy12/06/2020 at 12:48 0 comments

    I attempted, to years ago, to make an enclosure for eXaDrums (eXaDrums: A Drum Module You Can Make (2)). Unfortunately, I wasn't satisfied with the result, so I decided to take my time and learn how to model an enclosure properly. Good news is, the enclosure is now finished and is fully 3D printable. Here it is:

    I think it looks good! (Yes, the screws are also 3D printed, and yes, you can use a standard screwdriver.)

    I shall post the STL files on my Thingiverse page pretty soon.
    To print this enclosure, you'll need some PLA and a 3D printer with a minimum bed size of 150x150mm. It takes about 9 hours to print the whole thing with my printer.

    So now eXaDrums is a complete drum kit, and even the enclosure is open source!
    Here are more pics:

View all 55 project logs

  • 1
    Step 1

    Connect the touchscreen to your Raspberry Pi

    (We assume here that you already have all the parts listed in the Components section.)

    Connect your Raspberry Pi to the official Pi touchscreen (watch this video if you need help:

  • 2
    Step 2

    Install a Linux distribution on your Raspberry Pi

    Install Ubuntu MATE (here's the useful link for that:, or Raspbian (eXaDrums works best with Xfce). If you want Xfce, download and install Raspbian Jessie Lite, and install the xfce4 package).

    Here's how I install Ubuntu MATE using the image provided on the official website (all done with my xubuntu desktop):

    1. Download the image and extract it (right click + etract). You now have a .img file.
    2. Format your SD card to a fat32 file system. I used Gparted for that (sudo apt-get install gparted).
    3. Copy the image to the SD card:
      sudo dd bs=1M if=ubuntu-mate-16.04-desktop-armhf-raspberry-pi.img of=/dev/sdb
      (you can use Gparted to verify the destination, but every time I did it, sdb was the name given to my SD card.
    4. Insert the card in your Raspberry Pi (2 or 3 recommeneded), and start it.
    5. If the image is upside down, edit the /boot/config.txt file, and add that line at the end:
  • 3
    Step 3

    Connect your ADC and sensors

    To wire an ADC to the SPI bus of the Raspberry Pi, you can follow those steps use the following diagram:

    FYI, that comes from my previous project RaspiDrums, and illustrates how you would connect an ADC click to a Raspberry Pi B+.

    eXaDrums has been tested with MCP ADCs: MCP3008, MCP3204, and MCP3208. Nothing stops you from writing your own Sensor class and add support for other ADCs, check the source code on Github.

View all 9 instructions

Enjoy this project?



maker2over wrote 03/01/2023 at 01:05 point

Thank you for your hard work.

  Are you sure? yes | no

dariodicao wrote 10/22/2021 at 14:49 point

Hi Jeremy, excellent project! I would like to suggest a new version. You could make a module without the sounds just a MIDI-USB interface so we can use sounds from VST plugins (Addictive Drums or others). 

Just like the one you've already done, using raspberry and touchscreen. Thanks!

  Are you sure? yes | no

Jeremy wrote 05/06/2022 at 16:53 point


It's been requested so many times... I am working on it at the moment.

Check this out:

  Are you sure? yes | no

beearseno wrote 04/27/2021 at 07:13 point

Hey Jeremy, awesome project. Do you think it would be possible to make multiple zones on one drum? I’d like to have the right hand and left hand trigger midi and velocity independently on one surface. I’m also looking to experiment with combining pressure and touch sensors to achieve this. 

  Are you sure? yes | no

gorkable wrote 04/13/2021 at 11:08 point

Hello! I would love to use this system to build a drum module over a flamenco Cajón. Is it possible to trigger drum sounds with piezo mics? What are you using here to trigger?

Thank you!

  Are you sure? yes | no

Jeremy wrote 04/19/2021 at 19:21 point

You can use piezos, but you'll need a signal conditioning board.
Fortunately for you, I made one that use the MCP3008 as an ADC:

  Are you sure? yes | no

max.trybunskyi wrote 11/27/2020 at 17:45 point

Waiting for the version using my RPi 4 version 

  Are you sure? yes | no

Miles Phillips wrote 05/18/2020 at 09:37 point

Hi, I don't know if this is the right place to ask, but I will try here and please feel free to send me off somewhere else! I am trying to create a self contained digital hang/handdrum as a gift. My first approach was: Create an arduino midi controller with piezo pads and connect it to a RPi running SamplerBox. I've managed to get SamplerBox working, but the arduino chips I have do not have enough analog inputs (I need 7).

So my new plan is to use the Analog Zero board to make an all-in-one player so I can connect the piezos directly to the Pi. eXaDrums looks to have done a lot of the hard work for this, so I'm hoping I can base my software off this. My questions:

1. My device will be headless and screenless, would it be easiest just to work with libeXaDrums?

2. Does libeXaDrums have a command line interface so I can see what's going on?

3. Can libeXaDrums trigger a MIDI instrument such as SamplerBox?

Thank you for any pointers you can give me! I would note I like to mess around with code but I'm not a programmer so apologies for my naïvité!

  Are you sure? yes | no

Andi wrote 10/16/2019 at 22:13 point

Hi Jeremy,

i have the same problem as pyroclast3. Installation of libexadrums works like a charm but if i try to install exadrums i recaive the error that the "Release" folder can not be found. Do you have a tipp or could you update the repos?



  Are you sure? yes | no

Jeremy wrote 10/17/2019 at 18:29 point

Hi Andi,

Indded, you might have the same issue as Ian.

Make sure you read the github's readmes, and use dpkg-buildpackage to install libexadrums and exadrums.

That should solve your problems, as instructions are quite easy to follow.

You'll need raspbian buster for that to work.


  Are you sure? yes | no

Andi wrote 05/09/2020 at 22:48 point

Hi Jeremy, thanks for your reply. The problem was a missing m4 directory in the libexaDrums and exaDrums project. Also I have to add

"override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info" to the rules file in the exaDrums project. Now I can run the Application. Unfortunatly the sound output is quite strage since if I play the wav files they seems sounds normal. Do you have any idea?


  Are you sure? yes | no

Jeremy wrote 05/10/2020 at 15:26 point

Hi Andi, I don't really understand your problem, but it sounds like it could be related to the soundcard. If you're using the onboard Raspberry Pi soundcard, you need to have a quite large buffer, something like 30 ms or more. You can change that under the Mixer configuration.



  Are you sure? yes | no

pyroclast3 wrote 08/09/2019 at 08:06 point

Hi Jeremy,

I love the look of this but I'm really struggling to install it. I'm using a Raspberry Pi 3 and following your instructions on the page. Using the ./InstalleXaDrums command fails every time though. It gets to a point where I get a folder not found message (libeXaDrums/Release)

Looking at the commands in the installation script I've a feeling there must be folders missing from the GitHub pages that are being cloned, both the libeXaDrums and eXaDrums

its extremely possible that I'm being dense but I'd appreciate your help on this as i (and the kids) would love to get his working.



  Are you sure? yes | no

Jeremy wrote 10/17/2019 at 18:28 point

Hi Ian,

Installation instructions have changed. Please read the github's readmes, and use dpkg-buildpackage to install libexadrums and exadrums.

You'll need raspbian buster for the installation to work.



  Are you sure? yes | no

tomwtrs wrote 04/13/2019 at 11:16 point

Hey Jeremy, 

I have built an E-drum for my kids using your instructions and software, v2. It works great, so my congratulations on this project. 

Perhaps you can help me out with two issues.

First I find that the latency is audible. Perhaps this is due to my wav samples, or the trigger settings. Can you provide or recommend good samples? Or can you instruct how to optimise the settings?

I have 8 pads, wired to a breadboard. One I’d like to set up as a highhat. I have the light sensors for this, but no idea how to get the signal in the Rpi. Perhaps you can give a hint?

Thanks in advance for your reply, and thanks for the work you have put in this project. My kids and I had a great time with building and testing.


  Are you sure? yes | no

Jeremy wrote 10/17/2019 at 18:25 point

Hi Tom,

Sorry for this very late reply, I didn't see any notification of your message...

Are you using a USB soundcard? If not, that's why the latency is audible. The Raspberry Pi built-in soundcard is not very good...

If you're using a USB soundcard, make sure that it can accept small buffers. The maximum buffer size to make sure there's no audible latency is 512 samples (~10 ms, or 10,000 µs). You can set the buffer's duration in the mixer settings.

As far as the hi-hat goes, you have to create a new instrument, with the HiHat type. You only need one sound of the open hi-hat. One of the triggers has to have your sensor's id, and the other the hi-hat cymbal's id.

Hope this helps.


  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates