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


    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:

  • Raspbian packages & upcoming features

    Jeremy05/08/2020 at 20:12 2 comments

    First of all, I think it's worth mentioning that RaspiDrums, the predecessor of eXaDrums, was created exactly 5 years ago! To be fair, eXaDrums is a fork of RaspiDrums, and has been created in September 2015, with the intent to become a fully functional software drum module.

    Five years later, eXaDrums is usable as a drum module, and can be entirely built at home, using eXaDrums-pcb, libexadrums, and eXaDrums. The PCB is available on OSHPark and the one I soldered has been working perfectly since September 2018. As for the software, Raspbian packages are available on the eXaDrums github repo. The software can be installed on Debian (unstable and testing) and Ubuntu since version 19.10.

    Right now, eXaDrums is stable, but not feature complete. The next version (0.5.0) will look like this:

    A new important feature, is the fullscreen button. For years, eXaDrums has started in fullscreen mode on Raspberry Pi, and in a sort of popup on desktop. Now, on all systems it will start as a windowed program, just like any other software, and there will be two ways to get trigger the fullscreen mode.

    The first method is simply to click or tap on the "Fullscreen" button. The second option, is to start exadrums with the -f or --fullscreen option directly.

    Other features include a trigger gain, which will help if your sensors are not sensitive enough, as well as resetting, importing or exporting your module configuration. That includes all your kits, presets, and sounds!

    Bug fixes also ship with version 0.5.0, and the user experience is improved, especially when using SPI sensors (like MCP3008, etc.).

    Of course, you always get very low latency, and great sound quality!

  • eXaDrums available in debian

    Jeremy11/23/2019 at 19:08 0 comments

    It's been a while, actually, a year, since I last posted a log here...

    The reason is that much work has been done on eXaDrums during that time. The GUI hasn't changed much, but the library has evolved quite a bit.

    The first very important thing is a 'virtual instrument'. On the GUI side, it is called 'Virtual Pad', and this is how it looks:

    Each instrument has its own button, so you can either use a mouse or tap your touchscreen to trigger it. If you're using a PC, you can assign shortcuts to the instruments (up to 2), so that they can be triggered by a keyboard.

    This almost minor add-on was , in my opinion, necessary to have the packages (eXadrums and libexadrums) submitted to the debian repositories.

    Both eXaDrums and libexadrums are available from debian sid (unstable) and bullseye (testing). In fact, they are also available from Ubuntu 19.10, and the next LTS release, 20.04.

    Anyway, this should simplify exadrum's installation for debian and ubuntu users.

    Hopefully, the next Raspbian release will also ship with exadrums in it's official packages!

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

    Jeremy11/18/2018 at 19:38 0 comments

    In the previous log (eXaDrums: A Drum Module You Can Make), I showed you how to make an eXaDrums module. However, there's one part that you can't quite make yourself: the enclosure.

    Don't worry though, I invested in a 3D printer and spent quite a bit of time modeling things on Freecad. As you can see, I'm now modeling a 3D-printable case for the module.

    You may have noticed that the Raspberry Pi touchscreen's dimensions are a bit weird... Frankly, it takes so work to get everything aligned as it should be. Beware, if you try to design something for that touchscreen, that nothing is symmetric!

    Anyhow, I've already printed two prototype parts, but I still have to design the most difficult parts. I also need to make sure that all the individual parts are smaller than 150x150mm as this is the size of my printer's bed...

    This is the last step to make a completely open-source project, software and hardware. And of course, there will be a Github repository with all the files included.

  • eXaDrums: A Drum Module You Can Make

    Jeremy09/24/2018 at 13:53 1 comment

    I've always wanted to make sure that anyone could build their own eXaDrums module. But that's easier said than done, as an additional board is required to convert the signals of the drums' sensors (piezos) into data a Raspberry Pi understands.

    I'm very happy to announce that you can now build your own eXaDrums module if you want to. In this log I'll explain you how. I'll assume that you have all the required components: Raspberry Pi, SD card, USB soundcard, power supply, etc.

    ADC Board Prototype

    A Working Raspberry Pi ADC Board

    Yes, the image that you see shows a prototype that I recently ordered from OSH Park. It fits pretty nicely in the enclosure I have, as the only modification I had to make was to cut a piece out of the back lid, and tap two holes underneath the enclosure.

    You may be wondering why the board has a DB25 connector? There is a simple reason to that: the board is intended to be used with a Roland TD-4KP drum set, which uses a DB25 connector.

    Two prototypes

    Of course, the board can be modified in order to work with other drum kits. Which brings us to the boards that I made. The one shown on the first image is actually the second board that I got from OSH Park. I ordered a first one that includes the hi-hat pedal controller input, but it doesn't fit into the enclosure, so I also got this new one, with rounded corners. Both boards are open source, and available on Github, so you can modify them to get your own custom boards.

    OSH Park Orders

    Below is a picture of one of the three boards that I received from OSH Park.

    The project is shared on OSH Park, so you can order three boards like that one for $28.15.

    Here's a brief description of the board, followed by more theoretical considerations in the next section.

    From left to right, we have:

    • A DB25 connector to be plugged into a Roland TD4-KP drum kit.
    • 8x 1MΩ potentiometers (RV1 to RV8).
    • 2x TLC2264 Low power consumption operational amplifiers (U3 and U4).
    • A series of 24 100k resistors (R1 to R24).
    • An MCP3008 ADC (U1).
    • An LMC7660 voltage inverter (U2) and its capacitors (C1 to C4).
    • The 40-pin header that goes on the Raspberry Pi.

    A Little Bit Of Theory

    Piezo sensor conditioning is a lot harder than it seems at first glance. The output voltage of a piezo sensors often varies between more than 10V and less than -10V. Mapping that kind of voltage to the input of an MCP3008, which is 0-3.3V is thus a bit of a challenge.

    Lets take it step by step. First of all, the output of the sensor has to be scaled down while being connected to a high impedance in order to make sure that its dynamics isn't altered. To achieve that, a 1MΩ is used to create a voltage divider that feeds an voltage follower (op amp), as shown below.

    This first step ensure that the input voltage V+ of the op amp is constrained between +Vcc and -Vcc (+/-5V in our case). The op amp input also guarantees a high impedance.

    Then, the output of the op amp is connected to a three-resistor voltage mapping circuit that obeys to the following equation:

    If the three resistors are the same, and Vbias = 5V, we get Vout = Vin/3 + Vbias/3 = Vin/3 + 1.67V.

    Because Vin varies between +/-Vcc=+/-5V, Vout varies between 0V and 2*5/3V = 3.33V, a voltage that is perfect for the inputs of our MCP3008.

    So now you understand...

    Read more »

  • Official Packages Repository

    Jeremy09/02/2018 at 20:13 0 comments

    If you've read the previous log, you know that I successfully build Raspbian and Debian packages for eXaDrums and libeXaDrums. They are both available on Github by the way, in the Release section.

    Because they are proper signed packages, if you wish to try them out, you'll have to add the gpg key first:

    wget -O - | apt-key add - 

    Then, you just have to add the following line to your /etc/apt/sources.list:

    deb ./

    And that's it, run sudo apt update, and then you can install eXadrums as if it was part of your distribution, for instance: sudo apt install exadrums.

    After you've installed eXaDrums, you'll notice two shortcuts in your applications menu. One of them starts eXaDrums as root. This is mainly for the Raspberry Pi, if you use a SPI ADC (MCP3008 or MCP3208 for example).

    Note that you probably want to change the soundcard and sensor type, as the default values might not be adapted to your configuration.

  • EXaDrums Version 0.1.0 Released

    Jeremy07/25/2018 at 18:40 0 comments

    A couple of days ago, I released the versions 0.1.0 of eXaDrums and libexadrums. The releases are both available on Github: eXaDrums, libexadrums.

    As you may have seen if you clicked on the previous links, there are three .deb packages that are provided for each release.
    One of the packages is for amd64 architecture, so that you can test eXaDrums on your PC.
    The other two are for Raspberry Pi: the armhf is intended to be used with the official Raspbian Stretch distribution, and the arm64 one is to be used with a 64-bit distribution and has been tested with Pi64 (Debian Stretch).

    The libexadrums package has to be installed first (sudo dpkg -i libexadrums[...].deb), and if you're running eXaDrums on Raspberry Pi with your sensors connected to the SPI interface, you need to start eXaDrums as root. You can do that by typing sudo exadrums in a terminal, or from the startup menu.

    Be aware that this is a pre-release, as error handling has not been integrated yet, so be careful when you use the software. In case you break something, you can restore the default configuration using exadrums -r. If you need more info, type exadrums --help-all.


  • Debian Packages Available

    Jeremy07/01/2018 at 18:20 0 comments

    So I was thinking about making eXaDrums easier to install and upgrade, and I realized it would be pretty cool to make a debian package out of it.

    It's not as hard as you might think, as all it takes is to create a debian/ folder. That folder has been added to the git repositories today, and using the following script, you can build the debian pacakges yourself:

    git clone &&
    git clone &&
    cd libeXaDrums/Release && make -j3 all &&
    sudo cp* /usr/lib/ &&
    cd ../../ &&
    cd eXaDrums/Release && make -j2 all &&
    cd .. &&  dpkg-buildpackage -b -uc &&
    cd ../libeXaDrums &&  dpkg-buildpackage -b -uc &&
    sudo rm /usr/lib/* &&
    cd .. && lintian *.deb

    Of course in order for that to work you'll need all the dependencies that both libexadrums and exadrums require (please refer to the github readmes for that), as well as the dpkg-dev package (that provides the dpkg-builpackage utility).

    I'll be providing debian packages of exadrums and libexadrums in an official repository soon. That way upgrades will be easier than ever.

  • EXaDrums Server

    Jeremy06/01/2018 at 06:28 0 comments

    EXaDrums Server is now available on Github.

    Used together with eXaDrumsLite it allows you to use eXaDrums on a headless Raspberry Pi distribution. Although it's just a server, it has access to all the functionalities of eXaDrums. And even if only a few of them are currently implemented, I plan to make them all available so that the Android application can be used as a proper module.

    As you can see, eXaDrums Server communicates with eXaDrums Lite using Json RPC 2.0, which is quite fast to parse, and makes the server running decently on a Raspberry Pi Zero W.
    I'll keep posting logs about the Android app status, as I plan to develop it further and make it as complete as possible.

View all 47 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?



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