[PD] String editing
IOhannes m zmoelnig
zmoelnig at iem.at
Tue Jun 29 08:41:06 CEST 2004
Thomas Sivertsen wrote:
> IOhannes m zmoelnig wrote:
>> spaces are used to separate atoms from each other.
>> to get individual atoms out of a list, either use [unpack] or [$2(,
>> [$3(,...
>> (note that you cannot get the selector with [$0( or whatever)
>
> unpack doesn't behave, for some odd reason. It keeps the message as is.
> Must have been a brqainfart or something. I'm quite familiar with pack
> and unpack from my 4 years of using Max...
well, "my" [unpack] behaves perfect.
i really don't know what you want.
if you have a message [symbol /bli/bla/bo(, then the message contains a
single symbol (as is denoted by the selector "symbol") named "/bli/bla/bo"
again: the symbol does *not* consist of 2 parts ("symbol" and
"/bli/bla/bo") but only of one typed part "/bli/bla/bo".
with [unpack] you can extract atoms of "lists".
example: your message is [list 1 2 3(; again "list" is just a
type-selector (to state that the one or more atoms ("1" "2" and "3") of
the message form a list.
now if you send the message [list 1 2 3( (or only [1 2 3( which is just
an abbreviation(!) for [list 1 2 3() to [unpack 0 0 0] you will get the
numbers "1" "2" and "3" out of the outlets.
the numbers are messages too: "1" is really [float 1( (and not just [1(,
which again can be used as an abbreviation(!)).
confused ?
mfg.ad.sr
IOhannes
More information about the Pd-list
mailing list