[PD] socket object?

IOhannes m zmölnig zmoelnig at iem.at
Thu Feb 16 16:58:26 CET 2012


On 02/16/12 16:46, Pagano, Patrick wrote:
> Hi and thanks
> We are listening for tcp
> in max i get the lines read as
> LaserOutput: [[[2705,246]],[[1358,402]]]
>
> and in pd using mrpeach's tcpclient it reads back
> 91 91 91 50 54 54 49 44 50 56 54 93 93 44 91 91 49 51 54 53 44 52 49 56 93 93 93 13 10
>
> i of course want to strip off the brackets and close brackets and just get to the numbers inside the strings
> is this possible? Can i convert the bytes to characters/numbers?

moocow's "pdstring" library might come in handy.

you could also try to do something like this:

[tcpclient 7777]
|
[list append 59 10]
|
[list prepend send]
|
[list trim]
|
[udpsend]<-[connect localhost 7777(

[netreceive 7777]
|
[print]

though you will have to deal with semicolons separately....


as for splitting strings, have a look at zexy's [symbol2list]

fgmasdr
IOhannes



More information about the Pd-list mailing list