Sorry, gmail is hacking up the comment log.  Comments are inline.<br><br><div class="gmail_quote">On Wed, Dec 15, 2010 at 11:52 AM, Mathieu Bouchard <span dir="ltr">&lt;<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Wed, 15 Dec 2010, brandon zeeb wrote:<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font size="1">Say you compute a raised cosine window and store it in a table, this table is used within one instance of a granular table reading voice abstraction, 1-n of these abstractions are created at run time for polyphony.  Now you have N instances of this table.  Some people cache mtof in a table, and thus that was my original point.<br>
</font>
</blockquote>
<font size="1"><br></font></div><font size="1">
Oh ok. I couldn&#39;t imagine that people would cache mtof in a table.<br><br>
You can send &quot;reply-to $0-callback&quot; to [s mtof] and see whether your [r $0-callback] gets a bang. If it does, it&#39;s because there&#39;s a [r mtof] that sees that and has a [t b s]=[s] to send you back a bang. This thing is in an instance of the mtof-cache abstraction somewhere. If you don&#39;t get the reply, then you dynamically open the mtof-cache as a toplevel patch (so that the cache doesn&#39;t disappear when you close the patch that created it) and you auto-hide it using &quot;vis 0&quot;-[s $0-canvas] [namecanvas $0-canvas].</font>
<font size="1"><br>
Does that sound good ?</font><div class="im"><br></div></blockquote><div><br>That&#39;s not a bad idea!  Essentially attempting to delegate the creation of the table. <br></div><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font size="1">In a given abstraction you do NOT have control of the order in which your abstractions are created in memory.<br></font>
</blockquote>
<font size="1"><br></font></div><font size="1">
Yes you do. It&#39;s the implicit object numbering. You can renumber an object by deleting and undeleting it. Any new object is created at the end of the order, such that when you save the patch, it will be reloadable in that order.<br>

 <br></font></blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font size="1">
That said, it&#39;s considered bad practice to rely on this. People who need to rely on this may use dynamic patching instead.</font><div class="im"><font size="1"><br></font></div></blockquote><div><font size="1"> </font></div>
<div class="im">Perhaps, but not if you&#39;re creating the objects by hand.  As you say, it is a bad practice.<br> <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font size="1">I care more about Pd as a language and as a means to learn. For my purposes, using externals is pointless,<br></font>
</blockquote>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font size="1">
I beg your pardon ???<br><br>
Pd with a lot of externals is a language too !</font>
<div class="im"><font size="1"><br><br></font>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font size="1">
although I do appreciate all the hard work.<br></font>
</blockquote>
<font size="1"><br></font></div><font size="1">
do you, really ?</font></blockquote><div class="im"><br>Why are people getting offended here?  I&#39;m simply attempting to avoid information overload, my background is primarily in software development, not DSP.  I use Pd to help learn these basics, and I will use pd-extended when I&#39;ve mastered the basics.  With that in mind, what&#39;s the point in using a pre-baked filter if I haven&#39;t created my own and don&#39;t yet fully understand the theory behind it?  This says more about me than it does you :)<br>

<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Basically, an abstraction (or object) is given what it needs to function by a 3rd party.<br>
</blockquote>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Ok, then connections are given to the abstractions in a kind of attribute that we call an &quot;outlet&quot; : wouldn&#39;t that be a form of IoC ?</blockquote></div><br>Nope, that would be delegation.  A simple example would be this.  Assume you have an abstraction which uses [metro] to synchronize a particular process.  Now, if you wanted to synchronize with mates on the net using [netro],<b> you would have to create a second abstraction</b>!  Using IoC / Strategy, you create your abstraction and pass a symbol referencing the metronome you want to use.  In Java / Spring IoC psuedocode:<br>
<br><font size="1">class DoFunThings {<br>   private ICounter counter;<br>   private ISomeFunThing funThing;<br><br>   public void setCounter(ICounter newCounter) {<br><b>      counter = newCounter;</b><br>   }<br><br>  public void setSomeFunThing(ISomeFunThing thing) {<br>
      funThing = thing;<br>  }<br><br>  public void doIt(Intlet inlet1, Inlet inlet2) {<br><b>     int val = counter.next();</b><br>     funThing(val);<br>  }<br>}<br><br>/// now let&#39;s build it<br>ICounter netCounter = new NetCounter(&quot;127.0.0.1&quot;);<br>
DoFunThings myAbstraction = new DoFunThings();<br>myAbstraction.setCounter(netCounter);<br><br>//... this is boring<br><br>myAbstraction.setCounter(new LocalMetronome(100));<br><br></font><br>Within Pd we can&#39;t achieve pure IoC since we can&#39;t construct abstractions by themselves and pass them into other abstractions.  Although, we can only pass along the name of the abstraction with it&#39;s creation arguments.  This rides a blurry line between Strategy and IoC patterns.  Is this making more sense?  <br>
<br>Cheers,<br>-- <br><font style="font-family: garamond,serif;" size="2"><span style="color: rgb(102, 102, 102);">Brandon Zeeb</span><br style="color: rgb(192, 192, 192);"></font><br><br>