[PD] $ sign removed from message

Frank Barknecht fbar at footils.org
Wed Apr 5 20:40:53 CEST 2006


Hallo,
Peter Worth hat gesagt: // Peter Worth 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?

Yes, many people had this problem. The reason is, that there is no
such thing as a $0-variable in messages, $0 is only defined for
objects. 

To write to a table named with $0, you can do this instead: 

  [openpanel] or whatever you use to get the filename
  |
  [pack s $0] <= objects know about $0
  |
  [read -resize $1 $2-sample(   <= messages start dollar-counting at 1
  |
  [soundfiler]

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




More information about the Pd-list mailing list