Specifications

16 Starting with Pure Data
to +1.0 must first be scaled using the appropriate object. The VU is one of the
few GUI elements that only acts as a display.
General messages
Floats and bangs are types of message, but messages can be more general. Other
message types can be created by prepending a selector that gives them special
meanings. For example, to construct lists we can prepend a list selector to a
set of other types.
Message box
These are visual containers for user definable messages. They can be use d to
input o r store a message. The right e dge of a message box is curved inwards
like this
, and it always has only one inlet and one outlet. They behave
as GUI elements, so when you click a message box it sends its contents to the
outlet. This action can also be triggered if the messa ge box receives a bang
message on its inlet. Message boxes do some clever thinking for us. If we stor e
something like
5.0
it knows that is a float and outputs a float ty pe, but if we
create
a message with text
then it will send out a list of symbols, so it is typ e aware
which saves us having to say things like “float 1.0” as we would in C programs.
It can also abbreviate floating point numbers like 1.0 to 1, which saves time
when inputting integer values, but it knows that they ar e really floats.
Symbolic messages
A symbol generally is a word or some text. A symbol can represent anything, it
is the most basic textur al messa ge in Pure Data. Technically a sy mbol in Pd can
contain any printable or non-printable char acter. But most of the time you will
only encounter symbols made out of letters, numbers and some interpunctuation
characters like dash, dot or underscore. The Pd editor does some automatic
conversions: words tha t can also be interpreted as a number (like 3.141 or 1e +
20) are converted to a float internally (but +20 still is a symbol!). Whitespace
is used by the editor to separate symbols from each other, so you cannot type
a s ymbol including a space character into a message box. To generate symbols
with backslash-escaped whitespace or other special cha racters inside use the
makefilename
symbol maker object. The
openpanel
file dialog object preserves and
escapes spaces and other special characters in filenames, too . Va lid symbols a re
badger, sound 2, or all your base but not hello there (which is two symbo ls), or
20 (which will be interpreted as a floa t, 20.0).
Symbol box
For displaying or inputting text you may use a
symbol
box. Click on the display
field and type any text that is a valid s ymbol and then hit ENTER/RETURN. This
will send a symbol message to the outlet of the box. Likewise, if a symbol
message is received at the inlet it will be displayed as text. Sending a bang
message to a symbol box makes it output any symbol it already contains.