Some OOP stuff related to Pd is addressed here: http://artengine.ca/~catalogue-pd/43-Bouchard.pdf
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.
-Jonathan
From: "abel.jerome@free.fr" abel.jerome@free.fr To: pd-list@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 : http://puredata.info/docs/tutorials/TipsAndTricks http://puredata.info/Members/bbogart/pddp http://puredata.info/docs/style-guide http://www.earcatching.com/pdconv/pdconv.pdf
Sharing practices is also very useful to help eachother and beginners people structure their code (and their thoughts).
Jerome http://jeromeabel.net _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list