Roman Haefeli wrote:
On Tue, 2008-08-12 at 18:45 -0400, Martin Peach wrote:
Roman Haefeli wrote:
hi all
i would like to rewrite the netpd-server patch using [tcpserver], but i cannot figure out how to convert 'list of number' messages into ascii messages. the OSC classes also from mrpeach seem to do the conversion internally. what i would need would something similar without the OSC functionality. is there something around?
Well if you had a functional [str] you could do that.
it seems, that the conversion from string to any and vice versa is part of the OSC classes written by you. i don't see why the class, that _only_ does this conversion, needs a patched pd, when at the same time the OSC classes don't. would it be possible to have both: an efficient [str] for pd-extended and [str]
Yes, maybe a [serialize] and [unserialize] would be a good idea. [unserialize] would take a list of integer floats, interpret them as ascii, and convert it to a single symbol, and [serialize] would take a symbol and convert it to a list of integer floats on [0..255]. Converting floats and lists raises problems though (should a float be converted to its ascii or binary representation? How to tell if a list of floats is meant to be decoded as symbols or floats?).
I think [moocow/any2string] and [moocow/string2any] already do this, but I can't tell right now because they don't seem to be in my Pd 0.40.3-extended-20080719, or I'm not looking in the right place.
Martin