Bryan Jurish wrote:
moin Martin, moin Roman,
On 2008-08-13 19:25:20, Martin Peach martin.peach@sympatico.ca appears to have written:
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.
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,
yep, that's pretty much exactly what they do, except [string2any] outputs a list, rather than a single symbol (...but you can always patch it into [list2symbol] from zexy if you need a single symbol). for non-symbol arguments, [any2string] does whatever t_binbuf does (probably truncating floats, performing dollar-substitutions, etc...).
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.
looking at the debian-stable and debian-testing debs from 2008-07-19, they ought to live in /usr/lib/pd/extra/moocow/any2string.pd_linux rsp. /usr/lib/pd/extra/moocow/any2string.pd_linux. the only pd-extended system on which my externals still don't build in windoof/mingw32, because that box is still using a broken version of make. what system are you using, Martin?
Yes I was using WinXP. I also have an Ubuntu machine which does have the moocow objects. I wonder what it is about those objects that makes them difficult to compile on Windows...I just looked through any2string.c and it looks like an ordinary source file for a pd external, except for the debug macro A2SDEBUG and the PACKAGE_VERSION, which should probably be defined in a header file, not the makefile.
Martin