[PD] pd-msg

Hans-Christoph Steiner hans at eds.org
Sat Apr 26 00:03:51 CEST 2008

On Apr 25, 2008, at 12:09 PM, Mike McGonagle wrote:

> On Fri, Apr 25, 2008 at 9:25 AM, Hans-Christoph Steiner  
> <hans at eds.org> wrote:
> 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.
> And yes, while this is possible, it just seems very "difficult" 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.
>> 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.
> You could probably do this by loading the patch into a [textfile]  
> object, if you need to do this programmatically.

Yup, for an example, check out this one in Pd-extended 0.39.3:

Help->Browser->manuals->0.Intro->46.pure_data_files.pd  (I just  
released this is broken in 0.40...)


> Mike
> -- 
> 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


"It is convenient to imagine a power beyond us because that means we  
don't have to examine our own lives.", from "The Idols of  
Environmentalism", by Curtis White

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

More information about the Pd-list mailing list