[sdiy] Velocity Sensitivity Retrofit

Paul Schreiber synth1 at airmail.net
Thu Feb 28 07:49:54 CET 2008


> Yeah, I've always wondered how velocity sensitivity is done, searching
> around on google is surprisingly unhelpful. Any ideas from this list
> how it is done?

You do it in *firmware* with a uP scanning the keyboard. It's a simple timer 
routine, you detect coming off the top buss, you count the "flying time" 
until you hit the bottom buss.

Imagine a keyboard with 2 buss bars, one on the top (key at rest) and 
another when the key is depressed. You tie *both of these to ground, and 
every key wire is then tied to an individual pullup resistor. So (looking at 
1 key), when the key is "flying" (being depressed) the voltage of that key 
is a pulse from ground, to +5, then back to ground. The width of the pulse 
is proportional to the velocity (the faster you press, the narrower the 
pulse). Of course, there is nasty "key bounce" on each edge, but you should 
get the general idea.

In most modern keyboards, they keys are scanned in a diode matrix (like a 
calculator keyboard) by a uP. The firmware in the uP uses 16-bit timers to 
keep track of the velocity for each key (most uPs have dedicated HW timers, 
so you use RAM locations to really keep track of the count, which is an 
interrupt running say every 5ms).

Paul S.




More information about the Synth-diy mailing list