[PD] sending TCP data to Pd as a list

Frank Barknecht fbar at footils.org
Mon May 16 23:58:04 CEST 2005


Hallo,
Roman Haefeli hat gesagt: // Roman Haefeli wrote:

> ----- Original Message ----- 
> From: "David NG McCallum" <d at mentalfloss.ca>
>  
> > Now the big problem is that I'll have lists of varying types sizes
> > coming in to Pd... It's kind of hard to use [unpack] to handle all
> > possibilities... sheesh.
> 
> use [drip] from zexy. it makes symbols from every element of a list. 
> [list one two three four(
> -->
> [symbol one(
> [symbol two(
> [symbol three(
> [symbol four(

Well, to be correct it does not convert everything to a symbol, but
behaves like this: 

 [list a b 1 2 c(
 |
 [drip]

gives: 

symbol a 
symbol b 
float 1 
float 2
symbol c 

This opens up cool possibilities, as [drip] for example can be used as
a simple "list-scaler": 

 [list a b 1 2 c(
 |
 [drip]
 |
 [route float] 
 |      /
 [* 2] /
 \    /
  \  /
   [repack 5]

gives: 

"list a b 2 4 c"

Using [length] to set the length of [repack], you can use this for
lists of varying length.

That concludes the "Zexy Lists Idioms And Tricks Tutorial No. 1".

Ciao
-- 
 Frank Barknecht                               _ ______footils.org__
             
          _ __latest track: "scans" _ http://footils.org/cms/show/41




More information about the Pd-list mailing list