1 of 7
1
New Tuio as3 library (TCP & LocalConnection)
Posted: 18 October 2009 01:40 PM   [ Ignore ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  43
New Member

Hi, my name is Immanuel Bauer and I am currently studying Mediainformatics at the Technical University in Vienna, Austria.
As a part of these studies I am working on my bachelor thesis which is about how Tuio tracking data could and can be transmitted into Flash in a faster and more convenient way than the common TCP/XML method.

So with the help of Georg Kaindl, Martin Kaltenbrunner, Dean North and Johannes Luderschmidt I wrote a Tuio library for as3 completely from scratch.

The main features currently are:
- ByteArray based
- support of TCP and LocalConnection transfer
- full OSC parser that could be used separately
- legacy support -> class for TouchEvent dispatching
- therefore it is easy to port old projects to the new library
- callbacks much like in the Java TuioClient api
- extendability
- modular design

We are also presently working on a new event model to replace the TouchEvent for good.

more info on the library and two articles on how to use it on my blog:
http://bubblebird.at/tuioflash/

current release of the library (including a demo) can be found here:
http://code.google.com/p/tuio-as3/downloads/

This is an initial release to generate feedback for further development so please use it for testing purposes only.

Georg Kaindl has written a simple UDP-to-LocalConnection bridge which you can find here -> http://gkaindl.com/software/udp-flashlc-bridge
Also the current svn version of Martin Kaltenbrunner’s SimpleSimulator and Georg Kaindl’s Touché tracker should support LocalConnection.

Have fun taking the library for a spin and tell me what you think.

Edit: Georg Kaindl has also uploaded a video on his bridge and what the LocalConnection fuss is about wink

Profile
 
 
Posted: 18 October 2009 03:23 PM   [ Ignore ]   [ # 1 ]
Avatar
RankRankRankRankRankRank
Joined  2007-04-08
Total Posts:  2539
Dedicated

Interesting. smile

There’s a few things you might want to consider:

1) AIR 2.0 will be supporting UDP.
2) CS5 will have native touch events/gestures (that are extremely similar to the current AS3 API that most of us use) - In order to keep the standard, it might be best to create a bridge between TUIO and the native events as I’m not sure what the benefit would be to not using them.

As a quick review and critique:

I think it looks like you did some nice work, but the way it’s structured is really extra complex to design/program for. The add, remove, update architecture makes it really hard to program for in comparison to the event based modal we’re currently using. I also think some of the word schemas are a bit non-intuitive (ie. LCConnector). I’m curious why a callback structure was implemented instead of event modal considering that’s what AS3/flash/flex devs are used to.

I’m not sure what you mean you’re working on ‘replacing the touchevent for good’. What’s wrong with TouchEvents? The native API in CS5 will be using this very thing.

Keep up the good work!

 Signature 

MTmini, MTbiggie, & Audiotouch creator & Community Core Vision Co-founder

Follow on:
My Blog | Facebook | Twitter | Youtube

Profile
 
 
Posted: 18 October 2009 05:07 PM   [ Ignore ]   [ # 2 ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  43
New Member

Hi, glad you like the lib so far wink

now concerning your remarks:

Stuff like UDP should be pretty easy to implement in the future because all connection handlers implement a simple Interface.
Doing a flash 10.1 touch events bridge should be easy to implement because that is somehow what the legacy part of the library does right now.

You have a point saying it is complex but this approach makes it on the other hand easier to extend or build upon because there are more points where you can plug your stuff in without modifying the whole codebase. The main reason why I used the callbacks is, that they are a fast and intuitive interface for upper layers like an actual event dispatcher that will follow in the near future.
In what way do you think that “LCConnector” is inintuitive? would LocalConnectionConnector be better?

By replacing for good I mean that the event could be streamlined and slimmed down. Also it is only designed to support Tuio cursors but Tuio is more than just about multitouch. So we would actually need a MouseEvent like event (which is what the TouchEvent basically is) and additionally GestureEvents, ObjectEvents, ... And that stuff by design is handled by a layer above the actual TuioClient that implements the callback functions defined in the ITuioListener interface.

Profile
 
 
Posted: 18 October 2009 05:50 PM   [ Ignore ]   [ # 3 ]
RankRankRankRank
Joined  2009-08-21
Total Posts:  561
Elite

Hey gimmix
I should appreciate your work as it is very hard to build from scratch .And you have featured some nice things .
but as for my concern ,is this problem solved in the library ?
It is a bug in the TUIOObject.as i think in the original library.(I Think)
It has been quite late here and i will try the code tomorrow.

Thanks

 Signature 

~~Amit~~

Website - Twitter - Facebook

Profile
 
 
Posted: 18 October 2009 06:05 PM   [ Ignore ]   [ # 4 ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  43
New Member

Well it wasn’t explictly corrected but it may have been an error in the original parsing code. I did a quick test with some code I had lying around and it looks like it isn’t happening.
But please do some testruns and let me know what you discover.

Profile
 
 
Posted: 18 October 2009 06:11 PM   [ Ignore ]   [ # 5 ]
RankRankRankRank
Joined  2009-08-21
Total Posts:  561
Elite

Sure
Thanks

 Signature 

~~Amit~~

Website - Twitter - Facebook

Profile
 
 
Posted: 19 October 2009 03:43 AM   [ Ignore ]   [ # 6 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  330
Sr. Member

Hey Immanuel,
thanks for posting this first release of your library, I think this is a giant leap forward for the TUIO support in Flash!

I’d like to add that I consider this library the “official” TUIO reference implementation for Flash/AS3 since it finally provides real OSC support for Flash using either the very fast shared memory “Local Connection” approach (TUIO/LC) or the alternative binary TCP connection (TUIO/TCP). Due to the modular architecture of the library, additional transport methods, such as TUIO/UDP can be easily added once they become available within Flash.

So therefore we should make an effort to abandon the really outdated Flash/XML workaround and its bloated encapsulation of the OSC messages within XML(as initially provided via Flosc) as soon as possible.
Therefore the next versions of reacTIVision and Touché will both support TUIO/LC and TUIO/TCP in addition to the default TUIO/UDP mode. You can check out the current CVS version of the TUIO C++ reference implementation, which already provides both modes within the TUIO server component, and the included SimpleSimulator can already be used to test the new library. Since TUIO/UDP will still remain the default transport method, Georg Kaindl also provided a cross-platform TUIO/UDP to TUIO/LC gateway application, which can translate TUIO/UDP messages to be used with the new Flash library. Although this gateway again introduces an intermediate component, the overall performance of the whole method is still about 10x faster than the existing direct TUIO/XML approach.

To support the transition the new library also provides a legacy API in addition to the basic TUIO callback API, which should facilitate the porting of existing Flash multi-touch applications. Once the official Flash multi-touch API becomes available, I think it will be pretty easy to hook this into the current library architecture. On the other hand I’d like to mention that TUIO is actually a bit more than multi-touch, since it also encodes tangible interface components.

have fun,
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: 19 October 2009 07:01 AM   [ Ignore ]   [ # 7 ]
Rank
Joined  2008-08-15
Total Posts:  53
New Member

Immanuel, a big thank you for your work from me too!

Seth, regarding AIR 2.0 and CS5, I believe that you will have to export your AIR applications in a special, non-platform-independent way in order to access features such as UDP, which is a lot less nice than simply distributing a single SWF file. Nevertheless, Immanuel designed the flash library in a modular way, so that it will be trivial to introduce UDP as another transport method when AIR 2.0 becomes available.

Regarding CS5’s touch events, I think they require Windows 7, since Adobe hooks into their touch API to generate the events. I’m not sure whether there will be a way to generate these events from TUIO (since Flashplayer will most certainly not support TUIO directly), but it should be possible to use Immanuel’s library to simulate Adobe touch events from TUIO. In any case, CS5’s touch events most likely won’t obsolete this method.

Also, as Immanuel and Martin have already pointed out, a big motivation behind the new library is the recognition that TUIO is much more than just multi-touch.

Profile
 
 
Posted: 19 October 2009 01:24 PM   [ Ignore ]   [ # 8 ]
Avatar
RankRankRankRankRankRank
Joined  2007-04-08
Total Posts:  2539
Dedicated

Thanks for the explanation guys. I agree that extensibility is important and that TUIO isn’t defined as multitouch. My comments are only meant to be constructive critiques. I think it’s important that we keep the conversation open and don’t close off thoughts from the 100+ thousand people already using this.

Adobe AIR runs on all platforms and occasionally will require a separate compile. I mentioned this so that the developer(s) are aware of the changes that are coming so that they’re open to the new possibilities. There’s many reasons one would develop in AIR rather than use a swf; there’s a much larger API and access control for AIR developers . As far as the TouchEvents, one will not need windows 7 for this as the touchevents will also work for iphone development (which is new in CS5). So it will be pretty important that there is a native touchevent dispatcher at some point since those that are developing for touch will undoubtedly want to use this for it’s multi-hwardware development (iphone, growing hardware support, tuio).

Looks like great work thus far. I think the biggest thing missing from a developer standpoint is the event system; but from what I understand, you’re working on that. smile

 Signature 

MTmini, MTbiggie, & Audiotouch creator & Community Core Vision Co-founder

Follow on:
My Blog | Facebook | Twitter | Youtube

Profile
 
 
Posted: 22 October 2009 05:21 PM   [ Ignore ]   [ # 9 ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  43
New Member

Hi I just wanted to let you guys know, that I started a discussion on the topic how a new eventmodel for Tuio should look like in as3 in the tuio.org forum. I want to invite everybody who thinks that he has a good idea on what is needed in a remodelled TouchEvent or who already had to hack into the old libraries in order to achieve certain goals to join the discussion.
Your opinion is very important to me, because the main idea behind this new library is to make your lives easier and to offer ways to implement stuff faster and better performing.

You can find the discussion here -> https://sourceforge.net/apps/phpbb/reactivision/viewtopic.php?f=4&t=107

or you can simply write down your ideas here if you’d like.

Profile
 
 
Posted: 06 January 2010 09:07 PM   [ Ignore ]   [ # 10 ]
Avatar
RankRankRank
Joined  2008-10-28
Total Posts:  274
Sr. Member

One question, what do I need to do to get udp-flashlc-bridge-win running in windows?
there is no file extension. I’m running Windows XP pro, I cannot find any details.
I have no idea what program to try using or a command comparable to

./udp-flashlc-bridge -c _MyConnection -m dispatchPacket

in the windows command line.

 Signature 

Flash files and tutorial[s] available at:

cyancdesign Tutorial Blog Posts
and
http://wiki.nuigroup.com/Documents_and_tutorials

Profile
 
 
Posted: 15 January 2010 03:22 PM   [ Ignore ]   [ # 11 ]
Rank
Joined  2008-10-23
Total Posts:  62
New Member

add a .exe extension to the file and it should run fine.

 Signature 

Flex & Multitouch Blog: http://bugbee.com

Profile
 
 
Posted: 12 February 2010 02:26 PM   [ Ignore ]   [ # 12 ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  43
New Member

Hi guys just wanted to tell you that v0.6 is out at last :]

http://bubblebird.at/tuioflash/2010/02/new-release-v0-6/

Now with event goodness.

Have fun checking it out and tell me what you think.

Profile
 
 
Posted: 23 February 2010 12:48 PM   [ Ignore ]   [ # 13 ]
Avatar
Rank
Joined  2010-02-09
Total Posts:  10
New Member

Hey folks,

For those of you who haven’t been following the discussion going on over at the ”Has anyone used OSC yet direct to Flash 10.1 and Air 2.0?” thread, I’ve added UDP support to the tuio-as3 v0.6 library (via the DatagramSocket class within AIR 2.0) which makes communication between CCV and AIR a bit cleaner and faster. You can download my updated version of this release from here: http://www.techstylelab.com/TUIO_UDP_Connection.zip

Enjoy!

 Signature 

Andy McDonald
PhD Student / Research Assistant
Centre for Advanced Textiles
Glasgow School of Art

Profile
 
 
Posted: 23 February 2010 01:25 PM   [ Ignore ]   [ # 14 ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  43
New Member

Hi thanks for posting this here again.
I already merged your udp connector with the udp implementation by johannes luderschmidt and it is now part of the latest svn revision.

Profile
 
 
Posted: 24 February 2010 05:52 PM   [ Ignore ]   [ # 15 ]
Avatar
RankRank
Joined  2008-11-23
Total Posts:  114
Member

#1) nice to see a/some austrian mate(s) in the big world of nui

#2) I´ve testet air2 and flash 10.1 (beta) deeply and the new multi-touch functionallity is very bad. The routed mt events from the OS layer are clumsy and the limitation to use only gestures OR real mt is far away from todays mt standard. I´m glad to have other as3 libraries to implement mt into flash apps.

#3) therefore, keep up your great work

Profile
 
 
   
1 of 7
1