<br><br><div class="gmail_quote">On Fri, Apr 25, 2008 at 9:25 AM, Hans-Christoph Steiner &lt;<a href="mailto:hans@eds.org">hans@eds.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word">
<br><div><div class="Ih2E3d"><div>On Apr 24, 2008, at 10:49 PM, Mike McGonagle wrote:</div><br><blockquote type="cite"><br><br><div class="gmail_quote">On Thu, Apr 24, 2008 at 7:27 PM, Luigi Rensinghoff &lt;<a href="mailto:luigi.rensinghoff@freenet.de" target="_blank">luigi.rensinghoff@freenet.de</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div style="word-wrap:break-word"> <br><div><div>do you know how the numbers change if you cut everything from patch and paste it back in ?? my impression is that it does not start from zero ?? What if you copy it to a new patch ? then it should start from zero.....</div>
 </div></div></blockquote><div><br></div><div>Well, if you are making these patches PROGRAMMATICALLY, then you can&#39;t cut and paste, as there is no way to do that in programming.</div><div><br></div><div>You might want to open up some abstractions in a text editor, you can see the code that PD uses to create these objects directly. It is very enlightening.</div>
</div></blockquote><div><br></div></div><div>cut and paste is possible too. &nbsp;Check out pd-msg for the details. &nbsp;Basically, you need to programmatically draw a box around the around the area to select the objects, then send the cut and paste messages.</div>
</div></div></blockquote><div><br></div><div>And yes, while this is possible, it just seems very &quot;difficult&quot; at best, to be able to create a patch and lay it out in such a way that you can make those sorts of selections. LOTS of planning would need to go into such a thing.</div>
<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><div></div><div class="Ih2E3d"><div><br></div><br><blockquote type="cite">
<div class="gmail_quote"> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><span>Well sure i could keep track of that....but what if i would like to modify an existing patch....</span></div>
 </div></div></blockquote><div><br></div><div>Can&#39;t do it programmatically. You can only add objects to an existing patch, and if it is something that already has existing objects, there is no way to know how many objects are already in a patch.</div>
 <div>mike</div></div></blockquote><div><br></div></div><div>It would be non-trivial but possible. &nbsp;You could count the lines in the .pd file with &quot;#X obj&quot; in them, that would give you the total number of objects. &nbsp;I guess you&#39;d have to count symbolatoms and floatatoms too.</div>
</div></div></blockquote><div><br></div><div>You could probably do this by loading the patch into a [textfile] object, if you need to do this programmatically.</div><div><br></div><div>Mike</div><div>&nbsp;</div></div>-- <br>Peace may sound simple—one beautiful word— but it requires everything we have, every quality, every strength, every dream, every high ideal.<br>
—Yehudi Menuhin (1916–1999), musician