Specifications

14 Starting with Pure Data
that they aren’t synchronised to any real timebase. Pd processes them as fast
as it can, so when you change the input number box, the output number box
changes instantly. Let’s look at some other message types we’ll encounter while
building patches to create sound. All GUI objects can be placed on a canvas
using the Put menu or using keyboard shortcuts CTRL+1 through CTRL+8, and
all have properties which you can access by clicking them while in edit mode
and selecting the properties pop-up menu item. Properties include things like
colour, ranges, labels and s ize and are set per instance.
Selectors
With the exception of a bang message, all other message types carry an invisible
selector, which is a symbol at the head of the message. This describes the “typ e ”
of the remaining message, whether it represents a symbol, number, pointe r or
list. Object boxes and GUI components are only a ble to handle appropriate
messages. When a message arrives at an inlet the object looks at the selector
and searches to see if it knows of an appropriate method to deal with it. An
error results when an incompatible data type arrives at an inlet, so for example,
if you supply a symbol typ e message to a
delay
object it will complain. . .
error: delay: no method for ’symbol’
Bang message
This is the most fundamental, and smallest message. It just means “compute
something”. B angs cause most objects to output their current value or advance
to their next s tate. O ther messages have an implicit bang so they don’t need to
be followed with a bang to make them work. A bang has no value, it is just a
bang.
Bang box
A bang box looks like this,
and sends and receives a bang message. It briefly
changes colour, like this , whenever it is clicked or upon receipt of a bang
message to show you one has been sent or received. These may be used as
buttons to initiate actions or as indicators to show events.
Float messages
Floats are another name for numbers. As well as regular (integer) numbers like
1, 2, 3 and negative numbers like −10 we need numbers with decimal points like
−198753.2 or 10.576 to accurately represent numerical data. These are called
floating point numbers, because of the way computers represent the decimal
point position. If you understand some computer science then it’s worth noting
that there are no integers in Pd, everything is a floa t, even if it appears to be
an integer, so 1 is really 1.0000000. Current versions of Pd use a 3 2 bit float
representation, so they are between −8388608 a nd 8388608.
Number box
For float numb e rs we have alr e ady met the number box, which is a dual purpose
GUI element. Its function is to either display a number , or allow you to input