From 8faa0fd4a2af762d54e3b9c2da3cd8e721bc20f3 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sat, 4 Sep 2010 00:55:40 +0000 Subject: added Greg Shakar's multitouch example svn path=/trunk/externals/apple/; revision=13971 --- Makefile | 2 +- examples/getfingerxy.pd | 39 ++++++++++++++++ examples/track5fingers.pd | 114 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 examples/getfingerxy.pd create mode 100644 examples/track5fingers.pd diff --git a/Makefile b/Makefile index 75f0539..0b6eabf 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ SOURCES_iphoneos = multitouch.c PDOBJECTS = brightness.pd cpu_temperature.pd fans.pd # example patches and related files, in the 'examples' subfolder -EXAMPLES = +EXAMPLES = getfingerxy.pd track5fingers.pd # manuals and related files, in the 'manual' subfolder MANUAL = diff --git a/examples/getfingerxy.pd b/examples/getfingerxy.pd new file mode 100644 index 0000000..617c529 --- /dev/null +++ b/examples/getfingerxy.pd @@ -0,0 +1,39 @@ +#N canvas 789 244 476 427 10; +#X obj 45 46 inlet; +#X obj 45 116 unpack 0 0 0 0 0 0 0 0 0 0 0 0; +#X obj 125 350 outlet; +#X obj 248 332 outlet; +#X obj 51 84 route \$1; +#X msg 184 65 \$5; +#X floatatom 192 89 5 0 0 0 - - -; +#X floatatom 69 163 5 0 0 0 - - -; +#X floatatom 127 154 5 0 0 0 - - -; +#X floatatom 56 311 5 0 0 0 - - -; +#X floatatom 277 301 5 0 0 0 - - -; +#X obj 254 265 expr ((1-$f1) * 200) - \$3; +#X obj 55 258 expr (($f1*1.43) * 200) + \$2; +#X obj 288 178 delay 100; +#X obj 284 148 bang; +#X obj 389 209 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 422 318 outlet; +#X obj 373 35 inlet; +#X obj 419 244 spigot; +#X connect 0 0 4 0; +#X connect 1 4 7 0; +#X connect 1 4 12 0; +#X connect 1 4 14 0; +#X connect 1 5 8 0; +#X connect 1 5 11 0; +#X connect 4 0 1 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 11 0 3 0; +#X connect 11 0 10 0; +#X connect 12 0 2 0; +#X connect 12 0 9 0; +#X connect 13 0 15 0; +#X connect 14 0 13 0; +#X connect 15 0 18 0; +#X connect 17 0 18 1; +#X connect 18 0 16 0; diff --git a/examples/track5fingers.pd b/examples/track5fingers.pd new file mode 100644 index 0000000..046a53e --- /dev/null +++ b/examples/track5fingers.pd @@ -0,0 +1,114 @@ +#N canvas 407 233 708 547 10; +#X obj 8 -143 cnv 15 325 245 empty empty empty 0 0 0 14 -233017 -66577 +0; +#X obj 137 -364 multitouch; +#X msg 175 -424 bang; +#X msg 208 -399 info; +#X obj 232 -352 pddp/print; +#X text 245 -399 output info on right outlet; +#X obj 102 -418 tgl 15 0 empty empty empty 0 -6 0 10 -204786 -1 -1 +1 1; +#X text 212 -426 output sensor values; +#X floatatom 61 -281 5 0 0 0 - - -; +#X floatatom 14 -281 5 0 0 0 - - -; +#X obj 148 -105 tgl 15 0 empty tgl0 empty 17 7 0 10 -257985 -1 -1 0 +1; +#X obj 199 -103 tgl 15 0 empty tgl1 empty 17 7 0 10 -260097 -1 -1 0 +1; +#X obj 129 -19 tgl 15 0 empty tgl4 empty 17 7 0 10 -4032 -1 -1 0 1 +; +#X obj 102 -399 metro 75; +#X obj 254 -73 tgl 15 0 empty tgl3 empty 17 7 0 10 -4034 -1 -1 0 1 +; +#X obj 17 -253 pack f f; +#X msg 14 -230 pos \$1 \$2; +#X obj 13 -205 send tgl0; +#X floatatom 198 -282 5 0 0 0 - - -; +#X floatatom 151 -282 5 0 0 0 - - -; +#X obj 154 -254 pack f f; +#X msg 151 -231 pos \$1 \$2; +#X floatatom 336 -282 5 0 0 0 - - -; +#X floatatom 289 -282 5 0 0 0 - - -; +#X obj 292 -254 pack f f; +#X msg 289 -231 pos \$1 \$2; +#X floatatom 473 -281 5 0 0 0 - - -; +#X floatatom 426 -281 5 0 0 0 - - -; +#X obj 429 -253 pack f f; +#X msg 426 -230 pos \$1 \$2; +#X floatatom 608 -282 5 0 0 0 - - -; +#X floatatom 561 -282 5 0 0 0 - - -; +#X obj 564 -254 pack f f; +#X msg 561 -231 pos \$1 \$2; +#X obj 150 -206 send tgl1; +#X obj 288 -206 send tgl2; +#X obj 425 -205 send tgl3; +#X obj 560 -206 send tgl4; +#X obj 96 -67 tgl 15 0 empty tgl2 empty 17 7 0 10 -258113 -1 -1 0 1 +; +#X msg 85 -254 pos 0 1000; +#X obj 36 -409 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 549 -312 getfingerxy 4 20 130; +#X msg 216 -254 pos 0 1000; +#X msg 349 -255 pos 0 1000; +#X msg 486 -255 pos 0 1000; +#X msg 625 -254 pos 0 1000; +#X obj 2 -310 getfingerxy 0 20 130; +#X obj 139 -312 getfingerxy 1 20 130; +#X obj 277 -312 getfingerxy 2 20 130; +#X obj 414 -311 getfingerxy 3 20 130; +#X connect 1 0 41 0; +#X connect 1 0 46 0; +#X connect 1 0 47 0; +#X connect 1 0 48 0; +#X connect 1 0 49 0; +#X connect 1 1 4 0; +#X connect 2 0 1 0; +#X connect 3 0 1 0; +#X connect 6 0 13 0; +#X connect 8 0 15 1; +#X connect 9 0 15 0; +#X connect 13 0 1 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 18 0 20 1; +#X connect 19 0 20 0; +#X connect 20 0 21 0; +#X connect 21 0 34 0; +#X connect 22 0 24 1; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 25 0 35 0; +#X connect 26 0 28 1; +#X connect 27 0 28 0; +#X connect 28 0 29 0; +#X connect 29 0 36 0; +#X connect 30 0 32 1; +#X connect 31 0 32 0; +#X connect 32 0 33 0; +#X connect 33 0 37 0; +#X connect 39 0 17 0; +#X connect 40 0 41 1; +#X connect 40 0 46 1; +#X connect 40 0 47 1; +#X connect 40 0 48 1; +#X connect 40 0 49 1; +#X connect 41 0 31 0; +#X connect 41 1 30 0; +#X connect 41 2 45 0; +#X connect 42 0 34 0; +#X connect 43 0 35 0; +#X connect 44 0 36 0; +#X connect 45 0 37 0; +#X connect 46 0 9 0; +#X connect 46 1 8 0; +#X connect 46 2 39 0; +#X connect 47 0 19 0; +#X connect 47 1 18 0; +#X connect 47 2 42 0; +#X connect 48 0 23 0; +#X connect 48 1 22 0; +#X connect 48 2 43 0; +#X connect 49 0 27 0; +#X connect 49 1 26 0; +#X connect 49 2 44 0; -- cgit v1.2.1