<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    So if I understand correctly, this should always be ok as long as
    the number of ins and outs is correct:<br>
    <pre>  n = x->x_n_in + x->x_n_out;
  for(i=0; i<n; i++)
    x->x_io[i] = sp[i+compat_offset]->s_vec;

</pre>
    and then we don't need to pass the s_vec variables one by one int
    the call to dsp_add because they are stashed in the object structure
    and are recoverable there in the 'perform' routine. <br>
    <br>
    This suggests that anytime I change a connection on a ~ object, its
    'whatever_tilde_dsp' function gets with the appropriate spot on the
    **sp pointer array -- which is organized according to the topography
    of the patch itself.<br>
    <br>
    One question that now arises is why doesn't the perform routine
    crash if one of its signal inlets/outlets isn't connected? The
    perform routine always accesses memory behind the signal pointers
    even if they aren't connected, so there must be something there. Is
    there some kind of default 'empty' signal that goes into/out of
    empty slots? I'm just curious.<br>
    <br>
    Thanks for the help, Ramma and IOhannes!<br>
    <br>
    <div class="moz-cite-prefix">On 8/30/2015 12:47 PM, IOhannes m
      zmölnig wrote:<br>
    </div>
    <blockquote cite="mid:55E35DCC.1030006@iem.at" type="cite">
      <pre wrap="">On 08/30/2015 09:36 PM, Rama Gottfried wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">hi dave!
check out the dsp_addv function, I think it’s meant for exactly this. I don’t have any code right in front of me… oh wait, I do …  I’m pretty sure this works:
</pre>
      </blockquote>
      <pre wrap="">
yes, dsp_addv() should do the trick.

anyhow, i found that in most cases i use dsp_add() but don't pass the
signal pointers directly, but store them in the objects structure.

see iemmatrix' [mtx_*~] code for an example.

gmfdsrt
IOhannes

[mtx_*~]:
<a class="moz-txt-link-freetext" href="https://svn.code.sf.net/p/pure-data/svn/trunk/externals/iem/iemmatrix/src/mtx_mul~.c">https://svn.code.sf.net/p/pure-data/svn/trunk/externals/iem/iemmatrix/src/mtx_mul~.c</a>

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>