The Pure Data Basics


The Interface

This is the main Pd window. It shows all kinds of important information, such as error messages.

pd-00

 

 

 

 

 

 

 

 

 

 

This is an almost empty patch, it is the *canvas* on which we place objects in order to program.

pd-01-canvas

 

 

 

 

 

 

 

 

You can create a new patch using the menu: Menubar –> File –> New.


Objects

You can place objects on the canvas by either using the menu (Menubar –>Put) or using shortcuts. There are four different kinds of text objects in Pd:

1. Objects (do something). What they do depends on the specific object. E.g., the print object prints the messages it receives.

2. Messages (e.g., instructions, numbers). Messages respond to the mouse. You can click on them to send the message to another object. If you send a message to the print object, the print object will print it.

3. Atoms (Number boxes). One can enter values with the keyboard  or use the mouse to change the values by clicking on it and dragging up and down.

4. Comments (for the programmer, not the computer)

Example: A patch with a message, an atom (number box), a print object and comments:

pd-03

 

 

 

 

 

 

 

 

Objects are rectangular. Messages have an indentation on the right. Comments are just text, they have no borders. Learning Pd also means learning which objects exist and what they do.


 Inlets, outlets and patch cords

Objects and messages have inlets and outlets. They are the tiny rectangles in the corners of objects. Inlets are on the top of objects and outlets are on the bottom of objects.  You can connect objects with patch cords by clicking on an outlet and releasing the mouse over an inlet.

pd-04

 

 

 

 

 

 

 

 


Edit Mode and Play Mode

Pd has two modes, the edit mode and the play mode. Edit mode is for creating the program, play mode is for using the program. When we start a new patch, it opens in edit mode. In this mode we can place objects on the canvas, connect them, move them around and so on.  If we want to use the program or try out what the program does, we have to change into Play mode.  We can switch between modes with the shortcut apple-e (mac) or ctr-e (windows). The mouse cursor gives an indication in which mode you are.

Edit mode:

pd-05a

 

 

Play mode:

pd-05b

 


How it all comes together

Example: Hello World

pd-06

 

 

 

 

 

 

 

The message “Hello World” is connected to the print-object with a patch cord. When in play mode, clicking on the message prints the message in the Pd window.

 


Help files

Every Pd object comes with a help file. Enter edit mode,  right click on the object and select the Help entry. These help files are like little example programs and they are very useful. You can copy paste them (or parts) into your own patch.

Open the help patch:

pd-07

 

 

 

 

The help patch: pd-08

 


Tutorials

Pd comes with many useful patches that illustrate Pd’s capabilities and that can serve as building blocks in your own patches. They are also ordered in a way that can guide you through learning Pd. You can access these files through the menubar: Menubar–>Help–> Browser. You will also have to study some of these examples as your homework assignments.

Try this:

Menubar–>Help–> Browser –> Pure Data –> 2.control.examples –> 01.PAR1.hello.pd

pd-09