PD programming conventions

for multiple users of large PD patches

back - home

This webpage is also available as a doc and pdf file.

Programming conventions are important because:


Data Flow

Subpatches and Abstractions

- the purpose of the subpatch.

- how it relates to the design specification (using reference numbers if appropriate).

- the part of the program from which it is called (unless it is called from many places).

Sends and Receives

- names should be kept on a centralised list and included in the master patch or in any documentation.

- names should clearly describe the information they sent, using camel case (e.g. thisIsCamelCase).

- they should be off to one side of the rest of the objects, and vertically aligned. It is easier to see where they lead to.

- they should be preceded by ‘$0-’ so that they will not interfere with other modules. This makes it uniquely identified, even if the same name is used in other modules.

- they should be labeled with the comment ‘ABSTRACTION’ in the top left-hand corner of the subpatch. $0-’ only works in abstractions, not sub-patches.


- avoid making them inline. This slows processing and thus potentially changes the functionality of the module. Also they are more time-consuming and fiddley to delete if they are inline.

- mark with with a comment saying ‘DEBUGGING’ in uppercase. If you forget to delete them, they can be easily found at the test/integration stage by searching for the string.

Good: Bad:




trigger t
send s
receive r
int i
float f
bang b
symbol s
list l
anything a

back - home