<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Other examples would be zexy's [mux~] and [demux~].</p>
<p>
<blockquote type="cite">is there a reason that cyclone/matrix~ is
using dsp_add over dsp_addv?</blockquote>
</p>
<p>Generally, you don't *need* to pass the individual signal buffers
to dsp_add. Many externals with variable inputs/outputs simply
allocate an array of t_float pointers inside the object and store
the signal buffers there, meaning that they don't pass them to
dsp_add at all. It's just a matter of personal style.<br>
</p>
<p>One word of warning about externals with multiple signal
inputs/outputs (quoting from
<a class="moz-txt-link-freetext" href="https://github.com/pure-data/externals-howto#signal-classes">https://github.com/pure-data/externals-howto#signal-classes</a>):</p>
<p>"Optimisation of the DSP-tree tries to avoid unnecessary
copy-operations.
Therefore it is possible, that in- and out-signal are located at
the
same address in the memory. In this case, the programmer has to be
careful not to write into the out-signal before having read the
in-signal to avoid overwriting data that is not yet saved."</p>
<p>This is still a bit vague, though, I would rephrase it like this:</p>
<p>"In this case, the programmer has to be
careful not to write into *any* out-signal before having read
*all* in-signals"</p>
<p>Christof<br>
</p>
<div class="moz-cite-prefix">On 23.05.2020 09:21, Eric Lennartson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGkKnE1mMSNtjbgDnYN9Z=Njes5LUX4911jZwhTDteRNTzie8Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">is there a reason that cyclone/matrix~ is using
dsp_add over dsp_addv?</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, May 22, 2020 at 8:26
PM Alexandre Torres Porres <<a
href="mailto:porres@gmail.com" moz-do-not-send="true">porres@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">see the code of cyclone/mtx~ for instance
<div><br>
</div>
<div>basically, you do"</div>
<div>for(i = 0; i < n_inlet; i++)<br>
inlet_new()...</div>
<div><br>
</div>
<div>and stuff</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Em sex., 22 de mai. de
2020 às 23:17, Eric Lennartson <<a
href="mailto:lennartsoneric@gmail.com" target="_blank"
moz-do-not-send="true">lennartsoneric@gmail.com</a>>
escreveu:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hello all,
<div><br>
</div>
<div>I was wondering how one would go about creating an
external that given two creation arguments created
that many inlets and outlets? I've been browsing the
source code for externals that do something similar,
but I think I'm going to need a bit more of an
explanation.</div>
<div><br>
</div>
<div>Thanks for the help.</div>
</div>
_______________________________________________<br>
Pd-dev mailing list<br>
<a href="mailto:Pd-dev@lists.iem.at" target="_blank"
moz-do-not-send="true">Pd-dev@lists.iem.at</a><br>
<a href="https://lists.puredata.info/listinfo/pd-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-dev</a><br>
</blockquote>
</div>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Pd-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a>
<a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-dev">https://lists.puredata.info/listinfo/pd-dev</a>
</pre>
</blockquote>
</body>
</html>