Personal tools
You are here: Home community PdWikiWiki PdTutorialBasicElements

Edit history

Edit: -1 of 1
Time: 2006-12-20 12:40:27
Note: /pd/pd/portal_catalog/manage_catalogRebuild

!!Basic elements
Basic elements of PD appear in the picture below. The menu
'PUT' has them all listed (there are a couple more, namely
array and graph but we won't deal with them right now).
'''Object box:''' This is where one puts a command, or a function
that will have to return some value. For a list of all
available commands right­click on the canvas.
Actually, I'm not sure if that list is complete but it will
surely get you started. Some of the commands require one or
more arguments, which you type into the box separated by
spaces. Most of them (all?) will not force you to type an
argument (right­clicking on any type of element will bring
up a help screen for that element... not all of them are
documented, though. They all default to something that will
hopefully not produce an error but it is useful to know
about the default values and about the arguments in
general. What's really fun is that in PD most of that
arguments could be variable and one can update/change them
on the fly during runtime. Will get to it. Some examples of
objects with and without arguments will follow.
'''Message Box:''' message boxes send messages to objects. A
message could be anything. A string, a number, a float, a
combination of those. However, not all objects accept all
kinds of messages, so beware.
'''Number Box:''' quite obvious. they're useful for sending
numbers to objects, messages (in some situations) and other
numbers. The numbers can be changed during runtime (unlike
numbers in message boxes). Just click (within the num box)
and drag and the number will update itself (up=increase,
down=decrease). Clicking and dragging with shift key down
will change the number into float with 2 decimal spaces and
will update by .01. Very useful. Number boxes are also very
useful for watching the output of different operations.
'''Symbol:''' is the symbol version of number. You can type
alphanumeric characters into the box. Dragging does nothing
but it could be useful when you want to type your messages
on the fly.
'''Comment:''' Does nothing. It's a text block useful for
commenting your programs. Comments are as useful as they
are in all the other programming languages. After all PD is
a programming language.
The important part is that all elements (well not all...)
except for comments, graphs and arrays have inlets and
outlets. Inlets are situated on top of the element and
outlets in the bottom. Numbers, symbols and messages have
one inlet and one outlet. Objects are different. Some have
one inlet and one outlet, others have 2 or more inlets and
one or more outlets. Some objects have a variable number of
inlets/outlets (the number of arguments sets the number of
Now, let's get into some practice.
The canvas in the PD application has 2 modes. A "runtime"
mode and "edit" mode. The edit mode can be set on and off
in the EDIT menu or by hitting Ctrl­e. However, if the edit
mode is set to off and you try put an element the patcher
will immediately put itself to editing mode. BTW, a patcher
is the document/window in which you do your program, which
consists of patching different elements together.
'''Previous:''' PdTutorialIntro '''Next:''' PdTutorialOverview

Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser