[sdiy] MIDI velocity
Richie Burnett
rburnett at richieburnett.co.uk
Wed Apr 6 18:43:54 CEST 2016
Thanks for the link Tom. I'm not familiar with "Vertical Counters". How
easy do you think it would be to increase the de-bounce count to say 16
consecutive identical "bounce-free" reads before the output states are
updated? The example he gives seems to work well with just a 2-bit count,
but I'm not sure how it would work for counting up to larger numbers for a
longer de-bouncing time.
-Richie,
-----Original Message-----
From: Tom Wiltshire
Sent: Wednesday, April 06, 2016 4:23 PM
To: Richie Burnett
Cc: synth-diy at dropmix.xs4all.nl ; Roman Sowa
Subject: Re: [sdiy] MIDI velocity
I've always used Scott Dattalo's vertical counter method. The counter has to
count four switch reads identical before it regards the switch as changed.
How fast that is depends on hw fast you scan the switches, obviously. I've
used it on keyboard keys, rotary encoder contacts, pushbuttons,
footswitches, you name it.
Unfortunately, Scott's excellent webpage is no more. However, through the
magic of technology…
http://web.archive.org/web/20120308155837/http://www.dattalo.com/technical/software/pic/debounce.html
http://web.archive.org/web/20120226170604/http://www.dattalo.com/technical/software/pic/vertcnt.html
This method is so clever I just *had* to use it! It's even better on a
dsPIC, where you can simultaneously debounce 16 inputs on a single port with
only a handful of instructions. I usually finish up with two registers
"SWITCH_CHANGES" and "SWITCH_STATES", which makes testing for various input
conditions very easy.
Tom
On 6 Apr 2016, at 11:45, Richie Burnett <rburnett at richieburnett.co.uk>
wrote:
> Out of interest, what rule do you use for the de-bouncing of musical
> instrument keys?
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7497 / Virus Database: 4545/11970 - Release Date: 04/06/16
More information about the Synth-diy
mailing list