Pak/Unpack and UdpSend/UdpReceive

May 31, 2012 at 10:43pm

Pak/Unpack and UdpSend/UdpReceive

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?


Here it is bpatchers:

– Pasted Max Patch, click to expand. –
– Pasted Max Patch, click to expand. –
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.

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?

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 (

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.

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…

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.

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!

Jun 6, 2012 at 8:22pm

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

– Pasted Max Patch, click to expand. –

You must be logged in to reply to this topic.