<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
my experience is that puredata basically takes the raw signal from your controller. If you can find some method of fixing this in your OS, by all means let me know<br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Thu, 19 Apr 2012 10:42:06 +0100<br>From: james@4thharmonic.com<br>To: jbturgid@hotmail.com<br>CC: pd-list@iem.kug.ac.at<br>Subject: Re: [PD] HID double triggers<br><br>
  
    
  
  
    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?<br>
    <br>
    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!<br>
    <br>
    For example:<br>
    <br>
    <tt>[hid] 0.7, written by Hans-Christoph Steiner <a class="ecxmoz-txt-link-rfc2396E" href="mailto:hans@eds.org">&lt;hans@eds.org&gt;</a><br>
      &nbsp;&nbsp;&nbsp; compiled on Apr 15 2012 at 08:12:47 <br>
      [hid] opened device 4 (/dev/input/event4): AT Translated Set 2
      keyboard<br>
    </tt><tt>print: key key_j 1<br>
      print: key key_l 1<br>
      print: key key_j 1<br>
      print: key key_l 1<br>
      print: key key_j 0<br>
      print: key key_j 0<br>
      print: key key_l 0<br>
      print: key key_l 0<br>
      <br>
    </tt>I can filter these out later on, but it would be nice to have a
    bug free object!<br>
    <br>
    thanks for you help<br>
    <br>
    James<br>
    <br>
    <br>
    Quoth Andrew Faraday, on 18/04/2012 19:27:
    <blockquote cite="mid:COL120-W267C3A216EDD2E1E27369DE3C0@phx.gbl">
      <style><!--
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

--></style>
      <div dir="ltr"> 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). <br>
        <br>
        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.
        <br>
        <br>
        I hope this helps.<br>
        <br>
        Andrew<br>
        <br>
        <div>
          <hr id="ecxstopSpelling">Date: Wed, 18 Apr 2012 16:53:44 +0100<br>
          From: <a class="ecxmoz-txt-link-abbreviated" href="mailto:james@4thharmonic.com">james@4thharmonic.com</a><br>
          To: <a class="ecxmoz-txt-link-abbreviated" href="mailto:pd-list@iem.kug.ac.at">pd-list@iem.kug.ac.at</a><br>
          Subject: [PD] HID double triggers<br>
          <br>
          Hi list,<br>
          <br>
          recently I've been playing around with [hid] again and still
          have the issue with double triggers on linux (see previous
          post <a href="http://www.mail-archive.com/pd-list%40iem.at/msg32170.html" target="_blank">here</a>).<br>
          <br>
          I've downloaded the latest version of <a href="http://autobuild.puredata.info/auto-build/latest/Pd-0.43.1-extended-ubuntu-lucid-i386.deb" target="_blank">Pd-0.43.1-extended-ubuntu-lucid-i386.deb</a>
          but I have the same problem with my existing Arch Linux
          installation on my laptop as well.<br>
          <br>
          It works fine on Mac 10.6. The problem is that I basically get
          two identical events for each key press and release, ie:<br>
          <br>
          <tt>[hid] 0.7, written by Hans-Christoph Steiner <a class="ecxmoz-txt-link-rfc2396E" href="mailto:hans@eds.org">&lt;hans@eds.org&gt;</a><br>
            &nbsp;&nbsp;&nbsp; compiled on Apr 15 2012 at 08:12:47 <br>
            [hid] opened device 4 (/dev/input/event4): AT Translated Set
            2 keyboard<br>
            print: key key_u 1<br>
            print: key key_u 1<br>
            print: key key_u 0<br>
            print: key key_u 0<br>
          </tt><br>
          Is anyone else having this problem?<br>
          <br>
          thanks<br>
          <br>
          James<br>
          <br>
          _______________________________________________ <a class="ecxmoz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list
          UNSUBSCRIBE and account-management -&gt; <a class="ecxmoz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a></div>
      </div>
      <br>
      <fieldset class="ecxmimeAttachmentHeader"></fieldset>
      <br>
      <pre>_______________________________________________
<a class="ecxmoz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -&gt; <a class="ecxmoz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </blockquote>
    <br>
    <br></div>                                               </div></body>
</html>