[PD] OOP practices in Pure Data

Jonathan Wilkes jancsika at yahoo.com
Wed Nov 30 19:07:18 CET 2011

Some OOP stuff related to Pd is addressed here:

For sharing the same $0: I think my canvas "get" method addresses that.  There are probably several ways one 

could do it.  I already have a [send2canvas n] abstraction where n is a float that sets where in the canvas hierarchy 

to send to-- so maybe I could also add the possibility to specify a symbolic arg, like [send2canvas foo] so that 

[send2canvas] climbs the canvas hierarchy until the "filename" attribute for that canvas is foo.pd.  Sending 

"get dollarzero" to [send2canvas foo] would output the $0 of the container "foo" abstraction, if it exists.

Then you'd have:
* [send2canvas 0] -> local to "this" canvas

* [send2canvas foo] -> use this to get a common $0 for some arbitrary level of nested abstractions
* [send pd-foo.pd] -> send to all instances of "foo" abstraction + any open as toplevel patches

I imagine [send2canvas foo] as I've just outlined could easily get confused with [send pd-foo.pd], so maybe there's 

a better way to make the difference more explicit.


> From: "abel.jerome at free.fr" <abel.jerome at free.fr>
>To: pd-list at iem.at 
>Sent: Wednesday, November 30, 2011 7:31 AM
>Subject: [PD] OOP practices in Pure Data
>Hi all,
>All along years of practice, I've developped with Pd as well as object oriented languages.
>Some methods and designs from OOP (object oriented programming) structure my patches, because I think they are very useful to clear thoughts and share patches. It is sometimes difficult to understand patches from other people, and more difficult when it is a complete project. Therefore I think it's quite "good" to link Pd programming with OOP.
>In the same idea, I like those resources : 
>Sharing practices is also very useful to help eachother and beginners people structure their code (and their thoughts).
>Pd-list at iem.at mailing list
>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20111130/30d44d41/attachment-0001.htm>

More information about the Pd-list mailing list