<div dir="ltr">Hey y&#39;all,<div><br></div><div>Thanks for tracking this down -- awesome sleuthing job. Im surprised that that is the result of <span style="font-family:arial,sans-serif;font-size:13px">m_inMsgBuffer being too small because that is a buffer for incoming messages, not created receivers. Nonetheless, that buffer should definitely be bigger, even on the order of 1024 items isn&#39;t large enough to cause any memory concerns. </span></div>
<div><br></div><div>spencer</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 22, 2014 at 2:12 PM, Ben Steinberg <span dir="ltr">&lt;<a href="mailto:ben@potswift.org" target="_blank">ben@potswift.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And finally (?), in case anyone finds this thread and not the<br>
electro-music forum postings, I found the listenAll() method of OscIn in<br>
Appendix D of Ajay Kapur, Perry Cook, Spencer Salazar &amp; Ge Wang,<br>
_Programming for Musicians and Digital Artists_.  It seems to solve the<br>
problem:<br>
<br>
  OscIn oin;<br>
  OscMsg msg;<br>
  12001 =&gt; oin.port;<br>
  oin.listenAll();<br>
<div class="">  while (true) {<br>
    oin =&gt; now;<br>
</div>    while ( oin.recv(msg) )<br>
      {<br>
        &lt;&lt;&lt; &quot;got message:&quot;, msg.address, msg.typetag &gt;&gt;&gt;;<br>
        for(int n; n &lt; msg.numArgs(); n++) {<br>
          if(msg.typetag.charAt(n) == &#39;i&#39;) // integer<br>
            &lt;&lt;&lt; &quot;arg&quot;, n, &quot;:&quot;, msg.getInt(n) &gt;&gt;&gt;;<br>
          else if(msg.typetag.charAt(n) == &#39;f&#39;) // float<br>
            &lt;&lt;&lt; &quot;arg&quot;, n, &quot;:&quot;, msg.getFloat(n) &gt;&gt;&gt;;<br>
          else if(msg.typetag.charAt(n) == &#39;s&#39;) // string<br>
            &lt;&lt;&lt; &quot;arg&quot;, n, &quot;:&quot;, msg.getString(n) &gt;&gt;&gt;;<br>
        }<br>
      }<br>
    1::ms =&gt; now;<br>
<div class="HOEnZb"><div class="h5">  }<br>
<br>
Ben<br>
<br>
On 8/22/14, 3:43 PM, Ben Steinberg wrote:<br>
&gt; (Never mind, I take back the last bit about recompiling with lower<br>
&gt; numbers -- I was testing from the command line with miniAudicle still<br>
&gt; open and bound to the port.)<br>
&gt;<br>
&gt; Ben<br>
&gt;<br>
&gt; On 8/22/14, 3:21 PM, Ben Steinberg wrote:<br>
&gt;&gt; At Joel&#39;s and antimon&#39;s suggestion at electro-music, I tried OscRecv<br>
&gt;&gt; instead of OscIn -- all 16 listeners worked.  Recompiling with 256 makes<br>
&gt;&gt; the original code work, as Joel said; my attempts to recompile with<br>
&gt;&gt; lower numbers (24, 32, 72) did not -- no listeners worked.<br>
&gt;&gt;<br>
&gt;&gt; Ben<br>
&gt;&gt;<br>
&gt;&gt; On 8/22/14, 2:43 PM, Ben Steinberg wrote:<br>
&gt;&gt;&gt; Wow, thanks! I&#39;ll see about getting a dev environment together and<br>
&gt;&gt;&gt; recompiling with something like 32 or 64 --<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Ben<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 8/22/14, 2:38 PM, Joel Matthys wrote:<br>
&gt;&gt;&gt;&gt; It looks to me like the limit of 12 is hard-coded in src/ulib_opsc.cpp,<br>
&gt;&gt;&gt;&gt; line 201:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     m_inMsgBuffer(CircularBuffer&lt;OscInMsg&gt;(12)),<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I raised it to 256 and recompiled and your example worked correctly.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I can definitely see the value of allowing more than 12 addresses on the<br>
&gt;&gt;&gt;&gt; same port. I&#39;m not sure the memory impact though.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Joel<br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On 08/22/2014 12:25 PM, Ben Steinberg wrote:<br>
&gt;&gt;&gt;&gt;&gt; I&#39;ve posted about this to the electro-music forum:<br>
&gt;&gt;&gt;&gt;&gt; <a href="http://electro-music.com/forum/viewtopic.php?p=402793" target="_blank">http://electro-music.com/forum/viewtopic.php?p=402793</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; In trying to write some code for the Illucia dtr, I found that adding<br>
&gt;&gt;&gt;&gt;&gt; addresses to an OscIn object appeared not to work after twelve<br>
&gt;&gt;&gt;&gt;&gt; addresses.  I wrote a test program that wasn&#39;t illucia-specific; the<br>
&gt;&gt;&gt;&gt;&gt; following code starts 16 OSC transmitters and 16 receivers. When you run<br>
&gt;&gt;&gt;&gt;&gt; it, you can see that transmitters 0-15 all transmit, but only receivers<br>
&gt;&gt;&gt;&gt;&gt; 0-11 receive.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; for ( 0 =&gt; int i ; i &lt; 16 ; i++ ) {<br>
&gt;&gt;&gt;&gt;&gt;      spork ~ output(i);<br>
&gt;&gt;&gt;&gt;&gt;      spork ~ input(i);<br>
&gt;&gt;&gt;&gt;&gt; }<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; while ( true ) {<br>
&gt;&gt;&gt;&gt;&gt;      1::second =&gt; now;<br>
&gt;&gt;&gt;&gt;&gt; }<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; fun void output(int number) {<br>
&gt;&gt;&gt;&gt;&gt;      12008 =&gt; int port;<br>
&gt;&gt;&gt;&gt;&gt;      &quot;localhost&quot; =&gt; string hostname;<br>
&gt;&gt;&gt;&gt;&gt;      OscOut xmit;<br>
&gt;&gt;&gt;&gt;&gt;      xmit.dest(hostname, port);<br>
&gt;&gt;&gt;&gt;&gt;      while (true) {<br>
&gt;&gt;&gt;&gt;&gt;          Math.random2f(5.5, 8.5) =&gt; float wait;<br>
&gt;&gt;&gt;&gt;&gt;          wait::second =&gt; now;<br>
&gt;&gt;&gt;&gt;&gt;          xmit.start(&quot;/tester/what/&quot; + number);<br>
&gt;&gt;&gt;&gt;&gt;          Math.random2f(0.0, 1.0) =&gt; float temp =&gt; xmit.add;<br>
&gt;&gt;&gt;&gt;&gt;          xmit.send();<br>
&gt;&gt;&gt;&gt;&gt;          &lt;&lt;&lt; &quot;sent&quot;, number, temp &gt;&gt;&gt;;<br>
&gt;&gt;&gt;&gt;&gt;      }<br>
&gt;&gt;&gt;&gt;&gt; }<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; fun void input(int number) {<br>
&gt;&gt;&gt;&gt;&gt;      OscIn oin;<br>
&gt;&gt;&gt;&gt;&gt;      OscMsg msg;<br>
&gt;&gt;&gt;&gt;&gt;      12008 =&gt; oin.port;<br>
&gt;&gt;&gt;&gt;&gt;      oin.addAddress(&quot;/tester/what/&quot; + number + &quot;, f&quot;);<br>
&gt;&gt;&gt;&gt;&gt;      float val;<br>
&gt;&gt;&gt;&gt;&gt;      while (true) {<br>
&gt;&gt;&gt;&gt;&gt;          oin =&gt; now;<br>
&gt;&gt;&gt;&gt;&gt;          while ( oin.recv(msg) != 0 )<br>
&gt;&gt;&gt;&gt;&gt;          {<br>
&gt;&gt;&gt;&gt;&gt;              msg.getFloat(0) =&gt; val;<br>
&gt;&gt;&gt;&gt;&gt;              &lt;&lt;&lt; &quot;received&quot;, number, val &gt;&gt;&gt;;<br>
&gt;&gt;&gt;&gt;&gt;          }<br>
&gt;&gt;&gt;&gt;&gt;          5::ms =&gt; now;<br>
&gt;&gt;&gt;&gt;&gt;      }<br>
&gt;&gt;&gt;&gt;&gt; }<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I&#39;m running ChucK 1.3.4 on Mavericks, with and without miniAudicle.<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; chuck-users mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; chuck-users mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
&gt;&gt;&gt;&gt; <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; chuck-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
&gt;&gt;&gt; <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; chuck-users mailing list<br>
&gt;&gt; <a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
&gt;&gt; <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; chuck-users mailing list<br>
&gt; <a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
&gt; <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
&gt;<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>