This is a library for making E-Drum with Arduino.
Ver.0.7.7(11/1/2020) Work in progress.
This is a library for making E-Drum with Arduino.
By using it with Arduino MIDI Library, you can make E-drum.
Project Page :https://open-e-drums.com/
Blog :https://open-e-drums.tumblr.com/
YouTube :https://www.youtube.com/channel/UCNCDcIO26xL_NhI04QY-v4A
3D Models of Pad :https://www.thingiverse.com/RyoKosaka/designs
This software is an alpha version, and is unsupported.
Use at your own risk.
Initialize EEPROM
If you want to use EEPROM to store the settings, you will need to initialize the EEPROM.
Please write the sample code, example > EEPROM > InitializeEEPROM > InitializeEEPROM.ino, to your Arduino. Once it's written, the initialization is complete.
Coding
#include <hellodrum.h>
#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();
//Please name your piezo.
//The piezo named snare is connected to the A0 pin
HelloDrum snare(0);
//Setting
byte SNARE[6] = {
80, //sensitivity
10, //threshold
20, //scantime
20, //masktime
38, //note
1 //curve type
};
void setup()
{
MIDI.begin(10);
snare.setCurve(SNARE[5]); //Set velocity curve
}
void loop()
{
//Sensing
snare.singlePiezo(SNARE[0], SNARE[1], SNARE[2], SNARE[3]); //(sensitivity, threshold, scantime, masktime)
//Sending MIDI signals
if (snare.hit == true) {
MIDI.sendNoteOn(SNARE[4], snare.velocity, 10); //(note, velocity, channel)
MIDI.sendNoteOff(SNARE[4], 0, 10);
}
}
Coding (MUX):
#include <hellodrum.h>
#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();
//Define MUX Pins
HelloDrumMUX_4051 mux(2,3,4,0);//D2, D3, D4, A0
//Please name your piezo.
//The piezo named snare is connected to MUX 0 pin
HelloDrum snare(0);
//Setting
byte SNARE[6] = {
80, //sensitivity
10, //threshold
20, //scantime
20, //masktime
38, //note
1 //curve type
};
void setup()
{
MIDI.begin(10);
snare.setCurve(SNARE[5]); //Set velocity curve
}
void loop()
{
//scanning all pin of mux
mux.scan();
//Sensing
snare.singlePiezoMUX(SNARE[0], SNARE[1], SNARE[2], SNARE[3]); //(sensitivity, threshold, scantime, masktime)
//Sending MIDI signals
if (snare.hit == true) {
MIDI.sendNoteOn(SNARE[4], snare.velocity, 10); //(note, velocity, channel)
MIDI.sendNoteOff(SNARE[4], 0, 10);
}
}
Check instruction.md for more info on coding.
FortySevenEffects Arduino MIDI Library
There are three ways to communicate with a PC using MIDI with an arduino.
#include <hellodrum.h>
#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();
//...
lathoub Arduino-USBMIDI
If you are using atmega32u4 (Arduino Leonardo, Arduino Micro, Arduino Pro Micro...), you can use USB-MIDI library. No additional software is needed, the 32u4 is recognized as a MIDI device.
#include <hellodrum.h>
#include <USB-MIDI.h>
USBMIDI_CREATE_DEFAULT_INSTANCE();
//...
lathoub Arduino-BLE-MIDI
It is very easy to use BLE-MIDI with ESP32.
You can find a device named "BLE-MIDI".
#include <hellodrum.h>
#include <BLEMIDI_Transport.h>
#include <hardware/BLEMIDI_ESP32.h>
BLEMIDI_CREATE_DEFAULT_INSTANCE();
//...
Please check the KORG's documentation for instructions on how to connect.
KORG Bluetooth MIDI Connection Guide
Be sure to check here first if it is not working properly.
Check sensing.md for sensing methods.
Check setting.md for setting values.
Check circuit.md for how to connect the pad and the board.
The STL data of pads from 6 inches to 12 inches, hi-hat controllers(https://www.thingiverse.com/RyoKosaka/designs)