Forums > MaxMSP

need advice : pattr in udp remote controlled patch


pry
July 27, 2009 | 1:59 am

Hi everyone

I’m trying to build a framework for my new patches.
The architecture is basicaly a main patch with several poly~ containing jit.qt.movie and jit.gl.videoplane remote controlled by a distant GUI patch via udpsend/receive.

I can’t decide between 2 strategies :

- 1: pattrs in the main patch : parameters are set by sending messages from the GUI to the pattrstorage sitting in the main patch ;
or
- 2 : pattrs in the GUI patch : parameters are set with the classical send/receive pairs ;

(patches are below)

I prefer the 1st method, but I’m not sure about it, the 2nd method seems to be easyer, and takes advantage not to use the ressource of the main patch computer in case of interpolation between presets. But is it secure to send several hundreds of messages via udp when recalling a preset ?

Thanks for suggestions.

– Pasted Max Patch, click to expand. –

July 27, 2009 | 10:38 am

I tend to replicate the pattr system on both computers sending pattr messages between computers on the network. There are a couple of output modes that will accommodate this situation.

Sending several hundred udp messages at once shouldn’t be a problem on a local network with computers connected via Ethernet but can lead to packet loss on the Net or with WLAN access. Hence, I use tcp for vital data and udp for continuous control messages.

There is a compression object by Adam Siska which you can use before sending your messages onto the network. It is very fast and capable of compressing and decompressing an arbitrary amount of data. I can send you the contact if you’re interested. Depending on the types of data you can achieve compression ratios > 20:1.

With identical pattrsystems you can also have the same presets on both computers and just send the preset numbers.

I hope this helps,

Georg



pry
July 28, 2009 | 12:13 am

Thanks for your reply Georg. It helps.

I can’t use exactly the same pattr architecture on both computers because I want to avoid to put UI objects in the main patch (because of performance issue in Jitter patch). Regardless I’m going to try the method involving 2 pattr systems, maybe with a kind of look-up table between them.

..and I’m interested by the compression object by Adam Siska.

Regards.

pry


July 28, 2009 | 7:28 am

You can contact Adam at sadam [at] sadam.hu, but he probably won’t respond for a while; he’s currently on vacation. Alternatively, you can also send me your email address and I’ll send you the objects.

Regards,

Georg



pry
July 28, 2009 | 10:39 pm

Thanks to reply.

I prefer avoiding to put UI objects in the main jitter patch, but the idea of two udp-connected pattrstorages sounds stylish.
I don’t know exactly the good way to translate the pattrs pathnames from one pattrstorage to the other. But I’m going to try.

to be continued…

pry


July 28, 2009 | 11:00 pm

You’re welcome. It shouldn’t be difficult to reformat pattr messages. sprintf and/or regexp are your friends. I’ll be offline for the next couple of weeks, but I’ll probably learn about your success once I get back.

Georg



pry
July 28, 2009 | 11:12 pm

I never used regexp, but it seems it could be the key.
Thanks for the tip.


Viewing 7 posts - 1 through 7 (of 7 total)