Virtual Drum Kit Using Arduino Uno

by Afja Hossain Mahin in Circuits > Arduino

78 Views, 1 Favorites, 0 Comments

Virtual Drum Kit Using Arduino Uno

Diy electronic velocity sensitive drum kit
final v drum.jpg
circuit design.jpg
v drum 3d model.jpg
final.jpg
arduino set up.jpg
coading.jpg
cod.jpg
hairless midi.jpg
high hat padel.jpg
llop midi.jpg
loading mapping EZ drum.jpg
setting bootrate.jpg
setting up fl studio.jpg
Diy electronic velocity sensitive drum kit

Hi everyone! I'm thrilled to share my exciting journey of building my very own DIY virtual drum kit using an Arduino Uno. As a musician and a drummer at heart, I’ve always loved playing drums, but as we all know, buying a high-quality V-drum kit can be quite expensive. That’s what inspired me to take on the challenge of building one from scratch!

From designing the drum structure and pads to coding and creating the circuit, it was a fun and rewarding experience. I used materials like PVC pipes to build the frame, bucket heads for the drum pads (with some trusty duct tape), and piezo sensors to capture the beats. On the software side, I worked with FL Studio, EZ Drummer, LoopMIDI, and Hairless MIDI to bring it all together.

After a lot of research, trial, and error, I finally made a fully functioning V-drum kit that I can proudly call my own. It was an exciting project that not only tested my skills as a CSE student but also gave me the joy of playing drums whenever I want!

I hope my journey inspires others who, like me, want to build their own DIY drum kit. It’s totally possible, and trust me, it’s a blast!

Supplies

piezoelectric-sensor-4.jpg
99b46640b785d2e017a25c6f42f9378a.jpg
circuit design.jpg
516d61593652ba701168bf9f461b0d2ae28074a5.png
diagram.png
shove-loopmidi-setup.png
maxresdefault.jpg
hq720.jpg
loading mapping EZ drum.jpg

Hardware parts:

1.piezo sensor

2.10k registor

3.arduino uno

4.wires

5. USB cable


Software:

1.loop midi

2.hairless midi

3.fl studio

4.ez drummer

Understand the Basic Concept of V Drum Working Principle

piezoelectric-sensor-4.jpg
shove-loopmidi-setup.png
SchemaPiezo.gif
516d61593652ba701168bf9f461b0d2ae28074a5.png
diagram.png
frequenzgang_en-1.png

An Arduino-based virtual drum kit uses piezo sensors to detect drum strokes, resistors to handle signal voltage, and an Arduino to convert analog signals into digital data, which is then sent to a Digital Audio Workstation (DAW) as MIDI notes. Here’s a detailed breakdown of how it works:


1. **Components Overview:**

- **Piezo Sensor**: Detects the vibration from a drum hit.

- **Arduino (e.g., Arduino Uno)**: Processes signals from piezo sensors and converts them into MIDI.

- **10k Resistor**: Acts as a voltage divider or pull-down resistor to stabilize the sensor signal.

- **MIDI Connection (via USB)**: Sends MIDI messages to a DAW on a computer to trigger sound samples.


2. **Working Principle:**


**Step 1: Drum Hit Detection (Vibration to Voltage)**

- When you strike the drum pad, the **piezo sensor** detects the mechanical vibrations from the hit. Piezoelectric materials inside the sensor generate a small voltage in response to the physical stress (vibration).

- This voltage is an **analog signal**, where the amplitude depends on the strength of the drum hit. A harder hit produces a higher voltage, while a softer hit generates a lower voltage.


**Step 2: Voltage Conditioning**

- The voltage produced by the piezo sensor is fed into the Arduino’s **analog input** pin. However, to prevent unwanted noise or false signals, a **10k resistor** is used in parallel to stabilize the voltage, either as a pull-down resistor or as part of a voltage divider circuit.

- The resistor ensures that when the drum is not hit, the voltage at the analog input is 0V, preventing erratic readings.


**Step 3: Analog-to-Digital Conversion (ADC)**

- The Arduino has a built-in **Analog-to-Digital Converter (ADC)**. This module converts the analog voltage from the piezo sensor into a **digital value** ranging from 0 to 1023 (on a 10-bit scale) for further processing.

- The Arduino reads the analog voltage from the sensor as a numerical value. The stronger the drum hit, the higher the value (closer to 1023), while a softer hit will have a lower value.


**Step 4: Signal Processing**

- The Arduino processes this digital signal to determine if the value exceeds a certain threshold (e.g., to avoid triggering a hit from minor vibrations or noise).

- The strength of the hit is also evaluated to determine the **velocity** of the MIDI note, which is how hard the virtual drum was "hit" in the DAW.


**Step 5: MIDI Conversion**

- Once the Arduino detects a valid hit, it converts the signal into a **MIDI message**. The message typically includes:

1. **MIDI Note On**: Indicates the start of a note being played.

2. **Note Number**: Corresponds to a specific drum sound (e.g., snare, kick drum, hi-hat) in the DAW.

3. **Velocity**: Corresponds to the intensity of the hit, i.e., how hard the drum pad was struck. This affects how loud or forceful the drum sound is.

4. **MIDI Note Off**: Indicates the end of the note.


- The Arduino sends these MIDI messages over USB (or through a MIDI cable if applicable) to the connected computer.


**Step 6: MIDI Signal Transmission to DAW**

- The Arduino acts as a **MIDI controller** when connected to the computer. It sends the MIDI note data through a serial interface, which is received by a **MIDI-to-USB** converter or directly over USB.

- To route the signal to the DAW, software like **Hairless MIDI** is used, which translates the serial data coming from the Arduino into MIDI messages that can be understood by the DAW.

- Alternatively, the DAW can directly recognize the Arduino as a MIDI device if it's coded to act as a **MIDI-USB device**.


#### **Step 7: Sound Triggering in DAW**

- In the DAW (e.g., FL Studio, Ableton, or any other MIDI-supporting software), you’ll assign the MIDI note numbers to specific drum sounds (e.g., snare drum = note 38, kick drum = note 36, etc.).

- When the MIDI note is received, the DAW plays the corresponding drum sound from its virtual instruments (like **EZ Drummer** or any other drum sample library).

- The velocity data also influences how loudly or softly the sound is played.


3. **Circuit Design**


A basic Arduino drum kit circuit would look like this:

- **Piezo Sensor**: One end connected to an analog pin on the Arduino, and the other end connected to ground (through a resistor to avoid voltage spikes).

- **10k Resistor**: Connected between the analog input pin and ground to prevent floating voltage when there’s no input.

- **Arduino**: Reads the sensor data through the analog pin and processes it.


For each drum pad, a separate piezo sensor is connected to a different analog pin on the Arduino. So, if you have a 5-pad drum kit, you’ll need 5 piezo sensors, 5 analog pins, and 5 resistors.


### 4. **Software Side (Arduino Code and MIDI)**

- The Arduino code typically consists of:

- Reading analog input from the piezo sensor.

- Detecting when the analog signal exceeds a set threshold.

- Converting the sensor data into a MIDI note message.

- Sending the MIDI data to the computer.


Here is a simple example of how the Arduino code might look:


```cpp

#include <MIDI.h>


const int piezoPin = A0; // Piezo sensor connected to analog pin A0

const int threshold = 10; // Minimum value to trigger a hit

const int note = 38; // MIDI note for snare drum

const int velocity = 100; // Default velocity for hit


void setup() {

MIDI.begin(); // Initialize MIDI communication

}


void loop() {

int piezoValue = analogRead(piezoPin); // Read piezo sensor value


if (piezoValue > threshold) { // If hit detected

MIDI.sendNoteOn(note, velocity, 1); // Send MIDI Note On message

delay(10); // Short delay to debounce

MIDI.sendNoteOff(note, 0, 1); // Send MIDI Note Off message

}

}

```


This code reads the sensor value, checks if the value exceeds a threshold, and sends a MIDI note corresponding to the drum sound in the DAW.


5. **Software to Connect Arduino to DAW**

- **Hairless MIDI**: This software bridges the serial output from the Arduino to a virtual MIDI device on the computer.

- **LoopMIDI**: Creates a virtual MIDI port so that the DAW can receive MIDI signals from the Arduino.


In the DAW, map the MIDI notes from the Arduino to the corresponding drum sounds, and you have a functional virtual drum kit.


### Conclusion:

An Arduino-based virtual drum kit uses piezo sensors to detect vibrations, converts them into voltage signals, and processes them into MIDI messages. These messages are sent to a DAW, where they trigger virtual drum sounds. The use of resistors helps stabilize the signals, ensuring accurate detection of drum hits. Through this simple yet effective setup, you can create a DIY virtual drum kit capable of performing in any digital music environment.

Drum Pads and Triggers

v drum 3d model.jpg
final v drum.jpg
Low Budget Trigger Pad DIY (E-drums)
DIY - Homemade Electronic Drumkit part4 - Building 12inch Tom pad
How to make a drum from bucket
WhatsApp Image 2024-09-25 at 12.50.25_30d38138.jpg
WhatsApp Image 2024-09-25 at 12.50.25_188ce511.jpg
WhatsApp Image 2024-09-25 at 12.50.26_e48c59eb.jpg


Here, I have given you three videos. Watching them thoroughly will give you a better understanding of DIY build drum pads and drum triggers and how they work. After watching these videos, you should be able to make your drum pads and drum triggers and place the piezo sensors accordinglly.

Honestly, here, imagination is your only friend on how you are going to make the drum pads and triggers. But you must get the concept of how the drum trigger works along with the drum pads.


Here, I have also given how I made many drum pads using duck tape and bucket heads and the way I managed to activate the drum trigger.

Now, the only thing left for you is to get started, and along the way, you will find your way of building this

Crafting the Drum Structure

final v drum.jpg
v drum 3d model.jpg
Untitled 1 - frame at 0m56s.jpg


1. **Physical Drum Kit Construction (Image 1)**


In the first image, you can see the DIY drum kit made from the following:

- **PVC Pipes**: I used PVC pipes to construct the frame of the drum kit. The pipes were cut and arranged into a simple and sturdy structure to hold the drum pads and cymbals.

- **Drum Pads**: The circular drum pads are made from materials like plastic or wood and the drum skin is made with duct tape , with piezo sensors attached beneath the surface to detect vibrations. You can see three main drum pads (for snare and toms) and cymbal pads.

- **Cymbal Pads**: I designed the cymbals using a similar material, with piezo sensors attached to detect hits.

- **Foot Pedal**: At the bottom, there's a kick drum pedal .


In this setup:

- Each pad contains a **piezo sensor** that detects vibrations when hit, which are sent to the **Arduino** for processing.

- The PVC pipe frame acts as a lightweight, cost-effective, and customizable structure to mount the pads.


2. **3D Model in Paint 3D (Image 2)**


In the second image, I show a 3D model created in **Paint 3D**, where I've visually designed the structure of my drum kit:

- **Cylindrical Pads**: The circular shapes in the 3D model represent the drum pads and cymbals I designed in the real kit.

- **Frame Representation**: I used simple cylindrical shapes to represent the PVC pipe structure. The layout mimics the actual physical frame, with pads positioned similarly.

- **Color Coding**: In the 3D model, everything is shown in a uniform color for simplicity.


How I Made It:

- **PVC Pipe Frame**:

- I measured and cut the PVC pipes to the appropriate lengths, then assembled them using PVC connectors, elbows, and T-joints. PVC is lightweight, easy to cut, and affordable, making it ideal for DIY projects like this.

- The frame is strong enough to hold the drum pads and withstand the force of hitting them during playing.

- **Drum Pads and Sensors**:

- For each pad, I used a hard surface (like plastic, wood, or rubber) and attached **piezo sensors** beneath. When the surface is struck, the piezo sensors convert the vibrations into voltage signals, which are processed by the **Arduino**.


- **Paint 3D Model**:

- I used **Paint 3D** to create a digital representation of the kit. Paint 3D allows me to build 3D models using basic shapes (cylinders, spheres, etc.), which I arranged to mirror the layout of the actual kit. This helped with visualization, especially while planning or modifying the design.


### Conclusion:

The combination of PVC pipes for the physical frame and Paint 3D for the 3D model gives me a DIY setup that is both functional and visually planned. The drum pads, attached to piezo sensors and linked to an Arduino, send MIDI signals to my DAW, enabling me to play digital drums in a virtual setup.


This creative use of materials and tools is a resourceful approach to building an electronic drum kit!


Circuit Design & Explanation

circuit design.jpg

This image shows the circuit design for **my DIY virtual drum kit** using an **Arduino Uno** and **piezo sensors**. Here’s a detailed explanation of the circuit:


### Key Components:

1. **Piezo Sensors**: These are the round black discs that detect the vibrations when the drum pads are hit. I connected five sensors in this design, corresponding to different drum pads.

2. **Arduino Uno**: This microcontroller serves as the brain of the project, where the signals from the piezo sensors are processed and sent to my computer or DAW for triggering drum sounds.

3. **10K Resistors**: I placed resistors in series with each piezo sensor to help regulate the voltage, preventing any damaging spikes from the sensor input.

4. **Footswitch for Hi-Hat**: A footswitch is connected to control the hi-hat, mimicking the opening and closing mechanism used in traditional drum kits.


### Circuit Design Breakdown:


#### Piezo Sensors to Arduino:

- Each **piezo sensor** has two leads: positive (+) and negative (-).

- I connected the **positive lead** of each sensor to an **analog input pin** on the Arduino (A0 to A4 in this case).

- The **negative lead** of each piezo sensor is connected to the **ground (GND)** on the Arduino through a **10K ohm resistor**. This setup helps stabilize the signal from the sensor and avoids false readings.

#### Footswitch for Hi-Hat:

- The footswitch is wired with two connections:

- One goes to **ground (GND)**.

- The other connects to a **digital pin** on the Arduino. I use the footswitch to toggle between open and closed hi-hat sounds, which I’ve configured in the software.


#### Arduino Power and USB Connection:

- The **USB cable** connected to the Arduino provides power and communication with my computer. This setup connects to my DAW (like **FL Studio**) via **MIDI** to trigger sounds from the piezo sensor hits.


### How It Works:

- When I hit a drum pad, the piezo sensor detects the vibration and generates a small voltage signal.

- This signal is read by the **analog input pins (A0 to A4)** on the Arduino.

- The Arduino processes the signal and sends it as a **MIDI message** to my DAW or drum software.

- The **foot switch** adds additional control for the hi-hat, allowing me to toggle between open and closed states when pressed.


### Conclusion:

This circuit allows me to convert physical drum pad hits into MIDI signals using piezo sensors and the Arduino. By incorporating resistors, I can prevent voltage spikes, ensuring accurate and reliable sensor readings. The footswitch gives me control over the hi-hat, enabling dynamic performance, just like in an acoustic drum set.



Coading and Implementation

0_7VyEZgzwUhQMeBqb.jpg
AEK-CH2-SC2.1-ARDUINO-IDE.png

### Code Breakdown:


1. **Piezo Sensors (Code Alpha)**:

- The array `piezoPinsAlpha[]` defines which analog pins the piezo sensors are connected to.

- `thresholdsAlpha[]` sets sensitivity thresholds for each piezo sensor (so only strong enough hits are registered).

- `midiNotesAlpha[]` assigns a specific **MIDI note** to each piezo sensor. For example, hitting the first sensor sends MIDI note 62 (which could correspond to a snare sound).

- When a sensor is hit and its value exceeds the threshold, a **MIDI Note On** message is sent using `sendMIDI()`. A small delay prevents false double hits (`lastHitTimesAlpha[]`).


2. **Hi-Hat Control**:

- The **Hi-Hat footswitch** is read via digital pin 2. When pressed (closed) or released (open), it affects which MIDI note is sent: either Hi-Hat closed (MIDI note 69) or Hi-Hat open (MIDI note 70).

- The **Hi-Hat analog sensor** is read from analog pin A5 to detect if the pedal is moved enough to cross a threshold (`thresholdHiHat`), adding further control over the Hi-Hat's state.


3. **Piezo Sensor (Code Beta - Snare)**:

- A separate piezo sensor connected to **pin A0** is designated as the snare drum sensor.

- This code checks the piezo sensor and calculates the peak signal strength during a short time window. The peak is then used to calculate the velocity (force) of the hit.

- The MIDI note assigned is 60 (which could correspond to a snare sound). The velocity (how hard the drum was hit) is mapped to a range from 0 to 127.


4. **MIDI Communication**:

- The `sendMIDI()` function is used to send MIDI **Note On** and **Note Off** messages via the serial interface.

- This is done using the standard MIDI protocol, with 0x90 for **Note On** and 0x80 for **Note Off**, and the note and velocity values are sent afterward.


### Arduino Libraries:

In this case, the code doesn't seem to require any external libraries because it manually constructs MIDI messages using the serial interface. However, if you want to simplify things and use a dedicated library, you could install the **MIDI Library** for Arduino.


#### To install the MIDI Library:

1. **Open Arduino IDE**.

2. Go to **Sketch** -> **Include Library** -> **Manage Libraries**.

3. Search for **MIDI Library**.

4. Install it.


Alternatively, you can work without the library since MIDI is being handled directly in the code.


### Running and Uploading the Code to Arduino:

1. **Connect your Arduino Uno** to your computer via USB.

2. **Open the Arduino IDE**.

3. **Copy and paste the provided code** into a new sketch.

4. Go to **Tools** -> **Board** and select **Arduino Uno**.

5. Go to **Tools** -> **Port** and select the port your Arduino is connected to.

6. **Verify the code** by clicking the checkmark icon at the top left.

7. If there are no errors, click the **Upload** button (right arrow icon) to upload the code to your Arduino.

8. Once the upload is complete, open the **Serial Monitor** (or use a MIDI interface connected to the serial port) to monitor the MIDI messages being sent when you hit the piezo sensors or use the footswitch.


This setup will allow your Arduino to send MIDI messages over USB, which you can use to control drum software or a MIDI module.



Downloads

Setting Up Virtual Midi Cable

llop midi.jpg
hairless midi.jpg
setting up fl studio.jpg

### Setting Up Virtual MIDI Communication Using **loopMIDI** and **Hairless MIDI** for Arduino Uno


When you're using an **Arduino Uno** to send MIDI messages, you need a way to route the MIDI data from the Arduino to software that can interpret MIDI messages, like **FL Studio**. This is where **virtual MIDI cables** come into play. **loopMIDI** and **Hairless MIDI** help bridge this gap, allowing you to route MIDI data from the Arduino into your DAW (Digital Audio Workstation) like FL Studio.


What is a Virtual MIDI Cable?

A **virtual MIDI cable** allows your computer to simulate the connection between MIDI hardware (like keyboards or drum kits) and software. Since Arduino Uno communicates over USB as a serial device (not directly as a MIDI device), the virtual MIDI cable helps convert and route serial data into a MIDI stream that your music software can recognize.


### Step-by-Step Guide to Set Up **loopMIDI** and **Hairless MIDI**


1. **Download and Install loopMIDI**

- **loopMIDI** creates a virtual MIDI port on your system, allowing MIDI signals to be sent between applications.

- Download loopMIDI from: [**loopMIDI**](https://www.tobias-erichsen.de/software/loopmidi.html)

- Install the software and run it.

- In loopMIDI, click **“+”** to create a new virtual MIDI port. Name this port something like **“Arduino MIDI”**.


2. **Download and Install Hairless MIDI**

- **Hairless MIDI-to-Serial Bridge** converts serial data from the Arduino to MIDI messages and routes it to loopMIDI.

- Download Hairless MIDI from: [**Hairless MIDI**](http://projectgus.github.io/hairless-midiserial/).

- Install Hairless MIDI and open it.


3. **Configure Hairless MIDI**

- In **Hairless MIDI**, select the **serial port** where your Arduino is connected (this will be something like `COM3` on Windows or `/dev/ttyUSB0` on Linux).

- Under **MIDI Out**, select the virtual MIDI port you created in loopMIDI (e.g., **“Arduino MIDI”**).

- Make sure the **baud rate** matches the one set in your Arduino code. The default baud rate in your Arduino code is set to `38400`. You must change this in Hairless MIDI under **Baud rate** in the settings.


Changing the Baud Rate in Code and Hairless MIDI:

- In your Arduino code, the baud rate is set with `Serial.begin(38400);`.

- Ensure that the **baud rate in Hairless MIDI** matches this value. Hairless MIDI will not work if the baud rates are different.


4. **Testing the MIDI Connection**

- Once everything is set up, you should start seeing MIDI messages in the Hairless MIDI window when you hit the piezo sensors. This confirms that the serial data from the Arduino is being converted into MIDI messages correctly.

- If there are any errors (e.g., MIDI buffer overflow), try increasing the buffer size or lowering the baud rate slightly.


---


Setting Up FL Studio to Detect loopMIDI as a MIDI Input Device


Now that your Arduino is sending MIDI data via the virtual MIDI cable, you need to configure **FL Studio** to recognize this input.


1. **Open FL Studio**.

- Open FL Studio and navigate to **Options** -> **MIDI Settings**.


2. **Enable the Virtual MIDI Port (loopMIDI) as a MIDI Input**.

- In the **Input** section of the MIDI settings, you should see the virtual MIDI port you created in loopMIDI (e.g., **“Arduino MIDI”**).

- **Enable** this input by clicking the checkmark next to it.

- Set the **Controller Type** to **Generic Controller**.

- Ensure **Enable** is checked in both **Input** and **Output** settings, allowing FL Studio to receive and send MIDI data.


3. **Set MIDI Channels**.

- In FL Studio, make sure the **MIDI Channel** is set to **1** (as your code sends MIDI Note On and Note Off messages on channel 1 by default).

- This ensures that the drum pads (piezo sensors) trigger the correct instruments or samples.


4. **Assign MIDI Notes to Drum Sounds**.

- In **FL Studio**, open the **Channel Rack** or **Piano Roll**.

- You can now assign each MIDI note (e.g., 60 for snare, 62 for kick, etc.) to trigger a specific drum sound.

- For example, open a drum sample and set it to trigger when it receives MIDI Note 60 (which is assigned to the snare in your code).

- Repeat this for each of the notes assigned in your Arduino code.


5. **Testing the Setup**:

- After setting up the virtual MIDI port and configuring FL Studio, hit the piezo sensors.

- FL Studio should now recognize the hits and generate the corresponding MIDI notes, triggering drum sounds inside the software.


---


Use Case of Virtual MIDI Cable with Arduino Uno


The **Arduino Uno** communicates via **Serial** over USB and does not natively support MIDI over USB. By using a **virtual MIDI cable** (via **loopMIDI** and **Hairless MIDI**), the Arduino can send **MIDI data** to your computer without needing dedicated MIDI hardware. This is particularly useful when building:

- DIY drum kits.

- MIDI controllers using analog or digital sensors (like your piezo sensors).


**Key benefits**:

- Allows you to use Arduino for complex MIDI projects without extra hardware.

- Easily integrates with DAWs like **FL Studio**, Ableton Live, etc.

- Cost-effective way to create custom MIDI instruments.


---


Summary of Steps to Set Up Arduino Uno with Virtual MIDI and FL Studio:

1. **Install and configure loopMIDI** to create a virtual MIDI port.

2. **Install and configure Hairless MIDI** to bridge the Arduino’s serial data to the virtual MIDI port.

3. Ensure the **baud rate** is consistent between the code and Hairless MIDI (38400 in this case).

4. **Open FL Studio** and set the virtual MIDI port as an input device.

5. Assign the corresponding MIDI notes in FL Studio to generate the drum sounds.

6. Test the setup by hitting the piezo sensors and observing the MIDI messages in FL Studio.


This setup allows you to use an Arduino Uno to create a DIY MIDI drum kit, triggering sounds in **FL Studio** in real-time.

Prototye Version

Diy v Drum Prototype
arduino diy drum prototype

this is the prototype version . i had to run some experiment before the final crafting.

Ez Drum Mapping

**EZDrummer Mapping with Corresponding MIDI Notes from Piezo Sensors in FL Studio**

/// or simply search in youtube how to map ez drum for a v drum kit or read the ez drum mapping manual///


However here is the detailed explanation for better understanding.....


EZDrummer is a widely-used VST plugin for drum sounds. When working with **Arduino piezo sensors**, which are sending MIDI notes, you need to map these notes to trigger the correct drum sounds in EZDrummer inside **FL Studio**.


### Step-by-Step Explanation for Mapping:


#### 1. **Understanding MIDI Notes and Piezo Sensors**

In your Arduino code, each piezo sensor is assigned a MIDI note, for example:

- **Snare** (sensor on pin A0) sends **MIDI Note 60**.

- **Kick** (sensor on pin A1) sends **MIDI Note 62**.

- **Tom** (sensor on pin A2) sends **MIDI Note 64**, etc.


EZDrummer has a predefined MIDI mapping for drums. Each note corresponds to a specific drum element, such as snare, kick, toms, or hi-hat. You need to match the MIDI notes generated by your piezo sensors with EZDrummer’s mapping.


#### 2. **Default EZDrummer MIDI Map**

Here is the standard MIDI mapping for key drum sounds in EZDrummer:

- **MIDI Note 36**: Kick drum

- **MIDI Note 38**: Snare drum

- **MIDI Note 42**: Closed Hi-Hat

- **MIDI Note 46**: Open Hi-Hat

- **MIDI Note 48**: Tom 1

- **MIDI Note 50**: Tom 2

- **MIDI Note 45**: Tom 3

- **MIDI Note 49**: Crash Cymbal

- **MIDI Note 51**: Ride Cymbal


To map your sensors to the right sounds, you need to ensure that the MIDI notes from the Arduino correspond to the drum sounds in EZDrummer.


#### 3. **Changing Arduino MIDI Notes to Match EZDrummer**

Let’s say you want your piezo sensors to trigger these specific sounds:

- **Kick drum** (MIDI Note 36): Change the Arduino code to send **MIDI Note 36** from the sensor connected to pin A1.

- **Snare drum** (MIDI Note 38): Change the Arduino code to send **MIDI Note 38** from the sensor connected to pin A0.

- **Hi-Hat** (MIDI Note 42 for closed, MIDI Note 46 for open): Map your foot pedal or another piezo sensor to these notes.


You can modify the array in your Arduino code:

```cpp

const int midiNotesAlpha[] = {38, 36, 48, 50}; // MIDI note numbers for snare, kick, tom 1, tom 2

```


#### 4. **Setting Up EZDrummer in FL Studio**


1. **Open FL Studio** and create a new project.

2. Add **EZDrummer** as a plugin by going to **Channels** -> **Add One** -> **More Plugins** -> Find EZDrummer.

3. Insert EZDrummer into the Channel Rack.

4. Open the **MIDI Settings** in FL Studio (Options -> MIDI Settings) and ensure the **loopMIDI port** is selected as the MIDI input, and it's enabled.


#### 5. **Mapping the MIDI Notes in FL Studio**

Once your Arduino is sending the correct MIDI notes, and FL Studio is receiving these notes via the **loopMIDI** port, you can open **EZDrummer** in FL Studio’s channel rack and configure the input.


- In FL Studio, click on the **Piano Roll** of the channel where EZDrummer is loaded.

- Play the piezo sensors to confirm which note is being triggered.

- You will see MIDI notes being recorded in the **Piano Roll** based on the Arduino's input. Match these to the corresponding drum elements in EZDrummer.


#### 6. **Mapping the Correct MIDI Notes**

If any of the sensors are not triggering the correct drum element (e.g., the snare is triggering a tom), you can either:

- **Change the MIDI note in your Arduino code**.

- **Remap inside EZDrummer** (if supported) using a custom drum map or adjusting MIDI routing.


### Example: Mapping in FL Studio with EZDrummer

- When you hit the **kick sensor** (MIDI Note 36), EZDrummer should trigger the **kick drum** sound.

- When you hit the **snare sensor** (MIDI Note 38), EZDrummer should trigger the **snare drum**.

- Adjust the foot pedal to control the **closed hi-hat** (MIDI Note 42) and **open hi-hat** (MIDI Note 46).


#### 7. **Visual Representation Inside FL Studio** (Picture Guide)


Here is a typical visual representation you can expect inside FL Studio:


1. **Channel Rack**: EZDrummer is loaded, and the piezo sensors are triggering the MIDI inputs, which correspond to different drum elements in EZDrummer.

2. **Piano Roll**: Shows the MIDI notes being triggered as you hit the piezo sensors. Each note corresponds to a specific drum sound in EZDrummer.

In the **Piano Roll** of FL Studio:

- **C1 (MIDI Note 36)** will trigger the kick drum.

- **D1 (MIDI Note 38)** will trigger the snare drum.

- **F#1 (MIDI Note 42)** will trigger the closed hi-hat, and so on.


---


### Conclusion:

Using Arduino piezo sensors with **EZDrummer** in FL Studio requires proper mapping of MIDI notes. You can adjust the Arduino code to send the correct MIDI notes that match EZDrummer’s drum kit mapping. Then, configure FL Studio to detect the MIDI signals via **loopMIDI**, and use EZDrummer to generate high-quality drum sounds in response to your piezo sensor triggers.


By following the steps above, you can create a DIY electronic drum kit using Arduino, and have it fully integrated into **FL Studio** with professional-grade sounds from **EZDrummer**.

Final Version

The Reason - Hoobastank || Drum Cover by Mahin

This is the part where i hit the drum pads with pride .. Hell yeahhhhhhhh.😎😎😎💪💪🤘🤘🤘

Enjoy Building Your Very Own Diy V Drum.

stock-photo-inspirational-quotes-deep-meaning-quotes-you-learn-more-from-failure-than-from-success-don-t-2308056067.jpg

Congratulations, you have made it this far, certainly. You are one of the greatest minds. I really admire the passion that drove you this far. I am very excited to share this journey with you guys as you guys also feel the same way I feel about crafting, experimenting, and making things on our own. Though this habit of ours is indeed a curse and also a blessing.

I know how it feels to be at a dead end, and here and there, i may have made some mistakes . Keep me in your kind consideration, as this is my first autodex project, and let me know if you guys have any questions. I'll be more than happy to answer.


MY FACEBOOK: https://www.facebook.com/afzalh0ssainmahin/

MY YOUTUBE: https://www.youtube.com/@afzalhossainmahin