Using TUIO with more than one port

scalf's picture

I have been using the new TUIO apps for both the iOS and Android. Alone they are great, but when I connect them in combination, the one port (3333) cannot handle both at the same time.

So I am wondering if there is a way to change the port that Quartz is listening to, so you could have multiple devices connect with one application or host computer.

Since TUIO and OSC are related, I used the stock oscreceiveing patch to listen to port 3333 and the received signal would flash when the device was touched. Using the qcOSC plugin from hexler I saw that a packet was named /tuio/2Dcur, within there were 2 structures that I could get to: one was a string that said "fseq" and the other was a counter that would only increase when the pad was touched.

I then changed the Tuio settings from the device to "not send full updates" which gave me /tuio/2Dobj and /tuio/2Dbib - both of which gave nothing but a string - but still a lead.

So perhaps the source of the tuioclient plugin could be changed?

Or is there a way to dig deeper into the structure listed on the receiving OSC patch?

Thanks for any clues

http://code.google.com/p/tuiodroid/ http://code.google.com/p/tuiopad/

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

thomasvanta's picture
Re: Using TUIO with more than one port

Here is the Specification of TUIO http://www.tuio.org/?specification you will find all the info about the different messages you can find. Generally you have to get different structures from the port 3333 under the direction /2DCur, one with the 'fseq' string (for time) one for 'alive' cursors and one with the 'set'. There you will have x,y,z,... for every cursor which is moving. The same under /2DObj but for objects, like fiducials. Hope that helps you. PS. udpreceive + print from MaxMSP is very useful in that matters.

scalf's picture
Re: Using TUIO with more than one port

Thanks, that was helpful. I noticed the part about multiple signals:

"An optional SOURCE message identifies the TUIO source in order to allow source multiplexing on the client side"

I see the internals of the structures when I hover my mouse over the tuio and qcOSC patches, but when I am not sure how to get the SOURCE out of it.

When both devices are sending to the same port, the only thing I can differentiate is the "s_id" which will be different numbers depending on the # of times tapped etc...

When I use the qcOSC patch, I can route them in as different ports - say 3333 for the ipad and 3335 for the droid. In this case, I get two different structures, instances of /tuio/2Dcur, but in different patches. So that's a step.

What do you think would be a good way to multiplex the different devices?