[PD] $ sign removed from message

david golightly davigoli at gmail.com
Wed Apr 5 20:48:40 CEST 2006


Wow, this one comes up all the time.  $0 doesn't exist in
"message"-space.  $n in a message means something completely different
than $n as a creation argument - this is covered in the first chapter
of the help docs.  (Now might be a good time to review them.)  The
standard way to get $0 into a message is to pass it as a message
argument, for instance:

[bang(
 |
[$0]
 |
[set $1-table(

or what have you - this will get you what you want.

HOWEVER, I would for one be an advocate of changing Pd to make $0 an
exception to this rule, so that $0 means the same thing in messages
and in creation arguments.  Since it doesn't mean anything in
message-space anyway, and is simply used to create a sort of namespace
isolating a patch from its environment, it's also strictly speaking
not a creation arg in the sense of $1 and so on (even though it is
initialized at creation time).  This would save LOTS of patching.
What does everyone think?  I mean, is there a really good reason to
keep [$0( meaningless?

-david

On 4/5/06, Peter Worth <peterworth at gmail.com> wrote:
> i'm sending soundfiler a message which says:
>
> read -resize $1 $0-sample
>
> $0-sample is a table (the $0 is required because it is an abstraction
> so if there is more than one instance of it, there can't be tables
> with the same name).
>
> but this gives the error: 0-sample: no such table
> i.e. the $ is being removed.
>
> anyone else had this problem?
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>




More information about the Pd-list mailing list