[Pd] Infernal symbols

Frank Barknecht fbar at footils.org
Sun Aug 6 15:36:55 CEST 2006


Hallo,
Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:

> I still don't grasp why and when Pd seems to arbitrarily insert the
> word "symbol" or "list" instead of treating the symbol as a
> meta-message...

There is nothing (too) arbitrary about it and it's especially not Pd
itself that does this: Every object generates a certain kind of
output. Some objects output symbol-messages (for example the [symbol]
object always outputs symbol-messages), some objects send
float-messages (like [float]) while some objects generate meta
messages (message boxes can do so for example, or [list trim].) Also
some objects accept only messages of a certain kind to certain inlets. 

It's part of getting to know Pd and all its objects to learn which
objects generate and accept which kinds of messages. 


Additionally there are a two conventions on messages that start with a
number: A number can never be at the start of a meta message (and thus
form the "selector" of a message), only words can start a
meta-message. 

So while "float 2" is a full float-message, a single number like "2"
also is a float-message. The selector "float" in this case is implied,
so that you don't always have to type the "float" part.

The second convention is, that lists that start with a number, like "1
2 3" or "0 is zero" are considered list-messages even when the
selector "list" at the start is missing. So these are equivalent: 

"1 2 3" == "list 1 2 3" 
"0 is zero" == "list 0 is zero"

Much as with the "float 2" being equal to "2" here the "list"-selector
is implied and can be omitted, if the first element is a number.

So basically that's all there is to know about messages in Pd: 

bang-message:
    * "bang"

float-message: 

  * messages starting with "float" (the selector) and after that one number
  * single number (the selector "float" is implied here)

symbol-message:
  
  * messages starting with "symbol" and after that one word

list-message:

  * messages starting with "list" and after that several words or
    numbers
  * messages starting with a number and after that several words or
    numbers  (the selector "list" is implied here)

list-messages with no or one element get "downcasted":

  * an empty list-message ("list" and then nothing) is equivalent 
    to "bang"
  * a 1-element list-message where the one element is a number is a
   float message: "list 1" ==> "float 1" ==> "1"
  * a 1-element list-message where the one element is a word is a
   symbol message: "list word" ==> "symbol word"

meta-message:

  * (almost) everything else. ("almost" because there also are things
    like pointers or GemLists, which are even more special)

Print this. ;)

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__




More information about the Pd-list mailing list