<div dir="ltr">And sys_getblksize() always returns the global vector size (64). Within an external you need to know the vector size of the signals you receive (using <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">sp[0]->s_n)</span> because if the patch has a block object the vector size can be different from the global vector size.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-26 14:24 GMT+01:00 Pierre Guillot <span dir="ltr"><<a href="mailto:guillotpierre6@gmail.com" target="_blank">guillotpierre6@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, </div><div>As Miller explained previously, Pd reuse the inputs and outputs vectors for optimization purposes so an input vector can correspond to an output vector. When you write into an output vector, you can also write into an input vector then when you read it after, you have false values. To prevent that, in your example, you need to write the inputs' samples into a temporary vector before writing anything in an output vector (to ensure that it doesn't overwrite an input). You should have a look to the pull request that I created on your repo for multigate~. </div><div><br></div><div>PS: The problem with mtx is in the perform method. The main loop goes beyond the vector size, you should simply remove it and move the scope of the "gate" vector.</div><div><br></div><div>Cheers,</div><div>Pierre</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2018-02-26 6:11 GMT+01:00 Alexandre Torres Porres <span dir="ltr"><<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>2018-02-25 6:45 GMT-03:00 IOhannes m zmölnig <span dir="ltr"><<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_805938457419453842m_-4285494934275579653gmail-"><br>
</span>you probably should learn how to use a debugger</blockquote><div><br></div></span><div>True! Enough fooling around... <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I should really learn how to use one now that I keep getting serious about this. But they're not so that easy to get started with for someone like me. I remember I wasn't very lucky with it a while back and just thought I'd let it go for then. But I see your point and it made me realize I gotta do something about it, thanks.<br><br></span></div><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">#1 printf debugging.<br>
your code crashes? add printf() statements (or "post()" for that matter). </blockquote><div><br></div></span><div>Yeah, that's all I really know how to do so far, it didn't help me much here.</div><div><br></div><div>But anyway, I also have a not debugging issue, which would be how to fix this code to have its outlets flipped/reversed, see => <a href="https://github.com/porres/pd-else/issues/161" target="_blank">https://github.com/porres/pd-e<wbr>lse/issues/161</a></div><div><br></div><div>This object is pretty stable, doesn't crash at all, but has this issue. I've been checking many externals and other examples, such as cyclone/matrix~, the example one from Pierre, and also now yours [matrix_*~] - and code above is actually modeled and derived after [cyclone/gate~], so I guess enough checking other externals, cause still no luck for me...</div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">So the question to this list is if I can do something to get the output in the right order, from "1 to 6", instead of "6 to 1". If not a simple trick and edit to the current code, I <span style="font-size:12.8px">see a way around would maybe be to have a temporary array and rearrange things over. But I also tried all I could think of (<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">again </span>also checking other externals) and nothing worked... so I was hoping maybe I could get a hand on that at least.</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px"><br></span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px">Thanks </span></div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>
<br></div></div><span class="">______________________________<wbr>_________________<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/li<wbr>stinfo/pd-dev</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>