<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 3, 2021, 3:37 PM Christof Ressi <<a href="mailto:info@christofressi.com">info@christofressi.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>
</p><blockquote type="cite">I find myself passing in the number of
total clones as a parameter. </blockquote>
Yes, that's the only way.</div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Thanks Christof. </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p></p>
<p>
</p><blockquote type="cite">I would like to avoid this if possible. </blockquote>
Why? Is it only for cosmetic reasons, or for technical reasons?</div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Yes, mostly aesthetics. It seems redundant. It creates extra work. It would simply my development workflow. </div><div dir="auto"><br></div><div dir="auto">I'm communicating to my clones via arrays. </div><div dir="auto">Each clone reads values from certain arrays, and writes values to other arrays. </div><div dir="auto"><br></div><div dir="auto">(In the output case, the clone instance number always corresponds to the array element number, so I can see what each clone is doing. On the input case, I'm reading at audio rate</div><div dir="auto"><br></div><div dir="auto">So when I change the number of clones, I must change this in the 2 places you've mentioned. I also have to resize my arrays, which requires changing at least 1 message. (I imagine that I can probably change all my arrays using a single compound message, but haven't tried this yet).</div><div dir="auto"><br></div><div dir="auto">Ideally, it would be nice to change N in *one place*. I think this might be possible if the first feature was implemented. </div><div dir="auto"><br></div><div dir="auto">e.g., "If I am instance #1, and the number of instances has changed since last time (stored in a global variable), then resize my arrays". </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p></p>
<p>Yes, [clone foo 20 20] might look ugly, but it does the job.
Personally, I haven't ever needed the number of cloned instances
inside an instance...</p></div></blockquote></div></div><div dir="auto">I am still working on converting my 12 band flanger/auto panner to an N-band Flanger using clone. </div><div dir="auto"><br></div><div dir="auto">If we think about the clones spreading out and creating an equal phase displacement across all N bands, and if we let S be the instance number, then we can calculate the phase displacement for an arbitrary instance like this:</div><div dir="auto"><br></div><div dir="auto">PhaseDisplacement(S) = (2π / N) * S</div><div dir="auto">So each clone needs to know the value of both S ($1) and N. </div><div dir="auto"><br></div><div dir="auto"></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p> </p></div></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p></p></div></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p></p></div></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p></p></div></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p>but if you need it frequently, you can make
a feature request on GitHub.</p></div></blockquote></div></div><div dir="auto">I think I will, thanks!</div><div dir="auto"><br></div><div dir="auto">BH</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<p>Christof<br>
</p>
<div>On 03.03.2021 20:12, William Huston
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Is there a way for a clone instance to determine the total
number of clones?</div>
<div><br>
</div>
<div>Because often the behavior of a clone depends on its
relative position</div>
<div>within a chain of instances. <br>
<br>
"I am instance 12 of 100, therefore, I should behave like
so...."<br>
</div>
<div><br>
</div>
<div>I find myself passing in the number of total clones as a
parameter. <br>
</div>
<div>I would like to avoid this if possible. <br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>BH<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div dir="ltr" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr"><span>
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>--<br>
William Huston: <a href="mailto:WilliamAHuston@gmail.com" target="_blank" rel="noreferrer">WilliamAHuston@gmail.com</a><br>
Binghamton NY<br>
<div style="text-align:center">
<div style="text-align:center"><span></span><br>
<span><b>Public Service
Mapping / Videography /
Research / Education /
Safety Advocacy</b></span><br>
<span></span><a href="http://WilliamAHuston.blogspot.com" target="_blank" rel="noreferrer">Blog</a>
-- <a href="http://facebook.com/billhuston" target="_blank" rel="noreferrer">Facebook</a>
-- <a href="http://twitter.com/WilliamAHuston" target="_blank" rel="noreferrer">Twitter
</a><span><span><span>-- <a href="https://www.youtube.com/channel/UCGijK1amWOLglT3YeTyEBNQ?sub_congfirmation=1" target="_blank" rel="noreferrer">Youtube</a></span></span></span><b>
-- <a href="https://billhustonpodcast.blogspot.com/" target="_blank" rel="noreferrer">Podcast
Blog</a><br>
</b></div>
<div style="text-align:center"><b>Document
collections</b>: <a href="http://TinyURL.com/VirtualPipelines" target="_blank" rel="noreferrer">VirtualPipelines</a>
-- <a href="http://bit.ly/BHDCSDimockArchive" target="_blank" rel="noreferrer">BHDCSDimockArchive</a><br>
<span><span><b>Please
support my work! -- </b><a href="http://TinyURL.com/DonateToBillHuston" target="_blank" rel="noreferrer">TinyURL.com/DonateToBillHuston</a><br>
</span></span></div>
<div style="text-align:center"><span><span><br>
</span></span></div>
<div style="text-align:center"><span><span><b><img src="https://4.bp.blogspot.com/-QjAlYXBdfk0/XA7eTMshJPI/AAAAAAAAIGQ/hr-t_w9fu-MCMWja84YnMBJIry0oWiWTACLcBGAs/s600/BH%2BTerra%2BVigilate%2B%2523BT%2Bself%2Bportrait%2Btriptich1.jpg" width="420" height="73"></b></span></span></div>
<span><span></span></span></div>
<span><br>
</span></div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
<a href="mailto:Pd-list@lists.iem.at" target="_blank" rel="noreferrer">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank" rel="noreferrer">https://lists.puredata.info/listinfo/pd-list</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank" rel="noreferrer">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
</blockquote></div></div></div>