1 of 2
1
TUIO analizer for Delphi
Posted: 14 October 2009 04:10 PM   [ Ignore ]
Rank
Joined  2008-10-27
Total Posts:  21
New Member

Hey guys,

I have programmed a TUIO analizer for the language Delphi. Hope there is someone who need this. ^^

I also uploade a little example.
So have fun und programm many MT programms!  wink

cucu
MASTER

EDIT:
V1.2 now uploaded.
-parse TOIO/2D profiles

EDIT:
V2.0
-parse TOIO1.1/2D profiles
-there is non stringbased encoding now
-now it is a component, after installation it`s added to touch

There are two different units, I have tested the D7 unit with Delphi 7 and the other with D2010. For all other D-versions: Just try it. If you get an error try the D7 unit.

I have uploaded the easy demo again, but the draw methode of it is very slow. So if you want to test how fast the detection is, try the PREalpha of my multitouch game. wink In the game you can select the bases with your finger, hold it down, select the bases, pull it over a enemy base and release your finger.

File Attachments
MultiTDemoEasy.rar  (File Size: 328KB - Downloads: 1179)
MultiT2_0.rar  (File Size: 5KB - Downloads: 1037)
TouchWars.rar  (File Size: 283KB - Downloads: 999)
Profile
 
 
Posted: 14 October 2009 04:23 PM   [ Ignore ]   [ # 1 ]
Avatar
Rank
Joined  2009-09-15
Total Posts:  91
New Member

Very cool.  Not that I can test it, but you *know* this is going to answers the prayers of someone, somewhere, someday…

Profile
 
 
Posted: 14 October 2009 04:26 PM   [ Ignore ]   [ # 2 ]
Rank
Joined  2008-10-27
Total Posts:  21
New Member

Yes I know. ^^

Profile
 
 
Posted: 14 October 2009 05:39 PM   [ Ignore ]   [ # 3 ]
Avatar
RankRankRankRankRankRank
Joined  2007-04-08
Total Posts:  2539
Dedicated

Can you explain what you mean by tuio ‘analyzer’ ?

 Signature 

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

Follow on:
My Blog | Facebook | Twitter | Youtube

Profile
 
 
Posted: 15 October 2009 06:20 AM   [ Ignore ]   [ # 4 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  330
Sr. Member

Hey, thanks for providing your Delphi code for TUIO!
From what I see you are partially implementing the 2Dcur profile only.
Actually the velocity and acceleration values aren’t always 0, so it would be great to parse these arguments as well.
And the additional width and height parameters are only sent by tbeta/ccv and are not part of the TUIO specs,
so you should at least make sure your code doesn’t explicitly expect these values to be sent.

Finally I am not sure about the string-based decoding of the OSC data you are receiving,
but since I don’t know how this actually works internally in Delphi, it might be

In any case I would like add your Pascal TUIO client to the directory at TUIO.org.
Should I link to this thread or will you set up some google code page or similar for that?
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: 15 October 2009 08:46 AM   [ Ignore ]   [ # 5 ]
Rank
Joined  2008-10-27
Total Posts:  21
New Member

Hi,

I have add the 2Dobj and 2Dblb profile, but I have not test it.
Now all values will be parsed. Also the with and height from TBeta/ccv.
I also add a new example with a faster draw methode.

Yes, you can add a link to this thread on the TUIO site. But add it under experimantal or somthing wink , because the string-based decoding.

cucu
MASTER

PS: Sorry for my bad englisch XD

Profile
 
 
Posted: 16 November 2009 10:50 AM   [ Ignore ]   [ # 6 ]
Rank
Joined  2009-11-16
Total Posts:  8
New Member

It is do not work with new TUIO in CCV-1.3. :-( Can anybody refresh Delphi-examples. Sorry for my bad English. wink Please, help me.

Profile
 
 
Posted: 16 November 2009 11:26 AM   [ Ignore ]   [ # 7 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  330
Sr. Member

there is no “new” TUIO in the CCV 1.3, the build is just broken

 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: 16 November 2009 11:33 AM   [ Ignore ]   [ # 8 ]
Rank
Joined  2009-11-16
Total Posts:  8
New Member

Sorry… It will be corrected? This work only with reacTIVision.

Profile
 
 
Posted: 17 November 2009 04:21 PM   [ Ignore ]   [ # 9 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  330
Sr. Member

I submitted a fix for that to the CCV developers, so hopefully they will provide a working build soon.

 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: 02 December 2009 02:20 PM   [ Ignore ]   [ # 10 ]
Rank
Joined  2008-10-27
Total Posts:  21
New Member

Hi,

I have uploaded the new version of my delphi unit. There is non stringbased decoding anymore. Take a look and tell me your opinions. wink I am also very interestet in your opinions of the game. I know there is many to do, to get a version 1.0 of the game…

Profile
 
 
Posted: 02 December 2009 03:32 PM   [ Ignore ]   [ # 11 ]
Rank
Joined  2009-11-16
Total Posts:  8
New Member

gamer1.gif

Profile
 
 
Posted: 03 December 2009 12:29 AM   [ Ignore ]   [ # 12 ]
Rank
Joined  2009-11-16
Total Posts:  8
New Member

I can not run this example. If i am click “yes”, then application run, but not react. Sorry, my English is very bad. fie.gif Please, see screenshot.

Image Attachments
1.jpg
Profile
 
 
Posted: 03 December 2009 01:16 PM   [ Ignore ]   [ # 13 ]
Rank
Joined  2008-10-27
Total Posts:  21
New Member

Hi,

I think you have an other Indi version. Try this to fix the problem:

1. Delete the event form the code

unit Unit1;     { _,-*´`*-._,° }

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UdpSockUtil, ExtCtrls, StdCtrls, IdBaseComponent,
  IdComponent, IdUDPBase, IdUDPServer, IdSocketHandle, multiT2;

type
  TForm1 = class(TForm)
    IdUDPServer1: TIdUDPServer;
    MultiT1: TMultiT;
    procedure MultiT1BlobDown(ID: Integer);
    procedure MultiT1BlobMove(ID: Integer);
    procedure MultiT1BlobUp(ID: Integer);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{
$R *.dfm}

procedure TForm1.MultiT1BlobDown(ID: Integer);
  var i: integer;
  begin
    //Down
    for i := 0 to length(MultiT1.data)-1 do
      begin
        if MultiT1.data[i].ID = ID then
          begin
            Form1.Canvas.Pixels[round(MultiT1.data[i].X * Screen.Width - (Form1.Left + 4)), round(MultiT1.data[i].Y * Screen.Height - (Form1.Top + 30))]
 := clRed;    //+4, +30 is for the window frame
          end;
      end;
  end;

procedure TForm1.MultiT1BlobMove(ID: Integer);
  var i: integer;
  begin
    //Move
    for i := 0 to length(MultiT1.data)-1 do
      begin
        if MultiT1.data[i].ID = ID then
          begin
            Form1.Canvas.Pixels[round(MultiT1.data[i].X * Screen.Width - (Form1.Left + 4)), round(MultiT1.data[i].Y * Screen.Height - (Form1.Top + 30))]
 := clBlack;  //+4, +30 is for the window frame
          end;
      end;
  end;

procedure TForm1.MultiT1BlobUp(ID: Integer);
  var i: integer;
  begin
    //Up
    for i := 0 to length(MultiT1.data)-1 do
      begin
        if MultiT1.data[i].ID = ID then
          begin
            Form1.Canvas.Pixels[round(MultiT1.data[i].X * Screen.Width - (Form1.Left + 4)), round(MultiT1.data[i].Y * Screen.Height - (Form1.Top + 30))]
 := cllime;   //+4, +30 is for the window frame
          end;
      end;
  end;

end.

2. Klick on the udpserver component on the form
3. Klick on events at the object inspector
4. Doubleklick on the OnUDPRead event
5. Copy the code between the new createt “begin” and “end”

MultiT1.analizepackage(@AData);

6. Try to compile it
7. If it not work, copy the new createt code and post it here, than I can give you a working code.

Profile
 
 
Posted: 04 December 2009 12:50 AM   [ Ignore ]   [ # 14 ]
Rank
Joined  2009-11-16
Total Posts:  8
New Member

Program it was started, but does not react on CCV. hang1.gif

Image Attachments
2.jpg
Profile
 
 
Posted: 04 December 2009 10:53 AM   [ Ignore ]   [ # 15 ]
Rank
Joined  2008-10-27
Total Posts:  21
New Member

Hi,

I think the Build 1.3 was broken, is it not? Or is it fixed?
Try to download the easy demo and start project1.exe. Do not compile it with delphi, just start it. If it work, there is somthing wrong with your code, if not, the build of ccv is broken.
I have tryed the demo with ccv 1.1 and it works.
In next time I will download the newest version of ccv and look what is wrong with this version, but first I finish my MTTable.

If you want to try it with the 1.1 ccv I will uploade it for you.

EDIT:
You can also try to downloade the TUIO simulator and try to recive data from it.
http://reactivision.sourceforge.net/

Profile
 
 
   
1 of 2
1