Skip to content

mmolokovskikh/HelloDrum-arduino-Library

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HelloDrum Arduino Library

This is a library for making E-Drum with Arduino.
Ver.0.7.1(8/3/2019) Work in progress.

Description

This is a library for making E-Drum with Arduino.
By using it with Arduino MIDI Library, you can make E-drum.
Blog :https://open-e-drums.tumblr.com/
YouTube :https://www.youtube.com/channel/UCNCDcIO26xL_NhI04QY-v4A

This software is an alpha version, and is unsupported. Use at your own risk.

Features

  • Single piezo pad, Dual Piezo pad, 2 zone cymbal, 3 zone cymbal
  • Compatible with YAMAHA's 3 zone cymbal(PCY135/PCY155)
  • Compatible with SoftPot, FSR and Optical(TCRT5000) type hi-hat controllers
  • Sensing with MUX(4051 and 4067)
  • Setting mode with LCD or OLED
  • Sensitivity, Threshold, Scan Time, Mask Time, Note Number can be set with each pad
  • Works with ESP32 and Teensy and AVR boards such as UNO and MEGA.

How to Use

  • Install

Use Arduino's Library Manager to install the library. Search for “hellodrum ”.
If you use MIDI, also install the MIDI Library.

  • 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
     int SNARE[5] = {
       80, //sensitivity 
       10, //threshold
       20, //scantime
       20, //masktime
       38  //note
     }; 
    
     void setup()
     {
         MIDI.begin(10);
     }
    
     void loop()
     {
         //Sensing
         snare.singlePiezo(SNARE[0], SNARE[1], SNARE[2], SNARE[3]);
    
         //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 4051):

     #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
     int SNARE[5] = {
       80,  //sensitivity
       10,  //threshold
       20,  //scantime
       20,  //masktime
       38   //note
     }; 
    
     void setup()
     {
         MIDI.begin(10);
     }
    
     void loop()
     {
         //scanning all pin of mux
         mux.scan();
    
         //Sensing
         snare.singlePiezoMUX(SNARE[0], SNARE[1], SNARE[2], SNARE[3]);
    
         //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

Circuit

  • Single Piezo

  • Dual Piezo

  • TCRT5000

  • FSR

  • YAMAHA PCY135/PCY155

  • Arduino UNO with MUX

  • ESP32 with MUX

Pads

The STL data of pads from 6 inches to 12 inches, hi-hat controllers(https://www.thingiverse.com/RyoKosaka/designs)

Release History

  • 0.7.1
    • Sensing with 16ch MUX(4067) is available
    • Update sample code
    • Organize folders and files
    • Add library.properties
    • Teensy3.2 has been tested
  • 0.7.0
    • Improved sensing
    • Dual Piezo sensing available (Test)
    • ESP32 EEPROM available
    • Setting mode with I2C LCD or I2C OLED available
    • Add sample code
  • 0.6.0
    • Sensing with MUX(4051) is available
    • Add BLE MIDI sample code with ESP32
    • Hihat Contorller with FSR is available
  • 0.5.0
    • Setting mode available
    • Display function by LCD is available
    • Saving function of setting items by EEPROM is available
    • Improved sensing of TCRT 5000 hi-hat controller
  • 0.1.0
    • Work in progress

Contributing

  1. Fork it
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create new Pull Request

Author

@tnctrekit
Works

Licence

MIT

About

This is a library for making E-Drum with arduino.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%