[PD] Newbie with some questions (notably [block~ 1])

zmoelnig at iem.at zmoelnig at iem.at
Tue Oct 21 16:30:51 CEST 2003

Zitiere Claudius Maximus <gloriousclaudiusmaximus at yahoo.co.uk>:

> Hi all,
> However I've found some issues, either with the way
> I'm trying 
> to do things or with Pd itself:
> 1. [block~ 1] doesn't work
it does. (at least in pd-0.36; i'll have to make the pc i am sitting at compile
first, before i can try 0.37)
> The block size is set to 64 instead.  Moreover:
how do you know ?
i tested it with [pack~].

> C:\>pd -blocksize 1
i don't think that this is a working setting.
pd's dac/adc-blocksize used to be somewhat hardcoded to 64 samples (but this
might have changed with 0.37; i'm a little bit behind in that matters)
and of course your soundcard/driver would have to support such small blocksizes.

> 3. How do I read bytes from a binary file into an
> array?
> Treating them as integers from 0 to 255.

there was something like [read16 /path/to/my/file.dat(
> 4. How do I build messages out of symbol arguments?
> |set $1(  doesn't work as expected when I send it a
> symbol.

depends on what you expect.
you might argue, that when setting a message with [set $1( where $1 is a symbol
the set message should output a symbol when banged/clicked. However you easily
acchieve this by using [set symbol $1(. 
It is often quite hard to distinguish between "symbols" and so called anythings 
, especially for newbies.
There is really a difference between [hallo( (being an identifier "hallo") and
[symbol hallo( (being the symbol (identified by "symbol") "hallo")

> 5. How do I send messages to $0-name arrays?
> |;$0-name x y z(  doesn't work.
there is a big difference between $-args in objects and messages.
for instance in [symbol $1-name] the $1 is substituted by the 1st argument of
the abstraction this object resides in (say: you have made an abstraction
"argtest" that contains [symbol $1-name]; if you now create [argtest cool], the
content of the [symbol] will actually be "cool-name").
when using messages, the $-arguments will expand to the specified element of the
list that is send into the message (if you send a symbol "bad" into a message
[symbol $1-name( you will get "bad-name" out of the message-box)
this would apply the $0 too, but since there is no 0th argument of a list, this
is set to "0" (which is not very consistent: actually i think it should rather
expand to the identifier of the list (which is either "list" or "float" or
"symbol" or whatever))

to send something to your array named "$0-name" use:

[x y z(
[send $0-name]


More information about the Pd-list mailing list