<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    For me, the event loop version is conceptually simpler because it is
    integrated with the mechanism that dispatches mouse events.  But
    that means to you need to understand how to integrate it with the
    application event loop, where the details vary with which GUI
    toolkit is used.  The ReadStdin version just uses Chimera
    abstractions, so that is very appealing.  Both techniques will work
    with ChimeraX.<br>
    <br>
       -- Greg<br>
    <br>
    <div class="moz-cite-prefix">On 2/5/2016 11:31 AM, Dougherty,
      Matthew T wrote:<br>
    </div>
    <blockquote
cite="mid:CY1PR0601MB1692F3246B92B9F68F847D50DED20@CY1PR0601MB1692.namprd06.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
        <p>I am leaning toward this</p>
        <p><span style="color: rgb(33, 33, 33); font-family:
            wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial,
            sans-serif; font-size: 15px;">An alternative would be to use
            threads where the queue is checked every frame.  See
            ReadStdin/__init__.py for details there.</span><br
            style="color: rgb(33, 33, 33); font-family:
            wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial,
            sans-serif; font-size: 15px;">
        </p>
        <p><span style="color: rgb(33, 33, 33); font-family:
            wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial,
            sans-serif; font-size: 15px;"><br>
          </span></p>
        <p><span style="color: rgb(33, 33, 33); font-family:
            wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial,
            sans-serif; font-size: 15px;">any advantage of one over the
            other?</span></p>
        <p><span style="color: rgb(33, 33, 33); font-family:
            wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial,
            sans-serif; font-size: 15px;">will this work for chimera2?</span></p>
        <p><span style="color: rgb(33, 33, 33); font-family:
            wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial,
            sans-serif; font-size: 15px;"><br>
          </span></p>
        <p><br>
        </p>
        <div id="Signature">
          <div id="divtagdefaultwrapper" style="font-size:12pt;
            color:#000000; background-color:#FFFFFF;
            font-family:Calibri,Arial,Helvetica,sans-serif">
            <div class="BodyFragment"><font size="2">
                <div class="PlainText">Matthew Dougherty<br>
                  National Center for Macromolecular Imaging<br>
                  Baylor College of Medicine<br>
                  <span style="font-size:13.0pt; font-family:Calibri">=================================================</span><br>
                </div>
                <div class="PlainText"><span style="font-size:13pt;
                    font-family:Calibri">=================================================</span><span
                    style="font-size:13.0pt; font-family:Calibri"><br>
                  </span></div>
              </font></div>
          </div>
        </div>
        <br>
        <br>
        <div style="color: rgb(0, 0, 0);">
          <hr tabindex="-1" style="display:inline-block; width:98%">
          <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
              color="#000000" face="Calibri, sans-serif"><b>From:</b>
              Greg Couch <a class="moz-txt-link-rfc2396E" href="mailto:gregc@cgl.ucsf.edu"><gregc@cgl.ucsf.edu></a><br>
              <b>Sent:</b> Friday, February 5, 2016 1:05 PM<br>
              <b>To:</b> Dougherty, Matthew T; <a class="moz-txt-link-abbreviated" href="mailto:chimera-dev@cgl.ucsf.edu">chimera-dev@cgl.ucsf.edu</a><br>
              <b>Subject:</b> Re: [chimera-dev] event loop</font>
            <div> </div>
          </div>
          <div>Use the (Tcl) event loop.  If you run the interface in a
            separate process, then you have chimera's event loop invoke
            a callback when there is data to be read on the socket
            connecting the two processes.  That is what's done to
            implement the --send command line option.  See
            DBPuppet/tcl_sockets.py for details.<br>
            <br>
            An alternative would be to use threads where the queue is
            checked every frame.  See ReadStdin/__init__.py for details
            there.<br>
            <br>
                HTH,<br>
            <br>
               Greg<br>
            <br>
            <div class="moz-cite-prefix">On 2/4/2016 2:37 PM, Dougherty,
              Matthew T wrote:<br>
            </div>
            <blockquote type="cite">
              <div id="divtagdefaultwrapper" style="font-size:12pt;
                color:#000000; background-color:#FFFFFF;
                font-family:Calibri,Arial,Helvetica,sans-serif">
                <p>I am working on a human interface for volume
                  rendering.</p>
                <p><br>
                </p>
                <p>The livid ds1 mixer uses midi through USB.</p>
                <p><a moz-do-not-send="true"
                    href="http://lividinstruments.com/products/ds1/"
                    id="LPlnk903461"
                    title="http://lividinstruments.com/products/ds1/
                    Cmd+Click or tap to follow the link">http://lividinstruments.com/products/ds1/</a><br>
                  <br>
                </p>
                <p><br>
                </p>
                <p>I should be able to use python midi libraries for
                  access. </p>
                <p><br>
                </p>
                <p>This leads to the problem of the midi implementation,
                  and a question as to a similar implementation for
                  chimera2.</p>
                <p><br>
                </p>
                <p>One implementation would insert into the event loop,
                  another approach could be tied to a frame/trigger
                  callback. </p>
                <p><br>
                </p>
                <p>Any suggestions?</p>
                <p><br>
                </p>
                <div id="Signature">
                  <div id="divtagdefaultwrapper" style="font-size:12pt;
                    color:#000000; background-color:#FFFFFF;
                    font-family:Calibri,Arial,Helvetica,sans-serif">
                    <div class="BodyFragment"><font size="2">
                        <div class="PlainText">Matthew Dougherty<br>
                          National Center for Macromolecular Imaging<br>
                          Baylor College of Medicine<br>
                          <span style="font-size:13.0pt;
                            font-family:Calibri">=================================================</span><br>
                        </div>
                        <div class="PlainText"><span
                            style="font-size:13pt; font-family:Calibri">=================================================</span><span
                            style="font-size:13.0pt;
                            font-family:Calibri"><br>
                          </span></div>
                      </font></div>
                  </div>
                </div>
              </div>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre>_______________________________________________
Chimera-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Chimera-dev@cgl.ucsf.edu">Chimera-dev@cgl.ucsf.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev</a>
</pre>
            </blockquote>
            <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>