Skip to content

Commit

Permalink
update for 0.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
RyoKosaka committed Apr 30, 2020
1 parent 965ed4f commit 9274ce7
Show file tree
Hide file tree
Showing 13 changed files with 184 additions and 159 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HelloDrum Arduino Library
This is a library for making E-Drum with Arduino.
**Ver.0.7.4(4/27/2020) Work in progress.**
**Ver.0.7.5(4/30/2020) Work in progress.**

## Description

Expand Down Expand Up @@ -190,11 +190,11 @@ Record the time you started closing the hi-hat and the time you finished closing

## Velocity Curve

- Velocity Curve Type (Ver 0.7.4)
- Velocity Curve Type (Ver 0.7.5)
<img src="https://open-e-drums.com/images/sensing/curve.png" width="800px">


## Circuit (v0.7.4)
## Circuit (v0.7.5)
- Single Piezo
<img src="https://open-e-drums.com/images/circuit/074/singlePiezo.png" width="800px">

Expand Down Expand Up @@ -234,6 +234,12 @@ The STL data of pads from 6 inches to 12 inches, hi-hat controllers(<https://www

## Release History

* 0.7.5
- Bug fix for ESP32
- Bug fix for hihatControl()
- Update sample codes
- Add pullup mode to deal with floating pins (Beta)
- Add debug mode
* 0.7.4
- Add velocity curve function
- FSR() and TCRT5000() integrated into hihatControl()
Expand Down
8 changes: 4 additions & 4 deletions examples/Basic/SimpleSensing/SimpleSensing.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
byte SNARE[6] = {
100, //sensitivity (1-100)
10, //threshold (1-100)
30, //scan time (1-)
10, //mask time (1-)
10, //scan time (1-)
30, //mask time (1-)
38, //note (0-127)
1 //curve type (0-4)
};

byte TOM[6] = {
100, //sensitivity (1-100)
10, //threshold (1-100)
30, //scan time (1-)
10, //mask time(1-)
10, //scan time (1-)
30, //mask time(1-)
50, //note (0-127)
1 //curve type(0-4)
};
Expand Down
6 changes: 3 additions & 3 deletions examples/Basic/cymbal_2zone/cymbal_2zone.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
EXAMPLE - 2 Zone Cymbal Sensing
This sample code tesed with YAMAHA PCY135/PCY155.
This sample code is tesed with YAMAHA PCY135/PCY155.
https://open-e-drums.tumblr.com/
*/

Expand Down Expand Up @@ -34,8 +34,8 @@ byte CRASH[8] = {
#include <hellodrum.h>
MIDI_CREATE_DEFAULT_INSTANCE();

//Please name your piezo.
//The piezo named "crash" is connected to the A0 pin and A1 pin.
//Please name your cymbal.
//The cymbal named "crash" is connected to the A0 pin (piezo) and A1 pin (edge sensor).
HelloDrum crash(0, 1);

void setup()
Expand Down
6 changes: 3 additions & 3 deletions examples/Basic/cymbal_3zone/cymbal_3zone.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
EXAMPLE - 3 Zone Cymbal Sensing
This sample code tesed with YAMAHA PCY135/PCY155.
This sample code is tesed with YAMAHA PCY135/PCY155.
https://open-e-drums.tumblr.com/
*/

Expand Down Expand Up @@ -36,8 +36,8 @@ byte RIDE[10] = {
#include <hellodrum.h>
MIDI_CREATE_DEFAULT_INSTANCE();

//Please name your piezo.
//The piezo named ride is connected to the A0 pin and A1 pin.
//Please name your cymbal.
//The cymbal named ride is connected to the A0 pin (piezo) and A1 pin (edge sensor).
HelloDrum ride(0, 1);

void setup()
Expand Down
3 changes: 1 addition & 2 deletions examples/Basic/dualPiezoSensing/dualPiezoSensing.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
EXAMPLE - Dual Piezo Sensing
With this sample code, you can make 2 zone snare drum.
With this sample code, you can make 2-zone snare drum.
Tested with Roland PD-85
Pads & Controller Circuit:
Expand Down Expand Up @@ -61,7 +61,6 @@ void setup()

void loop()
{

//Sensing pad.
snare.dualPiezo(SNARE[0], SNARE[1], SNARE[2], SNARE[3], SNARE[4], SNARE[5]); //dualPiezo(byte sens, byte thre, byte scan, byte mask, byte rimSens, byte rimThre);

Expand Down
4 changes: 2 additions & 2 deletions examples/Basic/hihat/hihat.ino
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ void loop()
MIDI.sendNoteOff(HIHAT[4], 0, 10);
}
//2.close
else
else if (hihatPedal.closeHH == true)
{
MIDI.sendNoteOn(HIHAT[5], hihat.velocity, 10); //(note, velocity, channel)
MIDI.sendNoteOff(HIHAT[5], 0, 10);
}
}

//when pedal is closed
if (hihatPedal.closeHH == true)
if (hihatPedal.hit == true)
{
MIDI.sendNoteOn(HIHAT_PEDAL[5], hihatPedal.velocity, 10); //(note, velocity, channel)
MIDI.sendNoteOff(HIHAT_PEDAL[5], 0, 10);
Expand Down
16 changes: 8 additions & 8 deletions examples/Basic/hihat_2zone/hihat_2zone.ino
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
EXAMPLE - 2-zone Hi-Hat with hihat Controller (FSR or TCRT5000)
EXAMPLE - 2-zone Hi-Hat with hihat Controller (FSR or TCRT5000)
This sample code tesed with Roland VH-10.
https://open-e-drums.tumblr.com/
This sample code tesed with Roland VH-10.
https://open-e-drums.tumblr.com/
*/

/* NOTICE
You have to install the MIDI library.
MIDI : https://playground.arduino.cc/Main/MIDILibrary
You have to install the MIDI library.
MIDI : https://playground.arduino.cc/Main/MIDILibrary
*/

Expand Down Expand Up @@ -87,7 +87,7 @@ void loop()
MIDI.sendNoteOff(HIHAT[5], 0, 10);
}
//2.close
else
else if (hihatPedal.closeHH == true)
{
MIDI.sendNoteOn(HIHAT[6], hihat.velocity, 10); //(note, velocity, channel)
MIDI.sendNoteOff(HIHAT[6], 0, 10);
Expand All @@ -105,15 +105,15 @@ void loop()
MIDI.sendNoteOff(HIHAT[7], 0, 10);
}
//2.close
else
else if (hihatPedal.closeHH == true)
{
MIDI.sendNoteOn(HIHAT[8], hihat.velocity, 10); //(note, velocity, channel)
MIDI.sendNoteOff(HIHAT[8], 0, 10);
}
}

//when pedal is closed
if (hihatPedal.closeHH == true)
if (hihatPedal.hit == true)
{
MIDI.sendNoteOn(HIHAT_PEDAL[5], hihatPedal.velocity, 10); //(note, velocity, channel)
MIDI.sendNoteOff(HIHAT_PEDAL[5], 0, 10);
Expand Down
2 changes: 1 addition & 1 deletion examples/EEPROM/SimpleSensing/SimpleSensing.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
EXAMPLE - Simple Piezo Sensing
EXAMPLE - Simple Piezo Sensing (EEPROM and LCD)
With this sample code, you will make snare and tom using two piezo.
https://open-e-drums.tumblr.com/
Expand Down
34 changes: 25 additions & 9 deletions examples/EEPROM/minimalDrumkit/minimalDrumkit.ino
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
Button for BACK to digital pin 10
LCD Circuit:https://www.arduino.cc/en/Tutorial/HelloWorld
LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2
LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2
https://open-e-drums.tumblr.com/
*/
Expand Down Expand Up @@ -158,6 +157,23 @@ void loop()
lcd.print(hitPad);
lcd.setCursor(0, 1);
lcd.print(velocity);

if (hihat.hit == true)
{
//check open or close
//1.open
if (hihatPedal.openHH == true)
{
lcd.setCursor(15, 0);
lcd.print("O");
}
//2.close
else if (hihatPedal.closeHH == true)
{
lcd.setCursor(15, 0);
lcd.print("C");
}
}
}

////////// 2. SENSING & SENDING MIDI////////////
Expand Down Expand Up @@ -195,7 +211,7 @@ void loop()
MIDI.sendNoteOff(hihat.noteOpen, 0, 10);
}
//2.close
else
else if (hihatPedal.closeHH == true)
{
MIDI.sendNoteOn(hihat.noteClose, hihat.velocity, 10); //(note of close, velocity, channel)
MIDI.sendNoteOff(hihat.noteClose, 0, 10);
Expand All @@ -204,7 +220,7 @@ void loop()

//HIHAT CONTROLLER//
//when hihat is closed
if (hihatPedal.closeHH == true)
if (hihatPedal.hit == true)
{
MIDI.sendNoteOn(hihatPedal.note, hihatPedal.velocity, 10); //(note of pedal, velocity, channel)
MIDI.sendNoteOff(hihatPedal.note, 0, 10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void loop()
MIDI.sendNoteOff(hihat.noteOpen, 0, 10);
}
//2.close
else
else if (hihatPedal.closeHH == true)
{
MIDI.sendNoteOn(hihat.noteClose, hihat.velocity, 10); //(note of close, velocity, channel)
MIDI.sendNoteOff(hihat.noteClose, 0, 10);
Expand All @@ -216,7 +216,7 @@ void loop()

//HIHAT CONTROLLER//
//when hihat is closed
if (hihatPedal.closeHH == true)
if (hihatPedal.hit == true)
{
MIDI.sendNoteOn(hihatPedal.note, hihatPedal.velocity, 10); //(note of pedal, velocity, channel)
MIDI.sendNoteOff(hihatPedal.note, 0, 10);
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Hello Drum
version=0.7.4
version=0.7.5
author=Ryo Kosaka
maintainer=Ryo Kosaka <[email protected]>
sentence=Arduino Library for piezo sensing
Expand Down
Loading

0 comments on commit 9274ce7

Please sign in to comment.