Last attempt:
A question about the netsend object: how to send two coordinates in one value such as x= 395, y= 693 to a netsend message 395;693? (see attached patch) I do not want to use pack, because I receive the data in a terminal by a c++ app. Can I use makefilename to combine the data in one value?
max
snip-------
OK, no I don't think there's any way to get makefilename to do what you want. And I don't know of any way to do what you want. Perhaps you should include the information below and repost to the list. But I'm pretty sure that you can't do this without some manipulation at the receiving end.
Pall Thayer
Yes, I receive the signal by a c++ program on the other side and I would like to send the signal from pd in the proper format rather than modifying it at the other side. Can pd do that? Maybe with makefilname? But how?
You must be receiving it in some sort of script or something right?
Can't
you just i.e. (Perl) @myArray = split(/ /, $string); and break them up that way?
ä, no. Sorry for being imprecise, I receive the signal not in an other pd, but
in
a terminal window, so I can not use unpack. Any other suggestion?
Use [pack 0 0] to combine them into one and then [send $1 $2] then use [unpack 0 0] to separate the messages at the other end.
A question about the netsend object: how to send two coordinates in
one
value such as x= 395, y= 693 to a netsend message 395;693?
Zitiere Max Neupert max@revolwear.com:
Last attempt:
A question about the netsend object: how to send two coordinates in one value such as x= 395, y= 693 to a netsend message 395;693? (see attached patch) I do not want to use pack, because I receive the data in a terminal by a c++ app. Can I use makefilename to combine the data in one value?
you can use whatever you want. using [pack] is very simple, and your c++ (or whatever) application shouldn't have to much trouble with it, as it is a simple string with spaces delimited. using [makefilename] might be problematic as it only eats one arguments. a solution to pack several atoms into a single symbol might be zexy's [l2s] (list2symbol)
or you could use 2 different messages for sending the 2 values (not 1 single message) e.g: [send x $1( and [send y $1( and if you really hate these spaces (for whatever reasons), you could use [makefilename] or the special uses of $ to construct messages like
[123
|
[makefilename x=%f]
|
[send $1(
|
[netsend]
of simpler, but different
[123
|
[send $1=x(
|
[netsend]