[PD] pd-msg

Hans-Christoph Steiner hans at eds.org
Fri Apr 25 16:25:00 CEST 2008


On Apr 24, 2008, at 10:49 PM, Mike McGonagle wrote:

>
>
> On Thu, Apr 24, 2008 at 7:27 PM, Luigi Rensinghoff  
> <luigi.rensinghoff at freenet.de> wrote:
>
> 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.....
>
> Well, if you are making these patches PROGRAMMATICALLY, then you  
> can't cut and paste, as there is no way to do that in programming.
>
> 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.

cut and paste is possible too.  Check out pd-msg for the details.   
Basically, you need to programmatically draw a box around the around  
the area to select the objects, then send the cut and paste messages.


> Well sure i could keep track of that....but what if i would like to  
> modify an existing patch....
>
> Can'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.
> mike

It would be non-trivial but possible.  You could count the lines in  
the .pd file with "#X obj" in them, that would give you the total  
number of objects.  I guess you'd have to count symbolatoms and  
floatatoms too.

.hc


>
>
>
> -- 
> Peace may sound simple—one beautiful word— but it requires  
> everything we have, every quality, every strength, every dream,  
> every high ideal.
> —Yehudi Menuhin (1916–1999), musician
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
> listinfo/pd-list



------------------------------------------------------------------------ 
----

Using ReBirth is like trying to play an 808 with a long stick.    - 
David Zicarelli


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20080425/82a42c74/attachment.htm>


More information about the Pd-list mailing list