Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added velocity scaling #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

skutamac
Copy link

@skutamac skutamac commented Feb 8, 2017

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.

Added Velocity scaling for each piezo to change how the velocity
responds to how hard you hit the pads.
@skutamac
Copy link
Author

skutamac commented Feb 8, 2017

P.S. This is my first fork and Pull request using GitHub.

@milo123milo
Copy link

How can i add more drums into your code with velocity?

@ukrulesok
Copy link

Hi, Nice update but you missed out :-

unsigned short velScale[NUM_PIEZOS];

Regards,
Andy.

@godbless876
Copy link

Whenever i copy and paste the code i get a couple error reading.. what should i do?

Copy link

@jhex12 jhex12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants