<div dir="ltr"><div dir="ltr">For some reason your response didn't show up in my email Cristof, but to answer your question, I am providing two creation arguments that sets the number of inlets and outlets. Could you elaborate on how buffer aliasing is caused by how the surrounding objects are connected? Assuming of course that's the problem here, but my suspicion is rather that I'm not reading from all inlets before writing to the outlets.<div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 31, 2020 at 12:14 PM <<a href="mailto:pd-dev-request@lists.iem.at" target="_blank">pd-dev-request@lists.iem.at</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">Send Pd-dev mailing list submissions to<br>
        <a href="mailto:pd-dev@lists.iem.at" target="_blank">pd-dev@lists.iem.at</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.puredata.info/listinfo/pd-dev" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:pd-dev-request@lists.iem.at" target="_blank">pd-dev-request@lists.iem.at</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:pd-dev-owner@lists.iem.at" target="_blank">pd-dev-owner@lists.iem.at</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Pd-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. inlets sending to wrong outlets (Eric Lennartson)<br>
   2. Re: inlets sending to wrong outlets (Alexandre Torres Porres)<br>
   3. Re: inlets sending to wrong outlets (Eric Lennartson)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 31 May 2020 11:59:54 -0700<br>
From: Eric Lennartson <<a href="mailto:lennartsoneric@gmail.com" target="_blank">lennartsoneric@gmail.com</a>><br>
To: pd-dev <<a href="mailto:pd-dev@lists.iem.at" target="_blank">pd-dev@lists.iem.at</a>><br>
Subject: [PD-dev] inlets sending to wrong outlets<br>
Message-ID:<br>
        <CAGkKnE1H0Cnto7iFVLs=<a href="mailto:YKm%2Bh0Vj0ruVBxFwcDY7z%2BkZJaejxg@mail.gmail.com" target="_blank">YKm+h0Vj0ruVBxFwcDY7z+kZJaejxg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hey all,<br>
<br>
I've been working with variable amounts of inlets and outlets and for the<br>
most part it's been working fine. If it's only variable inlets and the<br>
outlets are fixed, or vice versa, it works fine. However when both are<br>
variable I can't seem to get the inlets to go to the correct outlet. My<br>
current code is cycling through the inlets and outlets in pairs, but for<br>
some reason this isn't working. Any thoughts?<br>
<br>
Thanks<br>
Eric<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.puredata.info/pipermail/pd-dev/attachments/20200531/18776bbd/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.puredata.info/pipermail/pd-dev/attachments/20200531/18776bbd/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sun, 31 May 2020 16:05:30 -0300<br>
From: Alexandre Torres Porres <<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>><br>
To: Eric Lennartson <<a href="mailto:lennartsoneric@gmail.com" target="_blank">lennartsoneric@gmail.com</a>><br>
Cc: pd-dev <<a href="mailto:pd-dev@lists.iem.at" target="_blank">pd-dev@lists.iem.at</a>><br>
Subject: Re: [PD-dev] inlets sending to wrong outlets<br>
Message-ID:<br>
        <<a href="mailto:CAEAsFmgbRt2ihcCM2SvmL8H4gHx-BWEo9rL1zNmOzijbYHV%2BVg@mail.gmail.com" target="_blank">CAEAsFmgbRt2ihcCM2SvmL8H4gHx-BWEo9rL1zNmOzijbYHV+Vg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
I remember I went through similar stuff, see the code of else/mtx~ and<br>
cyclone/matrix~<br>
<br>
and, share your code?<br>
<br>
cheers<br>
<br>
Em dom., 31 de mai. de 2020 às 16:00, Eric Lennartson <<br>
<a href="mailto:lennartsoneric@gmail.com" target="_blank">lennartsoneric@gmail.com</a>> escreveu:<br>
<br>
> Hey all,<br>
><br>
> I've been working with variable amounts of inlets and outlets and for the<br>
> most part it's been working fine. If it's only variable inlets and the<br>
> outlets are fixed, or vice versa, it works fine. However when both are<br>
> variable I can't seem to get the inlets to go to the correct outlet. My<br>
> current code is cycling through the inlets and outlets in pairs, but for<br>
> some reason this isn't working. Any thoughts?<br>
><br>
> Thanks<br>
> Eric<br>
> _______________________________________________<br>
> Pd-dev mailing list<br>
> <a href="mailto:Pd-dev@lists.iem.at" target="_blank">Pd-dev@lists.iem.at</a><br>
> <a href="https://lists.puredata.info/listinfo/pd-dev" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.puredata.info/pipermail/pd-dev/attachments/20200531/b94e1564/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.puredata.info/pipermail/pd-dev/attachments/20200531/b94e1564/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Sun, 31 May 2020 12:12:52 -0700<br>
From: Eric Lennartson <<a href="mailto:lennartsoneric@gmail.com" target="_blank">lennartsoneric@gmail.com</a>><br>
To: Alexandre Torres Porres <<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>>, pd-dev<br>
        <<a href="mailto:pd-dev@lists.iem.at" target="_blank">pd-dev@lists.iem.at</a>><br>
Subject: Re: [PD-dev] inlets sending to wrong outlets<br>
Message-ID:<br>
        <<a href="mailto:CAGkKnE1X6RmTfc_gFagN5TkrUstQAh_xFP7q89WV1c%2B7i6zE2w@mail.gmail.com" target="_blank">CAGkKnE1X6RmTfc_gFagN5TkrUstQAh_xFP7q89WV1c+7i6zE2w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
I've been looking at the code for those, but I'm finding it a little hard<br>
to parse.<br>
Not sure how this is going to look on your end, but sorry for the text<br>
wall. If there's a better way to share lmk.<br>
<br>
typedef struct _viotest<br>
<br>
{<br>
<br>
    t_object x_obj;<br>
<br>
<br>
<br>
    int n_outs, n_ins, n_iolets;<br>
<br>
    t_sample **in_vec, **out_vec; // vector to hold all the inlets and<br>
outlets<br>
<br>
} t_viotest_tilde;<br>
<br>
<br>
static void viotest_tilde_input(t_viotest_tilde *x, t_floatarg f)<br>
<br>
{<br>
<br>
      error("[viotest~]: no method for float.");<br>
<br>
}<br>
<br>
<br>
static t_int *viotest_tilde_perform(t_int *w)<br>
<br>
{<br>
<br>
    t_viotest_tilde *x = (t_viotest_tilde *)(w[1]);<br>
<br>
    int nblock = (int)(w[2]);<br>
<br>
    int n = nblock;<br>
<br>
<br>
<br>
    t_sample **in_vec = x->in_vec;<br>
<br>
    t_sample **out_vec = x->out_vec;<br>
<br>
<br>
<br>
    int smaller = (x->n_ins < x-> n_outs) ? x->n_ins : x->n_outs;<br>
<br>
    for(int channel = 0; channel < smaller; ++channel)<br>
<br>
    {<br>
<br>
        t_sample* in = in_vec[channel];<br>
<br>
        t_sample* out = out_vec[channel];<br>
<br>
        n = nblock;<br>
<br>
        while(n--)<br>
<br>
        {<br>
<br>
            t_sample out_val = *in++;<br>
<br>
            *out++ = out_val;<br>
<br>
        }<br>
<br>
    }<br>
<br>
<br>
    return (w + 3);<br>
<br>
}<br>
<br>
<br>
static void viotest_tilde_dsp(t_viotest_tilde *x, t_signal **sp)<br>
<br>
{<br>
<br>
    int i, nblock = sp[0]->s_n;<br>
<br>
<br>
<br>
    t_sample **dummy = x->in_vec;<br>
<br>
<br>
<br>
    for(i = 0; i < x->n_ins; ++i)<br>
<br>
    {<br>
<br>
        *dummy++ = sp[i]->s_vec;<br>
<br>
    }<br>
<br>
<br>
<br>
    for(; i < x->n_iolets; ++i)<br>
<br>
    {<br>
<br>
        *dummy++ = sp[i]->s_vec;<br>
<br>
    }<br>
<br>
<br>
<br>
    dsp_add(viotest_tilde_perform, 2, x, nblock);<br>
<br>
}<br>
<br>
On Sun, May 31, 2020 at 12:05 PM Alexandre Torres Porres <<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>><br>
wrote:<br>
<br>
> I remember I went through similar stuff, see the code of else/mtx~ and<br>
> cyclone/matrix~<br>
><br>
> and, share your code?<br>
><br>
> cheers<br>
><br>
> Em dom., 31 de mai. de 2020 às 16:00, Eric Lennartson <<br>
> <a href="mailto:lennartsoneric@gmail.com" target="_blank">lennartsoneric@gmail.com</a>> escreveu:<br>
><br>
>> Hey all,<br>
>><br>
>> I've been working with variable amounts of inlets and outlets and for the<br>
>> most part it's been working fine. If it's only variable inlets and the<br>
>> outlets are fixed, or vice versa, it works fine. However when both are<br>
>> variable I can't seem to get the inlets to go to the correct outlet. My<br>
>> current code is cycling through the inlets and outlets in pairs, but for<br>
>> some reason this isn't working. Any thoughts?<br>
>><br>
>> Thanks<br>
>> Eric<br>
>> _______________________________________________<br>
>> Pd-dev mailing list<br>
>> <a href="mailto:Pd-dev@lists.iem.at" target="_blank">Pd-dev@lists.iem.at</a><br>
>> <a href="https://lists.puredata.info/listinfo/pd-dev" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a><br>
>><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.puredata.info/pipermail/pd-dev/attachments/20200531/464e356e/attachment.html" rel="noreferrer" target="_blank">http://lists.puredata.info/pipermail/pd-dev/attachments/20200531/464e356e/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Pd-dev mailing list<br>
<a href="mailto:Pd-dev@lists.iem.at" target="_blank">Pd-dev@lists.iem.at</a><br>
<a href="https://lists.puredata.info/listinfo/pd-dev" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Pd-dev Digest, Vol 181, Issue 24<br>
***************************************<br>
</blockquote></div>