Conversation
Added Velocity scaling for each piezo to change how the velocity responds to how hard you hit the pads.
|
P.S. This is my first fork and Pull request using GitHub. |
|
How can i add more drums into your code with velocity? |
|
Hi, Nice update but you missed out :-
Regards, |
|
Whenever i copy and paste the code i get a couple error reading.. what should i do? |
jhex12
left a comment
There was a problem hiding this comment.
IT SAID Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
C:\Users\jhex\Desktop\sketch_nov13b\sketch_nov13b.ino: In function 'void setup()':
sketch_nov13b:112:3: error: 'velScale' was not declared in this scope
velScale[0] = KICK_SCALE;
^~~~~~~~
C:\Users\jhex\Desktop\sketch_nov13b\sketch_nov13b.ino: In function 'void recordNewPeak(short int, short int)':
sketch_nov13b:205:43: error: 'velScale' was not declared in this scope
noteReadyVelocity[slot] = newPeak * velScale[slot] / 100;
^~~~~~~~
exit status 1
'velScale' was not declared in this scope
Invalid library found in C:\Users\jhex\Downloads\arduino-1.8.10-windows\arduino-1.8.10\libraries\arduino-drumkit-6e1087dfaecc8810d2a53661527a073b37e970bc: no headers files (.h) found in C:\Users\jhex\Downloads\arduino-1.8.10-windows\arduino-1.8.10\libraries\arduino-drumkit-6e1087dfaecc8810d2a53661527a073b37e970bc
Invalid library found in C:\Users\jhex\Downloads\arduino-1.8.10-windows\arduino-1.8.10\libraries\arduino-drumkit-6e1087dfaecc8810d2a53661527a073b37e970bc: no headers files (.h) found in C:\Users\jhex\Downloads\arduino-1.8.10-windows\arduino-1.8.10\libraries\arduino-drumkit-6e1087dfaecc8810d2a53661527a073b37e970bc
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Added Velocity scaling for each piezo to change how the velocity
responds to how hard you hit the pads.
If the scaling value is set below 100 then you have to hit the pad harder to reach maximum velocity. This enables a greater control of the velocity from soft touches to really hard hits.
Also if you want less sensitivity then increase the scaling above 100 to make the velocity max out with soft hits. This will help with beginners and kids where the velocity can be made to max out even with soft hits on the edge of the pads.
Scaling can be done on a per pad basis.