[PD] String editing

Thomas Sivertsen thomas at bek.no
Tue Jun 29 03:47:52 CEST 2004


IOhannes m zmoelnig wrote:

>
> don't know exactly what you need.

Well, an object that will take any string/message and separate/divide it 
by a criterium. Insertion of characters would be nice too. :-)

I am pretty sure I've done this in Max...  (pd =! max :-))

> the first part of the message (e.g.: "symbol" or "read") is "special" 
> as it defines the content of the rest of the list (it is a so called 
> "selector" while the rest is a list of "atom"s)

Yeah, I figured it was something special about it.

> 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...

> to parse a symbol like "/home/thomas/qt/regnbueromskip.mov" into a 
> list "home thomas qt regnbueromskip.mov" you could use [s2l] (zexy)

I will check that out. It is exactly what I am looking for! Thanks!

    .thomas




More information about the Pd-list mailing list