<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { margin-top: 0 ; margin-bottom: 0 }
 --></style><title>an arbitrary number of inlets -
proxy?</title></head><body>
<div>hello</div>
<div><br></div>
<div>i'm stuck.</div>
<div><br></div>
<div>say i&nbsp; create an arbitrary number of in/outlets with
something like...</div>
<div><br></div>
<div>&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; arg; i++)</div>
<div>&nbsp;&nbsp;&nbsp; {</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x-&gt;x_outlet[i] =
outlet_new(&amp;x-&gt;x_ob, &amp;s_float);</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (i)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sprintf(tempStr, &quot;ft%d&quot;, i);</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
inlet_new(&amp;x-&gt;x_ob, &amp;x-&gt;x_ob.ob_pd, &amp;s_float,
gensym(tempStr));</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</div>
<div>&nbsp;&nbsp;&nbsp; }</div>
<div><br></div>
<div>how can i avoid writing an unknown number of methods (i.e. one
for each inlet) and instead having one function that handles all
inlets with some kind of index attached to each message?&nbsp; what
i'm looking for is something like proxy_new() in max, which i belive
is lacking in pd - right?</div>
<div><br></div>
<div>/fredrik</div>

<div>-- <br>
<br>
#|<br>
&nbsp; Fredrik Olofsson&nbsp;&nbsp;&nbsp;&nbsp;
http://olofsson.da.ru<br>
|#</div>
</body>
</html>