Pak/Unpack and UdpSend/UdpReceive

May 31, 2012 at 10:43pm

Pak/Unpack and UdpSend/UdpReceive

Hello,
I try to create a tablet interface to control max on a computer.
But I don’t understand pak and unpack don’t work fine.
Just “send” and “receive” work fine.
But in all the patch, when I click on a button in the send subpatcher’s, all the button are activated in the receive subpatcher’s.
I try to separate in other port, but same thing, anarchy!

What’s wrong please?

Thanks.

Here it is bpatchers:

– Pasted Max Patch, click to expand. –
– Pasted Max Patch, click to expand. –
#56490
May 31, 2012 at 11:31pm

All buttons are activated because you have set all arguments of ‘pak’ to ’1′.

Try using [pak 0 0 0 0 0 0] instead.

#202520
May 31, 2012 at 11:53pm

Thanks broc for you’re answer.

But it don’t solve my problem.
In the documentation (Max Comm Tutorial 3: UDP Networking) it’s written:
“UDP isn’t the most robust protocol: it does not guarantee that packets will arrive in any order, nor does it provide any means of error or packet loss notification.”
Do you thing it could be the problem?

#202521
Jun 1, 2012 at 12:34am

The problem is going to be with your network settings in some way. The patch works correctly on a local machine with the loopback IP (127.0.0.1).

UDP is an unreliable protocol, but the word ‘unreliable’ here mainly refers to the fact that the protocol doesn’t include packet acknowledgement from the receiving device. You’re not going to have any difficult using it over a small network.

#202522
Jun 1, 2012 at 12:36am

So I don’t understand, I’ve tried many things…
Now I will separate message into different ports, tedious but it looks working…

#202523
Jun 1, 2012 at 11:31am

I don’t think that different ports are really needed. You could still try to send the list as proper OSC message by prepending an address like /buttons, or send the list as single item converted eg. with tosymbol/fromsymbol.

#202524
Jun 3, 2012 at 12:46am

Ok thanks for UDP info,
I will continue to try to solve my problem.
Osc and touchosc look like a good way to realize my interface, next step to learning using Osc!

#202525
Jun 6, 2012 at 8:22pm

in my exp udp has been reliable
try to send messages as Osc tunnel
use

– Pasted Max Patch, click to expand. –
#202526

You must be logged in to reply to this topic.