Forum

Mainloop vs. udp and osc

my patch receives /tuio/2Dobj with udp(server) node and into oscdecoder.
the tuio app. runs with 33 fps on the same machine.
vvvvs udp nodes queue mode is set to “spread”, oscdecoder to match rule “all”.
works fine, but sometimes (ca. every 10th msg) udp(or osc) misses a set message. in my tuio app i can see that they are all sent but osc overjumps them resp. does not decode them all.
do i have to synchronise vvvv and the tuio app with the mainloop node to 33fps?
actually tried that but after it the udp node wasn’t working anymore (i use 6 udp nodes with different port numbers).
had to delete the udp node, put a new one, save and restart the whole app. several times…
possible that mainloop conflicts with udp and osc?
why does the udp or oscdecoder miss some of the set messages?

cheers
armin

hi armin.

the use of udp brings of course a set of behaviors.

-udp is stateless. in other words: there is no control if a package was received or not. but you can check if your lost packages are transmitted to the network-port using a port sniffer like wireshark. if you can see them there you can be sure its a vvvv graph thing.

-i use queue mode “concatenate” with a well chosen delimiter often. behind the udp receiver you need a tokenizer node to force vvvv to drop incoming messages frame by frame.

-the general problem is:
if tuio is running faster (sending faster) than vvvv runs the incoming packages need to be queued in vvvv to ensure every single message is beeing droped into the vvvv frame.

-nevertheless:
even using the right combination of udp receiver and tokenizer i had very rare vvvv message losts than either came from udo receiver or the tokenizer node.

hope that helps

D

hola amin,

starrange again. i don’t see how the mainloop should interfere with the udp-servers in the way you describe. it would be interesting to have this debugged further.

by queueing all the inputs of the udp-server you should be able to see if it is the udp-receiver loosing the message or the tuio-decoder missing it. also see if it makes a difference to use
spread or concatenate on the udp-server.

thanks.
i need more time to test it.
so far my last attempt was o.k.
i used only one udp node, one osc decoder node and received tuio only (/tuio/2Dobj) (i disconnected the other 6 udp nodes; usually they receive from max/msp).
no set messages lost.

when i reconnected the other 6 upds again i lost some set messages from the tuio. probably to much data at the same time? that’s what i have to find out. will upload some screenshots and the patch next week.

@joreg: for sure i tried all possible variations with concatenate and spread on the udp server. in this case udp server in spread mode and osc decoder all is best cause it can receive multiple set msg within one frame.
again: in this patch i do not use the tuiodecoder node, cause it can’t decode my tuio (oldformat). we had this a few months ago. so i patched something with buildtspread etc. which works fine.

cheers
a