<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I second that thought!  I have recently begun to try to avoid send/receive as much as possible and instead focus on encapsulation in abstractions and subpatches.  I think this makes for much cleaner, more readable, and less buggy code.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>.hc</DIV><BR><DIV><DIV>On Oct 12, 2006, at 6:03 PM, Kyle Klipowicz wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Beware of NOT wiring enough.  <BR><BR>Of course, we've all seen what beautifully unintelligible spiderweb artwork people are capable of spewing out when they don't patch with the courtesy of showing their ideas methodically.  But an invisible web of sends and recieves can be just as misleading.  <BR><BR>I like to use a combination, where there is a single [inlet] to a [route] that uses local [send]/[recieve] pairs within the abstraction.  I really like this idea of Frank's to use one "master" send/recieve pair and then weed it all out with [route] objects:  it makes it easier to remember what to type! <BR><BR>~Kyle<BR><BR><DIV><SPAN class="gmail_quote">On 10/12/06, <B class="gmail_sendername">Phil Stone</B> &lt;<A href="mailto:pkstone@ucdavis.edu">pkstone@ucdavis.edu</A>&gt; wrote:</SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Pardon me for replying in this clumsy way, but I'm not sure how to<BR>maintain thread integrity on my replies, since I receive PD-list in<BR>digest mode.  Since Kyle was kind enough to write me directly, I'm<BR>hoping replying to him and his cc of the list will preserve the thread. <BR>In reality, though, I'm replying to a few people at once here.<BR><BR><BR>Kyle Klipowicz wrote:<BR>&gt; I can already anticipate what some might suggest:  try using a single<BR>&gt; inlet and then pipe that to [route] or [OSCroute]. <BR>&gt;<BR>&gt; Then you can use descriptive messaging to both a) provide better<BR>&gt; information about what data is going where, and b) cut down on having<BR>&gt; a zillion inlets at the top of your abstractions.<BR> &gt;<BR>&gt; Using OSC style messaging is handy too--just look at RRadical for an<BR>&gt; example.<BR>&gt;<BR>&gt; ~Kyle<BR><BR>This does seem like a good idea, and Frank's follow-up is intriguing,<BR>too.  My only objection to it is that you still have a lot of wiring <BR>that you wouldn't have with my second approach, i.e., you still have to<BR>patch the output of [route] or [OSCroute] to the various places the data<BR>is needed.  Plus, you need to pack the sent information in one place on <BR>the parent patch -- another jumble of wires or an additional set of<BR>send-receives.   I think symbolic routing is a good idea in general,<BR>though, so maybe these are not such important considerations.<BR><BR><BR>carmen writes: <BR>&gt; &gt;Now it occurs to me that I could eliminate the inlets entirely, and just write to send/receive pairs &gt;directly<BR>&gt;<BR>&gt;<BR>&gt; how do you find out which instance to send to. are you accessing the abstraction's $0 from outside the abstraction <BR><BR>One idea, which I've used successfully on another patch, is to add a<BR>parameter to the abstraction which is a message prefix.<BR><BR>So, if I called [a_grain~ env samp xyz]  the third argument 'xyz' would<BR>be the message prefix (it could be anything one liked, even '$0' if you <BR>only needed to distinguish one set of messages for an abstraction).<BR>Senders in the parent patch would send to xyz-(whatever), as in [s<BR>xyz-pointerhop].<BR><BR>The abstraction has [receive] objects of the form  [r $3-pointerhop]. <BR>Each instantiation of that abstraction will therefore only receive<BR>messages intended for it, and one can address as many copies as one likes.<BR><BR>What I like about this is the lack of wires.  In the parent patch, <BR>there's no wiring (!).  I just assign appropriate sends, with the<BR>correct prefix, to my sliders, number boxes, etc.  In the<BR>abstraction(s), there's an appropriately named (with the $3 prefix)<BR>receive object sitting right next to whatever needs the message. <BR><BR>I do want to go to the next stage and learn how to persist presets, so<BR>Frank's tutorial is particularly appreciated.  I'll probably adopt his<BR>system for its obvious advantages.  I'm just trying to train myself to <BR>"think PD" in the most efficient way, in the meantime.<BR><BR>Thanks for the responses,<BR><BR><BR>Phil Stone<BR>UC Davis<BR><BR>&gt;<BR>&gt; On 10/12/06, *Phil Stone* &lt; <A href="mailto:pkstone@ucdavis.edu"> pkstone@ucdavis.edu</A><BR>&gt; &lt;mailto:<A href="mailto:pkstone@ucdavis.edu">pkstone@ucdavis.edu</A>&gt;&gt; wrote:<BR>&gt;<BR>&gt;     I've been playing with Jamie Bullock's 'a_grain' lately (see<BR>&gt;     <A href="http://www.puredata.org/Members/jb/a_grain%7E/view"> http://www.puredata.org/Members/jb/a_grain%7E/view</A> ), and in order to<BR>&gt;     understand it better, I've been refactoring it.<BR>&gt;<BR>&gt;     A_grain has 14 inputs to control various parameters; my first<BR>&gt;     approach <BR>&gt;     to cleaning it up was to put all the inlets, in the correct order, at<BR>&gt;     the top of the patch -- I then connected those inlets to 'send'<BR>&gt;     objects<BR>&gt;     with $0 variables, placing matching 'receive's close by where they <BR>&gt;     are<BR>&gt;     needed.  This really cleaned up the wiring quite a bit, and made it<BR>&gt;     easier to "read".<BR>&gt;<BR>&gt;     Now it occurs to me that I could eliminate the inlets entirely,<BR> &gt;     and just<BR>&gt;     write to send/receive pairs directly (perhaps also passing in a<BR>&gt;     "prefix"<BR>&gt;     as an argument that is prepended to all receives inside the<BR>&gt;     abstraction, <BR>&gt;     which would allow multiple instantiations of the abstraction, with<BR>&gt;     independent control of each).  At the UI-level patch, I could use<BR>&gt;     named<BR>&gt;     senders (from number boxes, sliders, whatever) just hovering <BR>&gt;     nearby the<BR>&gt;     a_grain abstraction; no wires, no mess.<BR>&gt;<BR>&gt;     I'm wondering what experienced PD architects consider the best<BR>&gt;     practice<BR>&gt;     here; if the second approach is better, I begin to question the <BR>&gt;     advisability of wired inlets for more than two or three<BR>&gt;     arguments.  The<BR>&gt;     left-to-right ordering of them, along with the rats-nest wiring caused<BR>&gt;     by high numbers of inputs, seem to argue against them.  The only <BR>&gt;     downside I can see to the second method is that if it's not done<BR>&gt;     neatly,<BR>&gt;     i.e., the senders are placed indiscriminately and not necessarily near<BR>&gt;     the abstraction they're sending to -- it could become very hard to <BR>&gt;     understand/maintain the patch.<BR>&gt;<BR>&gt;     I'll be interested to hear other PD user's thoughts on this.<BR>&gt;<BR>&gt;<BR>&gt;     Phil Stone<BR>&gt;     UC Davis<BR>&gt;<BR>&gt;     _______________________________________________ <BR>&gt;     <A href="mailto:PD-list@iem.at">PD-list@iem.at</A> &lt;mailto:<A href="mailto:PD-list@iem.at">PD-list@iem.at</A>&gt; mailing list<BR>&gt;     UNSUBSCRIBE and account-management -&gt;<BR>&gt;     <A href="http://lists.puredata.info/listinfo/pd-list"> http://lists.puredata.info/listinfo/pd-list</A><BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; --<BR>&gt;<BR>&gt; <A href="http://theradioproject.com">http://theradioproject.com</A><BR>&gt; <A href="http://perhapsidid.blogspot.com"> http://perhapsidid.blogspot.com</A><BR>&gt;<BR>&gt; (((())))(()()((((((((()())))()(((((((())()()())())))<BR>&gt; (())))))(()))))))))))))(((((((((((()()))))))))((())))<BR>&gt; ))(((((((((((())))())))))))))))))))__________<BR> &gt; _____())))))(((((((((((((()))))))))))_______<BR>&gt; ((((((())))))))))))((((((((000)))oOOOOOO<BR><BR></BLOCKQUOTE></DIV><BR><BR clear="all"><BR>-- <BR><BR><A href="http://theradioproject.com">http://theradioproject.com </A><BR><A href="http://perhapsidid.blogspot.com">http://perhapsidid.blogspot.com</A><BR><BR>(((())))(()()((((((((()())))()(((((((())()()())())))<BR>(())))))(()))))))))))))(((((((((((()()))))))))((())))<BR>))(((((((((((())))())))))))))))))))__________ <BR>_____())))))(((((((((((((()))))))))))_______<BR>((((((())))))))))))((((((((000)))oOOOOOO<DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:PD-list@iem.at">PD-list@iem.at</A> mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">UNSUBSCRIBE and account-management -&gt; <A href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR></DIV><DIV>------------------------------------------------------------------------</DIV><DIV><BR></DIV><DIV>"[W]e have invented the technology to eliminate scarcity, but we are deliberately throwing it away to benefit those who profit from scarcity."        -John Gilmore</DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>