[PD] HID double triggers

James Dunn james at 4thharmonic.com
Thu Apr 19 11:42:06 CEST 2012


If it was spurious noise from a switch that was insufficiently 
debounced, surely I would get more random triggers? For example, 
sometimes one trigger, sometimes two or three? Also, if this is a 
fundamental issue with the hardware, then how does Mac OS X manage to 
handle it correctly? Surely it is an issue with either [hid] or linux, 
and therefore a bug with one or the other?

Thanks for the patch. It is possible to ignore duplicate messages in a 
stream as you suggest however it's complicated somewhat by the fact that 
the messages don't always arrive in the same order!

For example:

[hid] 0.7, written by Hans-Christoph Steiner <hans at eds.org> 
<mailto:hans at eds.org>
     compiled on Apr 15 2012 at 08:12:47
[hid] opened device 4 (/dev/input/event4): AT Translated Set 2 keyboard
print: key key_j 1
print: key key_l 1
print: key key_j 1
print: key key_l 1
print: key key_j 0
print: key key_j 0
print: key key_l 0
print: key key_l 0

I can filter these out later on, but it would be nice to have a bug free 
object!

thanks for you help

James


Quoth Andrew Faraday, on 18/04/2012 19:27:
> I've had this problem before with [hid], apparently it's a hardware 
> issue called 'debouncing', which is often ignored because it is often 
> irrelevant (pushed is pushed, for game controllers, rather than a 
> button-on/button-off signal used for most music systems).
>
> You can deal with the problem in pure data by using a trigger, float 
> and delay of one millisecond. See the attached patch, click the 
> message boxes and watch your terminal for the result.
>
> I hope this helps.
>
> Andrew
>
> ------------------------------------------------------------------------
> Date: Wed, 18 Apr 2012 16:53:44 +0100
> From: james at 4thharmonic.com
> To: pd-list at iem.kug.ac.at
> Subject: [PD] HID double triggers
>
> Hi list,
>
> recently I've been playing around with [hid] again and still have the 
> issue with double triggers on linux (see previous post here 
> <http://www.mail-archive.com/pd-list%40iem.at/msg32170.html>).
>
> I've downloaded the latest version of 
> Pd-0.43.1-extended-ubuntu-lucid-i386.deb 
> <http://autobuild.puredata.info/auto-build/latest/Pd-0.43.1-extended-ubuntu-lucid-i386.deb> 
> but I have the same problem with my existing Arch Linux installation 
> on my laptop as well.
>
> It works fine on Mac 10.6. The problem is that I basically get two 
> identical events for each key press and release, ie:
>
> [hid] 0.7, written by Hans-Christoph Steiner <hans at eds.org> 
> <mailto:hans at eds.org>
>     compiled on Apr 15 2012 at 08:12:47
> [hid] opened device 4 (/dev/input/event4): AT Translated Set 2 keyboard
> print: key key_u 1
> print: key key_u 1
> print: key key_u 0
> print: key key_u 0
>
> Is anyone else having this problem?
>
> thanks
>
> James
>
> _______________________________________________ Pd-list at iem.at mailing 
> list UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>
>
> _______________________________________________
> Pd-list at iem.at  mailing list
> UNSUBSCRIBE and account-management ->  http://lists.puredata.info/listinfo/pd-list


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120419/51a45e2a/attachment-0001.htm>


More information about the Pd-list mailing list