[PD] style guide idea: [send foo] versus [; foo(

Matt Barber brbrofsvl at gmail.com
Fri Mar 20 19:28:38 CET 2009


>> Also note that some objects, e.g. [qlist], positively depend on the
>> message sending style.  My students who wanted to use them have often
>> wondered why we hadn't covered the two ways of sending more in depth.
>
> Can you explain with an example?  I don't understand why you must use
> message boxes semi-colons for [qlist].  The [qlist] help patch doesn't  have
> any message boxes with semi-colons, for example.
>
> .hc
>


Sure.  A [qlist] sends messages from a file (among other things).
Those messages have the same form as messages sent from message boxes:
 send-receive_symbol list or whatever;

The only difference is that the first message in a message box is sent
from its outlet rather than to a receive -- the leading semicolon you
see just means "send no message from outlet" which to me makes plenty
of sense and is not difficult to read at all.

For instance, this:

|; init-1 6          /
|; init-2 symbol foo |
|; init-3 -2         \


Really means:
____________
;
init-1 6;
init-2 symbol foo;
init-3 -2
____________

Doesn't it? (pardon my ascii)  And if you did this:

____________
bang;
init-1 6;
init-2 symbol foo;
init-3 -2
____________

then it would send a bang from its inlet first.


So in order to have my students understand [qlist] and its files, they
have found it very useful to know about the message system in message
boxes... it makes the message system in Pd on the whole a lot more
understandable and less confusing, and it seems to be less confusing
the earlier you introduce it to them.

That's all I meant.

Matt




More information about the Pd-list mailing list