I understand it's called a debounce. Not sure precisely what's going on. But if 
you want to make sure only one gets through I always use a [sel 1] or [sel 0]. 
or of course [sel 0 1] followed by [del 10] which only accepts bangs, and 
delays the output by 10 milliseconds, which you won't notice. But when it 
recieves a bang before the previous one has outputted it restarts the sequence, 
result, only one message on each key on or key off. 

Hope this helps.  

Date: Tue, 15 Jun 2010 12:16:42 +0100
From: [email protected]
To: [email protected]
Subject: [PD] HID double event bug










I filed a bug report some time ago here:
https://sourceforge.net/tracker/?func=detail&aid=3002665&group_id=55736&atid=478070

Just tested this with Pd version 0.42.5-extended-rc2 on Ubuntu 10.04
and it's the same. Basically I get two events for each key press like
this:



[hid] opened device 4 (/dev/input/event4): AT Translated Set 2 keyboard

print: key key_space 1

print: key key_space 1

print: key key_space 0

print: key key_space 0



Thought I'd mention here too as surely this is a bug? Not a major
problem, but it means I always need an [alternate] object or similar.
This then became a problem when working on a patch for two note chords
when the key commands do not always arrive in the same order and some
notes would stay on.



James

                                          
_________________________________________________________________
http://clk.atdmt.com/UKM/go/195013117/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to