All electrical contacts exhibit some degree of bounce, which is a brief intermittent contact at the make/break point. Reed switches often close in under a millisecond, but others can take 10 msec or more to stop bouncing. And it’s conceivable that the wiping action of the silver wire contacts could generate bounce as a key is being pressed or released. As I intend to poll the manual keys & pedals every millisecond, it’s important to detect and handle bounce, lest it lead to excess MIDI traffic and unnecessary taxation of the Hauptwerk machine. Below is the debounce state machine I’m using in the polling software. The gist is that a single key transition won’t lead to a MIDI note on/off message; rather, two consecutive polls must agree before the transition is complete. This scheme adds an acceptable 1 msec of latency. Bouncing is still possible with such a simple state machine, but MIDI-OX has detected virtually no bounce in my early tests, and I’m unwilling to add additional latency.
-
Recent Posts
Archives
- July 2012
- February 2012
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- October 2009
- August 2009
- July 2009
- March 2009
- January 2009
- November 2008
- September 2008
- August 2008
- November 2007
- August 2007
- May 2007
- March 2007
- January 2007
- December 2006
- November 2006
- October 2006
- August 2006
- June 2006
- May 2006
- March 2006
- December 2005
- November 2005
- October 2005
- September 2005
Blogroll
Meta