Personal tools
You are here: Home development PdDefinitions
Views


There are a number of things that are unclear in Pd regarding messages, data types, etc. This is a spot to work out clearer definitions. The point of this page is to gather all definitions in Miller's manual, in Pd itself, and the Max/MSP manual. Then, we have a basis to then come up with clearer definitions and clearer implementations. The key to figuring this out is by seeing how things work in Pd itself. Careful to think about Pd from the user's point of view, not the from the C/Tcl source code. We are talking about the Pd language, not its implementation. If you are talking about ANSI C, it does not matter who implemented it. Same with Java, Python, etc.

There does not seem to be one canonical source of definitions, even the source is inconsistent in some places. The fact that these definitions vary highlights that problem. If you think you can improve on these defintions, please add a wiki page to this one and put your own definitions there. Also, if you find any other relevant definitions, please add it to this page.

Existing Terms and Definitions

Here is a list of some relevant existing terms and how they are currently defined.

Messages

Cycling74's definition: "the arguments that are passed to and from objects"

Miller's definition: "In Pd, objects intercommunicate by sending messages... Messages contain a selector followed by any number of arguments. "

Selectors

From the Pd manual 2.3.1"The selector is a symbol, which appears in the patch as a non-numeric string with no white space, semicolons, or commas." "bang", "float", "symbol", and "list" are all pre-defined selectors with a built-in meaning in Pd. Any series that has a numeric first element has an implied selector of "list". For all other messages, the selector is free to be interpreted by the object.

Atoms

There are two atom boxes, *floatatom* and *symbolatom*

Pd Manual 2.1.2

"The text is divided into atoms separated by white space."

"Atoms are either numbers or symbols like '+'. "

Pd Manual 2.6.1

"...atom (number/symbol)..."

Symbols

Pd Manual 2.1.2

"Anything that is not a valid number is considered a symbol."

Floats

From float-help.pd

"The float object stores a number"

Categories of Data as Pd sees it

Since Pd is a language in its own right, we should first discuss data types as Pd sees it, not how things are implemented. Data are different than messages. Messages contain data of these following categories, but "message" is not a category of data. Data can be broken down into these categories in Pd (according to route, select, trigger):

bang:: 'bang', [bang(, 'trigger bang', 'route bang', 't b' float:: *floatatom*, 'f', 'float' [float 5(, [23(, 'route float', select, 'trigger float', 't f' pointer:: 'pointer', 'trigger pointer', 't p' symbol:: *symbolatom*, 'symbol', [symbol element(, 'route symbol', 'select element', 'trigger symbol', 't s' comma:: a comma semi-colon:: a semi-colon dollar:: donno dollarg:: donno list:: 'list', [list one two(, [list one 2(, [list 1 2(, [1 2(, [1 two(, 'route list', 'trigger list', 't l' ('route list' does not output a list when the incoming data is a undefined series with a selector of "list) symbolic element:: [element( selector series:: [one two(, [more than one element(, [more than 2 elements( signal:: this is the format of data that is sent between signal/tilde objects gemlist:: a gemlist is a series of three elements, the first element is the selector "gem_state", the second element is a pointer to GemState? and the third element is a pointer to GemCache?. PDP packets:: this is the format of data that PDP and PIDIP use. It is basically an integer pointer to a PDP packet. A PDP packet is a modified YU12 format with 16bit signed integers instead of unsigned, and chroma (0,0) indicating gray scale.

One-element lists

One element lists do not exist. Any message with a "list" selector and one element are immediately converted to either a symbol or float, depending on what that element is. Therefore the definition of a list is: a series of elements with a selector of "list" and 2 or more elements. (But don't forget, a series whose first element is a float has an implied "list" selector!)

"s" type defined by '''trigger'''

trigger introduces another type, "s". If you send [symbol element( or [list more than one element( to a 'trigger bang float symbol list anything', it will produce output on every outlet. But if you send [element( or [more than one element(, it will only produce output on the "bang" and "anything" outlets, and gives the following error message:

error: trigger: can only convert "s" to "b" or "a"

Since trigger is producing output on only the "bang" and "anything" outlets, it is telling us that "s" is the data type of these messages: [element( [more than one element(. But "s" is not a symbol because trigger treats each differently.

Anything

"anything" is a key word in some places in Pd that means "any data type". But this is not to be confused with a data type. "anything" is not a data type.

Other Relevant Objects

'any' can store any kind of data. 'any' in combination with the other storage objects ('float', 'pointer', 'symbol') clearly demonstrate that data types are separate from messages.

Comparison of Data Categories

There are multiple ways to look at data categories, here are four: using trigger in Pd, using route in Pd, "pre-defined objects", and t_atomtypes. The last two are only visible in the C implementation of Pd.

trigger

route

pre-defined

t_atomtype

==

==

==

==

anything

anything

bang

bang

bang

cant

comma

deffloat

defsym

dollar

dollsym

float

float

float

float

gimme

list

list

list

null

pointer

pointer

pointer

semi

signal

symbol

symbol

symbol

symbol

Attempts at Definitions



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