[PD-dev] an idea for Pd structure

Matju matju at sympatico.ca
Sun Oct 17 14:08:27 CEST 2004


On Wed, 13 Oct 2004, Hans-Christoph Steiner wrote:

> - high level objects for rapid programming and beginners
> - high level objects would be written in Pd so that the user can easily  
> get inside it

Yes, because

1. Seeing the patcher (code) behind the abstraction (class) is a good way
to understanding... well, often... it's akin to (part of) the embedded
class browsers of some programming environments, where you get to see the
source code of a class.

2. If a class is lacking flexibility, then you can duplicate the class and
add/remove/change elements in it. Sometimes you don't even need to fully
understand the class to make useful changes to it.

3. Trying to follow DRY/OnceAndOnlyOnce, you want strip out unnecessary
details from any piece of code, and one of the ways of doing that is using
a different (higher-level) programming language. (e.g. PDP uses
C/Forth/Pd; GF uses C++/Ruby/Pd)

> - Pd should provide a broad set of the lowest level of operators,  
> whether they be for audio, messages, video, etc.

This is important because when implementing Pd classes in Pd itself you
need to have enough elements to make that level of programming
comfortable, and one of major reasons I've had for writing things in Ruby
instead of Pd, is that although Pd is higher-level, it doesn't have enough
control structures.

Being relatively new to dataflow programming, and having mostly only seen
Pd, I wouldn't quite know what control structures are missing from the
core... except for [demux] [range] etc from jMax... but even with that I
have a hard time figuring out certain problems in Pd and I feel that it
could be solved by inventing new control structures.

Maybe we need a "Design Patterns" book for Pd. ;-)

> One key thing for this idea to work is that objects written in Pd  
> should behave the same as those written in C, C++, etc.  Things are  
> already headed in this direction, with such new features as help  
> patches for abstractions, etc.

BTW, have I asked before, how do I handle variable number of arguments in
an abstraction? jMax had $* ...

_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju





More information about the Pd-dev mailing list