5 of 5
5
present and future of TUIO
Posted: 04 March 2009 08:07 PM   [ Ignore ]   [ # 61 ]
Avatar
Rank
Joined  2009-02-21
Total Posts:  9
New Member

Lots of great ideas here.  It’s unfortunate that flash is not capable of handling UDP without a workaround—arg, proprietary software (or we could change it to work with UDP directly!).

As per the original line of conversation, we should keep all of the gateways, proxies, AS3 binary handlers, etc. open source so that they can grow into whatever is next (TUIO and/or LusidOSC; and future versions of flash). 

I haven’t done much work with flash yet, but after reading a bit it looks like Zinc (a “rapid application development” tool for flash) allows for UDP support (see an example here; Zinc needed separately).  The downside is definitely the cost, but it looks like there is a free trial of Zinc which could be enough to assess if this is a possible solution without requiring TCP.

Adam

 Signature 

Trackmate : http://trackmate.sourceforge.net
LusidOSC : http://lusidosc.sourceforge.net

Profile
 
 
Posted: 04 March 2009 08:15 PM   [ Ignore ]   [ # 62 ]
Avatar
RankRankRankRankRankRank
Joined  2007-04-08
Total Posts:  2293
Moderator

Yeah I agree.

From what I understand, zync is an advanced way of creating flash projectors for various OS. I did find this “Standalone projectors like MDM Zinc can add UDP capabilities to the mix” but that could still be considered a workaround creating custom projectors and it wouldn’t allow for browser based playing which is one of the benefits of flash.

 Signature 

Follow me on:
My Website - Youtube - Twitter - Linkedin

Profile
 
 
Posted: 04 March 2009 08:28 PM   [ Ignore ]   [ # 63 ]
Avatar
Rank
Joined  2009-02-21
Total Posts:  9
New Member

Yeah, I was a bit skeptical, too.  But looking at their code example, it seems like it does support UDP (albeit at the cost of browser support, as you mentioned).

//listening to UDP:
mdm.Network.UDP.Socket.startServer(listenport);

//sending UDP:
mdm.Network.UDP.Socket.send(remoteipsendport"messagein@eq@"+messageout2);

Also: a very short forum post here, but this guy says it’s possible to get UDP via Zinc.
http://www.actionscript.org/forums/showthread.php3?t=126728

Adam

 Signature 

Trackmate : http://trackmate.sourceforge.net
LusidOSC : http://lusidosc.sourceforge.net

Profile
 
 
Posted: 05 March 2009 04:15 AM   [ Ignore ]   [ # 64 ]
Avatar
RankRank
Joined  2007-03-15
Total Posts:  224
Jr. Member

Zinc acts as a UDP to TCP proxy too, then lets you use the classes listed above to create a UDP connection through the zinc projector. Its pretty much the same technique I’m using with touchgateway.

As for the reasons behind the toxy packet modifications, I can only assume it was to make it easier to read the packets on the flash end, but you would have to ask jet-plane for the exact reasons.

Profile
 
 
Posted: 05 March 2009 05:00 AM   [ Ignore ]   [ # 65 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  314
Sr. Member

Well, zinc looks definitely interesting, but being an extension that apparently can’t be used in default environments, I think it disqualifies.
If we had to use an extension I’d rather go for a native TUIO extension itself (probably not difficult using the C++ client)
Once I learn more about the toxy modifications and have a chance to try it on the weekend, we will surely come to a quick solution that will finally draw a line under the Flash/XML story.

 Signature 

TUIO community site: http://www.tuio.org
reacTIVision framework: http://reactivision.sf.net
TUIO & reacTIVision CVS: http://sf.net/projects/reactivision
reacTIVision forum: http://sf.net/apps/phpbb/reactivision

Profile
 
 
Posted: 05 March 2009 07:50 AM   [ Ignore ]   [ # 66 ]
Rank
Joined  2007-08-31
Total Posts:  53
New Member
Martin Kaltenbrunner - 04 March 2009 07:40 PM

And finally can someone also explain to me which was the first version of Flash/AS that supported TCP?

ok let’s do a bit of flash history lol

Flash introduced in Flash 5 the firts semi-TCP connection (to call it in some way). Macromedia introduced a new object/class called XMLSocket which allowed a socket connection where the data transmitted had to be XML. (XMLSocket reference)

Knowing that we can all guess why the original Flosc in 2002 by Ben Chun need a conversion from OSC to XML, as it was the only possible way.

And it isn’t until first semester 2007 with the introduction of the new Flash Player 9 with the AS3 capabilities that a TCP binary socket is added.

Hope some taht brings some more light :)

Profile
 
 
Posted: 05 March 2009 08:04 AM   [ Ignore ]   [ # 67 ]
Rank
Joined  2007-08-31
Total Posts:  53
New Member

about zinc I wouldn’t go on that way. The may add UDP capabilities but to create Zinc Projectors you need to buy it, while Adobe realeases their flash compiler for free (and some open-sorce versions) and you can develepod AS3 projects with opensource projects as FlashDevelop if looking for a windows IDE, or whatever opensource editor you want and then compile it with the command line Adobe compiler.

Profile
 
 
Posted: 05 March 2009 08:32 AM   [ Ignore ]   [ # 68 ]
Avatar
Rank
Joined  2009-02-21
Total Posts:  9
New Member

Ok, that makes good sense.

I didn’t know how Zinc was working with Flash.  If it’s just wrapping things like you are already doing, then that doesn’t add much (and would add a lot of unnecessary overhead).

 Signature 

Trackmate : http://trackmate.sourceforge.net
LusidOSC : http://lusidosc.sourceforge.net

Profile
 
 
Posted: 05 March 2009 09:34 AM   [ Ignore ]   [ # 69 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  314
Sr. Member
nacho - 05 March 2009 07:50 AM

ok let’s do a bit of flash history

thanks for the flash history class nacho!
so to summarize flash 5-8 can use “flosc OSC to flash XML” as usual
and starting from flash 9, we can do at least TUIO over TCP.
so I think there should be no big worries about “legacy support” here, when we drop the “flosc OSC to flash XML” approach.
nacho, would it be easy to adapt your AS3 library to TUIO over TCP, or is it what it is doing already anyway?
(sorry if you said that before, but I am still trying to get things together wink
thx, Martin.K

 Signature 

TUIO community site: http://www.tuio.org
reacTIVision framework: http://reactivision.sf.net
TUIO & reacTIVision CVS: http://sf.net/projects/reactivision
reacTIVision forum: http://sf.net/apps/phpbb/reactivision

Profile
 
 
Posted: 05 March 2009 02:18 PM   [ Ignore ]   [ # 70 ]
Avatar
RankRankRankRankRankRank
Joined  2007-04-08
Total Posts:  2293
Moderator

To answer you earlier question Martin, all the AS3 code we’re using is on the touchlib SVN: http://code.google.com/p/touchlib/ All the TUIO parsing stuff is here: http://code.google.com/p/touchlib/source/browse/#svn/trunk/AS3/int/flash/events

 Signature 

Follow me on:
My Website - Youtube - Twitter - Linkedin

Profile
 
 
Posted: 05 March 2009 03:16 PM   [ Ignore ]   [ # 71 ]
Rank
Joined  2007-08-31
Total Posts:  53
New Member

although I would avoid as much as possible flash from 5 to 8 (just for performance issues and because AS3 is soooooooooooooooooooooooo much better than AS2, and Adobe statistics [if trusted] tells us more than 90% browsers already are upgraded to versions 9 or 10) I agree 100% with having a TCP binary socket.

Martin, as easy as change that class http://code.google.com/p/flosc/source/browse/trunk/OSCConnector/it/h_umus/osc/OSCConnection.as the rest of my library will work as usual. As can be seen just a method with the recieved XML data is then used to create the middle classes OSCPacket/OSCMessage/OSCArgument/etc.. parsing XML, so just need to change the type of socket and parse data.

Profile
 
 
Posted: 06 March 2009 04:03 AM   [ Ignore ]   [ # 72 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  314
Sr. Member

OK, so let’s just do it ... very nice to have this solved.
As I said I will take care that at least oscpack and javaosc will be able to do OSC over TCP,
so then it will be very easy to have that done at least on the server side
(eventually the TUIO clients later could also include a TCP mode just in case someone is really using a super bad channel and prefers completeness over speed,
although I do not see that as an important priority. but for Flash this is definitely the solution for the current AS3 generation)

 Signature 

TUIO community site: http://www.tuio.org
reacTIVision framework: http://reactivision.sf.net
TUIO & reacTIVision CVS: http://sf.net/projects/reactivision
reacTIVision forum: http://sf.net/apps/phpbb/reactivision

Profile
 
 
Posted: 08 March 2009 08:24 PM   [ Ignore ]   [ # 73 ]
Avatar
RankRank
Joined  2007-03-15
Total Posts:  224
Jr. Member

Ok guys, I have just uploaded the first version of TouchGateway and the binary OSC socket here…

http://www.touchgateway.com/?p=70

Check it out when you get a minute smile

Profile
 
 
   
5 of 5
5