<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">I wonder if there's a way to map instance numbers to $0 values in instances. Suppose you had:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">[clone -receive foo 16 abstraction 1 2 3]</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">where 1 2 3 are mapped to $1 $2 $3 inside the instances, respectively.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">[clone] makes 16 instances. Then in your abstraction you have [r $0-foo], and [4 <message>(--[s foo] from outside would be received by the [r $0-foo] inside the fourth instance.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">The complicated thing here is how to make this work:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">[clone -receive $0-foo 16 abstraction 1 2 3]</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Since the instances don't know their parent's $0-value, you'd need to modify your abstraction to contain [r $0-$4-foo], and then make [clone -receive $0-foo 16 abstraction 1 2 3 $0]. This is complicated -- probably too complicated -- but the advantage would be that you'd need to make minimal changes to the abstraction. The levels of locality are handled by the user, and it would be much less disruptive to add an extra argument at the end when needed than to get [clone] to try to handle it automatically with the current $1 stuff.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">But again, I might be missing something in the design and intended use of the $1 mapping.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 18, 2016 at 10:20 AM, Alex Norman <span dir="ltr"><<a href="mailto:x37v.alex@gmail.com" target="_blank">x37v.alex@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I see your point, the abstraction need not know it's instance number since only the messages meant for it would be dispatched to it.. If you don't care about using sends directed to a specific abstraction then the $1 does nothing for you and if the flag to clone could ditch the $1 to instance setting and just set the arguments to the abstraction [clone -flag blah 20 1 2 3] makes 20 copies of blah with args $1=1 $2=2.. You could use more of your existing abstractions as is, using their args the same way with or without clone.<br>
<br>
I'm warming up to that idea.<span class="HOEnZb"><font color="#888888"><br>
<br>
Alex<br><br></font></span><div class="gmail_quote"><div><div class="h5">On May 17, 2016 6:44:51 PM PDT, Christof Ressi <<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>> wrote:</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<pre><div><div class="h5">you can still disambiguate, because incoming messages are dispatched by the instance number and outgoing messages are prepended with it!<br><br>My suggestion was mainly concerning all abstractions that work with inlets and outlets (as opposed to sends and receives), where you basically pass a message and get something out. This could be anything, from simple message filtering to a perlin noise generator. Or also existing audio modules that work with a message inlet. If there was such a flag, you could take any of these abstractions as they are, control them separately by prepending the instance number and route the message output (or use the sum of the audio output).  <br><br>I guess, people will use [clone] mainly for voice management for synthesizers, granular synthesis, complicated nested patches etc., but I also see a great potential for massive data generation by using existing simple abstractions and cloning them.<br><br>Personally, I have many
abstractions I would like to use with [clone], but either I'd have to rewrite them or make a wrapper abstraction. It's not a big deal, it's just that an alternative forwarding mode would provide some additional convenience (and could also encourage other usages for [clone]). <br><br>Anyway, I can totally live without this feature, but would be happy to have it :-).<br><br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 1ex 0.8ex;border-left:1px solid #729fcf;padding-left:1ex"><div><div class="h5"> Gesendet: Mittwoch, 18. Mai 2016 um 02:35 Uhr<br> Von: "Miller Puckette" <<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>><br> An: "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>><br> Cc: Pd-list <<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>><br> Betreff: Re: [PD] [clone]'s instance number<br><br> I'm not sure... would anyone ever use this feature?  The patch in question<br> would ahve to take arguments (if not, thre's no problem) but not use them to<br> disambiguate the instances (because clone will set them all equal
anyway).<br> I have trouble imaginig anyone building a patch like that.<br> <br> cheers<br> Miller<br> <br> On Wed, May 18, 2016 at 12:54:16AM +0200, Christof Ressi wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 1ex 0.8ex;border-left:1px solid #ad7fa8;padding-left:1ex"><div><div class="h5"> What do you think about the idea with a flag for changing the way creation arguments are forwarded? It would be really handy if you could write something like<br> [clone -flag 100 my-abstraction 5 6 7] and $1 $2 $3 will be substituted by 5 6 7 instead of [N] 5 6. This way you could use existing abstractions as they are, without the need for writing a wrapper abstraction to handle the creation argument forwarding.<br> <br> Christof<br> <br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 1ex 0.8ex;border-left:1px solid #8ae234;padding-left:1ex"><div><div class="h5"> Gesendet: Dienstag, 17. Mai 2016 um 04:05 Uhr<br> Von: "Miller Puckette" <<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>><br> An: "Jaime
Oliver" <<a href="mailto:jaime.oliver2@gmail.com" target="_blank">jaime.oliver2@gmail.com</a>><br> Cc: "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>>, Pd-list <<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>><br> Betreff: Re: [PD] [clone]'s instance number<br><br> Cool, taking this suggestion.  At least for now it will work either way,<br> but it's much more readable with the abstraction name first so I changed the<br> help file to invoke it that way.<br> <br> cheers<br> Miller<br> <br> On Wed, May 11, 2016 at 01:13:37PM -0400, Jaime Oliver wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 1ex 0.8ex;border-left:1px solid #fcaf3e;padding-left:1ex"><div><div class="h5"> Well, <br> <br> What would happen if instead of calling clone like:<br> <br> [clone 16 my-abstraction 1 5 9]<br> <br> we called it with:<br> <br> [clone my-abstraction 16 1 5 9]<br> <br> and then $1 seems quite appropriate.<br> <br> ?<br> <br> J<br> <br> <br> <br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 1ex 0.8ex;border-left:1px solid #e9b96e;padding-left:1ex"><div><div class="h5"> On May 11, 2016, at 12:17 PM, Christof Ressi <<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>> wrote:<br> <br> I agree that $1 is most natural!<br> <br> However, what about adding an additional flag -foo for [clone], which changes the way creation arguments are parsed?<br> Passing -foo could ignore the object ID and rather forward creation arguments just as they are.<br> <br> This wouldn't break the current behaviour of [clone], but provide some functionality to deal with ordinary abstractions more conveniently.<br> <br> Christof<br> <br> <br> <br> <br>  <br>  <br> <br> Gesendet: Mittwoch, 11. Mai 2016 um 18:06 Uhr<br> Von: "Ivica Bukvic" <<a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a>><br> An: "Miller Puckette" <<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>><br> Cc: "IOhannes m zmoelnig" <<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>>, Pd-list <<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>>, "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>><br> Betreff: Re: [PD] [clone]'s instance number<br> What about
having an if statement that detects clone object and if so, compensates for $2 discrepancy and assigns $1 to it instead and increments from there? This way the discrepancy is internalized as opposed to something user needs to deal with.<br> -- <br> Ivica Ico Bukvic, D.M.A.<br> Associate Professor<br> Computer Music<br> ICAT Senior Fellow<br> Director -- DISIS, L2Ork<br> Virginia Tech<br> School of Performing Arts – 0141<br> Blacksburg, VA 24061<br> <a href="tel:%28540%29%20231-6139" value="+15402316139" target="_blank">(540) 231-6139</a><br> <a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a><br> <a href="http://www.performingarts.vt.edu" target="_blank">www.performingarts.vt.edu</a>[<a href="http://www.performingarts.vt.edu" target="_blank">http://www.performingarts.vt.edu</a>]<br> <a href="http://disis.icat.vt.edu" target="_blank">disis.icat.vt.edu</a>[<a href="http://disis.icat.vt.edu" target="_blank">http://disis.icat.vt.edu</a>]<br> <a href="http://l2ork.icat.vt.edu" target="_blank">l2ork.icat.vt.edu</a>[<a href="http://l2ork.icat.vt.edu" target="_blank">http://l2ork.icat.vt.edu</a>]<br> <a href="http://ico.bukvic.net" target="_blank">ico.bukvic.net</a>[<a href="http://ico.bukvic.net" target="_blank">http://ico.bukvic.net</a>]<br> <br> On May 11, 2016 11:50, "Miller Puckette" <<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>[<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>]> wrote:I gave this some thought but couldn't come up with anything more natural than<br> the "$1" idea.  It allows for changing the other arguments more easily than<br> it would have been if the instance number were passed last.  Also, somehow<br> it felt more natural to have the instance number first.<br> <br> If there's interest in the idea, I could add arrguments to change the<br> behavior (such as putting $1 last instead of first)...  Offhand I doubt that<br> would get used much though.<br> <br> cheers<br> Miller<br> <br> <br> <br> On Wed, May 11, 2016 at 05:26:21PM +0200, Christof Ressi wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 1ex 0.8ex;border-left:1px solid #ccc;padding-left:1ex"><div><div class="h5"> There's also a pitfall: additional creation arguments for the cloned abstraction will start with
$2.<br> For example, in [clone 16 my-abstraction 1 5 9] '1' will be parsed as $2, '5' as $3, '9' as $4 etc.<br> No problem, if the abstraction was written for being used with [clone], but bad when cloning existing abstractions.<br> <br> I'm wondering if there could be a way to get the abstraction ID without messing up existing abstractions... Maybe have a dedicated object?<br> <br> For now, I think it's important to mention the parsing of additional creation arguments in the help file.<br> <br> Christof<br> <br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 1ex 0.8ex;border-left:1px solid #ccc;padding-left:1ex"><div><div class="h5"> Gesendet: Mittwoch, 11. Mai 2016 um 16:25 Uhr<br> Von: "IOhannes m zmoelnig" <<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>[<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>]><br> An: <a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>[<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>]<br> Betreff: Re: [PD] [clone]'s instance number<br> <br> On 2016-05-11 16:18, Liam Goodacre wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 1ex 0.8ex;border-left:1px solid #ccc;padding-left:1ex"> Would it be possible to access [clone]'s unique instance number from within the patch, a bit like a creation argument? This could be used to achieve differentiation between the abstractions, ie. if the abstraction contains "tabread4~ $-1.array" and the $-1 is replaced with the instance number, then each instance could read a different file. Of course there are other ways of doing this, but it would be neat to do it with clone, and I'm wondering if there's a way.<br></blockquote> <br> <br> isn't this what $1 is already doing in clone's instances?<br> <br> <br> fgasdmr<br> IOhannes<br> <br><hr><br></div></div><span class=""> <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>[<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>] mailing list<br> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a>[<a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a>]<br> <br></span></blockquote><span class=""> <br><hr><br> <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>[<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>] mailing list<br> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a>[<a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a>]<br></span></blockquote><span class=""> <br><hr><br> <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>[<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>] mailing list<br> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a>[<a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a>]<br> <br><hr><br> <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br></span></blockquote> <br> <br><hr><span class=""><br> <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br></span></blockquote><br></blockquote> <br><hr><span class=""><br> <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br></span></blockquote><br></blockquote><br><hr><span class=""><br><a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br></span></pre></blockquote></div></div><br>_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>