From d700d299c68e11764d5f2ce8649014e1a6bed317 Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@vt.edu>
Date: Wed, 19 Nov 2014 01:31:05 -0500
Subject: [PATCH] *updated docs to reflect new features plus cleanup

---
 doc/pddp/key-help.pd       |  52 ++--
 doc/pddp/keyname-help.pd   |  63 +++--
 doc/pddp/keyup-help.pd     |  55 +++--
 doc/pddp/my_canvas-help.pd | 469 +++++++++++++++++++------------------
 4 files changed, 342 insertions(+), 297 deletions(-)

diff --git a/doc/pddp/key-help.pd b/doc/pddp/key-help.pd
index e6b382667..9e71c6d66 100644
--- a/doc/pddp/key-help.pd
+++ b/doc/pddp/key-help.pd
@@ -1,5 +1,5 @@
-#N canvas 434 31 555 619 10;
-#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
+#N canvas 424 37 555 619 10;
+#X obj 0 635 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
 14 -228856 -66577 0;
 #X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header key 3 12 0 18 -204280
 -1 0;
@@ -17,14 +17,13 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
 #X text 12 65 OUTLET_0 float;
 #X text 12 5 KEYWORDS control user_input;
 #X text 12 145 RELEASE_DATE 1997;
-#X restore 500 597 pd META;
+#X restore 500 637 pd META;
 #X obj 0 285 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
 13 -228856 -1 0;
 #X obj 0 445 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
 0 13 -228856 -1 0;
-#X obj 0 473 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
+#X obj 0 513 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
 0 13 -228856 -1 0;
-#X text 98 449 (none);
 #N canvas 222 479 428 145 Related_objects 0;
 #X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
 14 -204280 -1 0;
@@ -34,7 +33,7 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
 #X text 7 1 [key] Related Objects;
 #X obj 18 94 pddp/helplink Gem/gemkeyboard;
 #X obj 18 114 pddp/helplink Gem/gemkeyname;
-#X restore 102 598 pd Related_objects;
+#X restore 102 638 pd Related_objects;
 #X text 98 293 float;
 #X obj 78 294 cnv 17 3 140 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
 -162280 0;
@@ -51,15 +50,14 @@ successfully. (This may produce different results on different systems.)
 numeric "ID" of a key on the computer's keyboard. This event occurs
 when the key is pressed down. Only one event is captured at a time.
 ;
-#X obj 103 137 key;
-#X obj 83 174 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 46 113 key;
+#X obj 26 150 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
 -1;
-#X floatatom 103 174 5 0 0 0 - - -, f 5;
-#X text 132 137 Type something on the keyboard to send input to Pd
-;
-#X text 100 95 [key] reports the (system dependent) numbers of "printing"
+#X floatatom 46 150 5 0 0 0 - - -, f 5;
+#X text 75 113 Type something on the keyboard to send input to Pd;
+#X text 23 64 [key] reports the (system dependent) numbers of "printing"
 keys of the keyboard.;
-#X text 99 477 Caveat - this only works if Pd actually gets the key
+#X text 99 517 Caveat - this only works if Pd actually gets the key
 events which can depend on the stacking order of windows and/or the
 pointer location. This is dependent on the system.;
 #N canvas 105 161 428 356 reacting_to_user_input 0;
@@ -84,7 +82,7 @@ a full range of tools to gleen a user's activities at the computer.
 #X text 20 169 It's interesting to note that with these tools \, PD
 can mimic some of the functions in other languages - Javascript for
 example has:;
-#X restore 102 524 pd reacting_to_user_input;
+#X restore 102 564 pd reacting_to_user_input;
 #N canvas 105 31 345 511 some_keyboard_fun 0;
 #X obj 52 75 loadbang;
 #X msg 23 16 bang;
@@ -119,12 +117,26 @@ example has:;
 #X connect 13 0 8 0;
 #X connect 15 0 2 0;
 #X connect 16 0 11 0;
-#X restore 102 548 pd some_keyboard_fun;
-#X obj 245 571 pddp/pddplink all_about_hid.pd -text all_about_hid;
-#X text 100 572 for more on HIDs:;
+#X restore 102 588 pd some_keyboard_fun;
+#X obj 245 611 pddp/pddplink all_about_hid.pd -text all_about_hid;
+#X text 100 612 for more on HIDs:;
 #X text 11 23 get input from the keyboard;
 #X text 168 261 - [key] gets input directly from the keyboard.;
-#X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide
+#X obj 4 637 pddp/pddplink all_about_help_patches.pd -text Usage Guide
+;
+#X obj 153 190 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X floatatom 173 190 5 0 0 0 - - -, f 5;
+#X obj 173 153 key 1;
+#X text 210 153 Legacy version which also includesautorepeat can be
+invoked by passingan optional argument 1 at creation.Notice how
+this version reports multiplepresses when holding a key down.;
+#X text 98 449 1) float;
+#X text 168 449 - optional argument to enable legacy autorepeat detection.
+0 or no argument will disable autorepeat reporting \, 1 will enable
+legacy behavior and repeat press-and-hold as multiple pressess in succession.
 ;
-#X connect 16 0 17 0;
-#X connect 16 0 18 0;
+#X connect 15 0 16 0;
+#X connect 15 0 17 0;
+#X connect 30 0 28 0;
+#X connect 30 0 29 0;
diff --git a/doc/pddp/keyname-help.pd b/doc/pddp/keyname-help.pd
index 713b33fc4..8571f1e38 100644
--- a/doc/pddp/keyname-help.pd
+++ b/doc/pddp/keyname-help.pd
@@ -1,5 +1,5 @@
-#N canvas 430 35 555 619 10;
-#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
+#N canvas 426 33 555 619 10;
+#X obj 0 635 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
 14 -228856 -66577 0;
 #X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header keyname 3 12 0 18
 -204280 -1 0;
@@ -19,14 +19,13 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
 #X text 12 65 OUTLET_0 float;
 #X text 12 85 OUTLET_1 symbol;
 #X text 12 5 KEYWORDS control symbol_op user_input;
-#X restore 500 597 pd META;
+#X restore 500 637 pd META;
 #X obj 0 365 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 5 12 0
 13 -228856 -1 0;
 #X obj 0 437 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 5 12
 0 13 -228856 -1 0;
-#X obj 0 464 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 5 12
+#X obj 0 504 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 5 12
 0 13 -228856 -1 0;
-#X text 98 441 (none);
 #N canvas 220 483 428 145 Related_objects 0;
 #X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
 14 -204280 -1 0;
@@ -36,12 +35,12 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
 #X obj 53 43 keyup;
 #X obj 19 101 gemkeyboard;
 #X obj 99 101 gemkeyname;
-#X restore 102 597 pd Related_objects;
+#X restore 102 637 pd Related_objects;
 #X text 98 373 float;
 #X obj 78 374 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
 -162280 0;
 #X text 98 342 (none);
-#X obj 103 221 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 43 193 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
 -1;
 #N canvas 104 188 428 356 reacting_to_user_input 0;
 #X text 20 38 Most \, if not all \, programming environments provide
@@ -65,16 +64,16 @@ a full range of tools to gleen a user's activities at the computer.
 can mimic some of the functions in other languages - Javascript for
 example has:;
 #X text 8 2 [keyup] Reacing to User Input;
-#X restore 102 523 pd reacting_to_user_input;
+#X restore 102 563 pd reacting_to_user_input;
 #X obj 493 10 keyname;
-#X obj 103 167 keyname;
-#X symbolatom 142 195 10 0 0 0 - - -, f 10;
-#X floatatom 103 195 5 0 0 0 - - -, f 5;
-#X obj 142 221 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 43 139 keyname;
+#X symbolatom 82 167 10 0 0 0 - - -, f 10;
+#X floatatom 43 167 5 0 0 0 - - -, f 5;
+#X obj 82 193 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
 -1;
-#X text 155 167 When you type on the keyboard \, [keyname] sends data
+#X text 95 139 When you type on the keyboard \, [keyname] sends data
 to Pd;
-#X text 100 115 [keyname] reports the (system dependent) names of "printing"
+#X text 40 81 [keyname] reports the (system dependent) names of "printing"
 keys of the keyboard. It captures both the "keydown" and "keyup" events.
 ;
 #X text 168 373 - the left inlet produces a 1 when a key goes down
@@ -84,11 +83,11 @@ keys of the keyboard. It captures both the "keydown" and "keyup" events.
 #X text 98 403 symbol;
 #X text 168 403 - the right outlet produces a symbol which represents
 the name of the key.;
-#X text 99 467 Caveat - this object only works if Pd actually gets
+#X text 99 507 Caveat - this object only works if Pd actually gets
 the key events which can depend on the stacking order of windows and/or
 the pointer location. This is dependent on the system.;
-#X obj 275 572 pddp/pddplink all_about_hid.pd -text all_about_hid;
-#X text 100 573 for more on HIDs:;
+#X obj 275 612 pddp/pddplink all_about_hid.pd -text all_about_hid;
+#X text 100 613 for more on HIDs:;
 #N canvas 108 160 327 410 some_keyboard_fun 0;
 #X obj 52 75 loadbang;
 #X msg 23 16 bang;
@@ -123,13 +122,33 @@ the pointer location. This is dependent on the system.;
 #X connect 13 0 8 0;
 #X connect 15 0 2 0;
 #X connect 16 0 11 0;
-#X restore 102 549 pd some_keyboard_fun;
+#X restore 102 589 pd some_keyboard_fun;
 #X text 11 23 get input and key name from the keyboard;
 #X text 168 342 - [keyname] gets input directly from the keyboard.
 ;
-#X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide
+#X obj 4 637 pddp/pddplink all_about_help_patches.pd -text Usage Guide
 ;
+#X obj 43 275 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X symbolatom 94 249 10 0 0 0 - - -, f 10;
+#X floatatom 43 249 5 0 0 0 - - -, f 5;
+#X obj 94 275 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 43 221 keyname 1;
+#X text 98 442 1) float;
+#X text 168 442 - optional argument to enable legacy autorepeat detection.
+0 or no argument will disable autorepeat reporting \, 1 will enable
+legacy behavior and repeat press-and-hold as multiple pressess in succession.
+;
+#X text 164 221 Legacy version which also includesautorepeat can be
+invoked by passingan optional argument 1 at creation.Notice how
+this version reports multiple presses and releases when holding a
+key down.;
+#X connect 14 0 16 0;
+#X connect 14 1 15 0;
 #X connect 15 0 17 0;
-#X connect 15 1 16 0;
-#X connect 16 0 18 0;
-#X connect 17 0 12 0;
+#X connect 16 0 11 0;
+#X connect 32 0 34 0;
+#X connect 33 0 31 0;
+#X connect 35 0 33 0;
+#X connect 35 1 32 0;
diff --git a/doc/pddp/keyup-help.pd b/doc/pddp/keyup-help.pd
index 815e6e902..fc74ddac8 100644
--- a/doc/pddp/keyup-help.pd
+++ b/doc/pddp/keyup-help.pd
@@ -1,5 +1,5 @@
 #N canvas 431 34 555 619 10;
-#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
+#X obj 0 635 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
 14 -228856 -66577 0;
 #X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header keyup 3 12 0 18
 -204280 -1 0;
@@ -18,14 +18,13 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
 ;
 #X text 12 65 INLET_0 float;
 #X text 12 5 KEYWORDS control user_input;
-#X restore 500 597 pd META;
+#X restore 500 637 pd META;
 #X obj 0 245 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
 13 -228856 -1 0;
 #X obj 0 395 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
 0 13 -228856 -1 0;
-#X obj 0 422 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
+#X obj 0 462 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
 0 13 -228856 -1 0;
-#X text 98 399 (none);
 #N canvas 216 478 428 145 Related_objects 0;
 #X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
 14 -204280 -1 0;
@@ -35,7 +34,7 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
 #X text 7 1 [keyup] Related Objects;
 #X obj 18 93 pddp/helplink Gem/gemkeyboard;
 #X obj 18 113 pddp/helplink Gem/gemkeyname;
-#X restore 102 597 pd Related_objects;
+#X restore 102 637 pd Related_objects;
 #X text 98 253 float;
 #X obj 78 254 cnv 17 3 130 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
 -162280 0;
@@ -47,9 +46,9 @@ produce a zero \, but we can see by the [bng] that the event is not
 ignored completely...but the numeric "ID" of the key is not captured
 successfully. (This may produce different results on different systems.)
 ;
-#X obj 83 162 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 16 149 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
 -1;
-#X floatatom 103 162 5 0 0 0 - - -, f 5;
+#X floatatom 36 149 5 0 0 0 - - -, f 5;
 #N canvas 107 160 428 356 reacting_to_user_input 0;
 #X text 19 37 Most \, if not all \, programming environments provide
 us with tools to capture 'user initiated' events from the operating
@@ -72,24 +71,24 @@ a full range of tools to gleen a user's activities at the computer.
 can mimic some of the functions in other languages - Javascript for
 example has:;
 #X text 7 1 [keyup] Reacing to User Input;
-#X restore 102 525 pd reacting_to_user_input;
+#X restore 102 565 pd reacting_to_user_input;
 #X obj 504 11 keyup;
-#X text 100 83 [keyup] reports the (system dependent) numbers of "printing"
-keys of the keyboard.;
-#X obj 103 125 keyup;
-#X text 142 125 When you release a key \, [keyup] sends data to Pd
-;
+#X text 33 69 [keyup] reports the (system dependent) numbers of "printing"
+keys of the keyboard., f 44;
+#X obj 36 112 keyup;
+#X text 75 112 When you release a key \, [keyup] sends data to Pd,
+f 24;
 #X text 168 253 - the number at this outlets represents the numeric
 "ID" of a key on the computer's keyboard. This even occurs when the
 key is released. Only one event is captured at a time.;
-#X text 98 426 The [key] and [keyup] objects can mimic the functionality
+#X text 98 466 The [key] and [keyup] objects can mimic the functionality
 of the [noteon] and [noteoff] objects. A key combination such as SHIFT+7
 could be considered a 'chord'!;
-#X text 99 466 Caveat - this object only works if Pd actually gets
+#X text 99 506 Caveat - this object only works if Pd actually gets
 the key events which can depend on the stacking order of windows and/or
 the pointer location. This is dependent on the system.;
-#X obj 276 572 pddp/pddplink all_about_hid.pd -text all_about_hid;
-#X text 101 573 for more on HIDs:;
+#X obj 276 612 pddp/pddplink all_about_hid.pd -text all_about_hid;
+#X text 101 613 for more on HIDs:;
 #N canvas 107 163 330 381 some_keyboard_fun 0;
 #X obj 52 75 loadbang;
 #X msg 23 16 bang;
@@ -124,10 +123,24 @@ the pointer location. This is dependent on the system.;
 #X connect 13 0 8 0;
 #X connect 15 0 2 0;
 #X connect 16 0 11 0;
-#X restore 102 550 pd some_keyboard_fun;
+#X restore 102 590 pd some_keyboard_fun;
 #X text 11 23 get input from the keyboard on key release;
 #X text 168 222 - [keyup] gets input directly from the keyboard.;
-#X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide
+#X obj 4 637 pddp/pddplink all_about_help_patches.pd -text Usage Guide
+;
+#X obj 226 149 bng 15 50 20 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X floatatom 246 149 5 0 0 0 - - -, f 5;
+#X obj 246 112 keyup 1;
+#X text 98 399 1) float;
+#X text 168 399 - optional argument to enable legacy autorepeat detection.
+0 or no argument will disable autorepeat reporting \, 1 will enable
+legacy behavior and repeat press-and-hold as multiple pressess in succession.
 ;
-#X connect 19 0 14 0;
-#X connect 19 0 15 0;
+#X text 294 112 Legacy version which also includesautorepeat can be
+invoked by passingan optional argument 1 at creation.Notice how
+this version reports multiplereleases when holding a key down.;
+#X connect 18 0 13 0;
+#X connect 18 0 14 0;
+#X connect 31 0 29 0;
+#X connect 31 0 30 0;
diff --git a/doc/pddp/my_canvas-help.pd b/doc/pddp/my_canvas-help.pd
index 2b57771c1..0d3bb8686 100644
--- a/doc/pddp/my_canvas-help.pd
+++ b/doc/pddp/my_canvas-help.pd
@@ -1,4 +1,228 @@
 #N canvas 432 34 555 662 10;
+#N canvas 93 78 450 511 let's-play-pong! 0;
+#X obj 148 128 cnv 15 100 25 empty \$0-score Score:0 5 12 0 14 -233017
+-66577 0;
+#X obj 14 29 cnv 5 5 60 \$0-ps \$0-pr empty 20 12 0 14 -1 -66577 0
+;
+#X msg 257 112 delta 0 \$1;
+#X msg 257 87 -5;
+#X obj 68 48 tgl 16 0 empty empty Go! 19 8 0 10 -4034 -1 -1 0 1;
+#X obj 337 158 r \$0-ps;
+#X obj 337 180 unpack;
+#X obj 370 202 v py;
+#X obj 68 117 t b b b;
+#X msg 107 164 \; \$1-br get_pos \; \$1-pr get_pos \;;
+#X obj 425 6 cnv 5 5 500 empty empty empty 20 12 0 14 -1 -66577 0;
+#X obj 257 158 r \$0-bs;
+#X obj 290 202 v by;
+#X obj 68 447 pack;
+#X msg 145 340 1;
+#X msg 178 340 -1;
+#X obj 68 491 s \$0-br;
+#X obj 87 297 sel 0 1 2 3 4 5;
+#X msg 101 361 1;
+#N canvas 574 158 450 300 drift 0;
+#X obj 55 40 inlet;
+#X obj 136 40 inlet;
+#X obj 205 45 inlet;
+#X obj 55 117 f;
+#X obj 93 142 mod;
+#X obj 55 164 sel 1;
+#X obj 55 231 f 1;
+#X obj 55 266 outlet;
+#X msg 90 231 0;
+#X obj 136 61 b;
+#X obj 136 88 random 8;
+#X obj 136 115 sel 0;
+#X msg 130 137 1e+37;
+#X obj 205 155 t a;
+#X floatatom 13 147 5 0 0 0 - - -, f 5;
+#X obj 93 118 + 1;
+#X connect 0 0 3 0;
+#X connect 1 0 9 0;
+#X connect 2 0 13 0;
+#X connect 3 0 5 0;
+#X connect 3 0 14 0;
+#X connect 3 0 15 0;
+#X connect 4 0 3 1;
+#X connect 5 0 6 0;
+#X connect 5 1 8 0;
+#X connect 6 0 7 0;
+#X connect 8 0 7 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 11 1 4 1;
+#X connect 12 0 4 1;
+#X connect 13 0 6 1;
+#X connect 15 0 4 0;
+#X restore 95 427 pd drift;
+#X obj 68 405 t a b;
+#X obj 68 383 f 1;
+#X msg 134 18 10 SLOW;
+#X msg 134 35 7 MEDIUM;
+#X obj 257 43 spigot;
+#X obj 77 71 s \$0-k;
+#X obj 310 10 r \$0-k;
+#N canvas 0 0 450 300 score 0;
+#X obj 84 59 inlet;
+#X obj 84 113 f;
+#X obj 120 113 + 1;
+#X obj 84 86 b;
+#X msg 84 152 label Score:\$1;
+#X obj 84 179 s \$0-score;
+#X obj 165 51 sel 0;
+#X obj 165 78 0;
+#X obj 210 92 loadbang;
+#X msg 210 114 0;
+#X obj 165 24 r play;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 1 0 4 0;
+#X connect 2 0 1 1;
+#X connect 3 0 1 0;
+#X connect 4 0 5 0;
+#X connect 6 0 7 0;
+#X connect 7 0 1 1;
+#X connect 8 0 9 0;
+#X connect 9 0 4 0;
+#X connect 10 0 6 0;
+#X restore 101 386 pd score;
+#X obj 68 95 metro 10;
+#N canvas 0 0 450 300 once 0;
+#X obj 26 21 inlet;
+#X obj 26 102 outlet;
+#X obj 26 75 t a b;
+#X msg 89 48 0;
+#X obj 26 48 spigot 1;
+#X connect 0 0 4 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 3 0 4 1;
+#X connect 4 0 2 0;
+#X restore 310 32 pd once;
+#X obj 257 65 select 97 122 32;
+#X msg 336 89 1;
+#X obj 87 277 t a;
+#X obj 256 442 cnv 15 100 40 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X text 256 439 a = up \; z = down \; <space> = replay;
+#X text 216 318 0 - die at left wall \; 1 - richochet off left wall
+\; 2 - die at right wall (not yet) \; 3 - richochet off right wall
+\; 4 - richochet off top \; 5 - richochet of bottom \;;
+#X obj 68 18 r play;
+#X obj 336 111 s play;
+#X msg 87 319 0;
+#X obj 257 202 v bx;
+#X obj 337 202 v px;
+#X obj 257 180 unpack;
+#X obj 257 134 s \$0-pr;
+#X msg 294 87 5;
+#X msg 134 52 4 FAST;
+#X obj 107 139 f \$0;
+#X msg 130 361 -1;
+#X msg 68 469 delta \$1 \$2;
+#X obj 87 341 s play;
+#N canvas 528 152 450 386 sfx 0;
+#X obj 21 169 noise~;
+#X obj 22 201 *~;
+#X obj 102 176 vline~;
+#X obj 23 249 +~;
+#X obj 174 146 delread~ \$0-b;
+#X obj 36 278 delwrite~ \$0-b 500;
+#X obj 22 302 *~ 0.1;
+#X obj 23 330 dac~;
+#X obj 135 120 del;
+#X msg 102 120 1;
+#X msg 135 145 0;
+#X obj 174 120 * 10;
+#X obj 175 176 *~ 0.8;
+#X msg 174 81 2;
+#X obj 117 9 inlet;
+#X obj 174 54 change;
+#X obj 117 31 sel -1 0 2;
+#X connect 0 0 1 0;
+#X connect 1 0 3 0;
+#X connect 2 0 1 1;
+#X connect 3 0 5 0;
+#X connect 3 0 6 0;
+#X connect 4 0 12 0;
+#X connect 6 0 7 0;
+#X connect 6 0 7 1;
+#X connect 8 0 10 0;
+#X connect 9 0 2 0;
+#X connect 10 0 2 0;
+#X connect 11 0 4 0;
+#X connect 12 0 3 1;
+#X connect 13 0 9 0;
+#X connect 13 0 8 0;
+#X connect 13 0 11 0;
+#X connect 14 0 16 0;
+#X connect 15 0 13 0;
+#X connect 16 3 15 0;
+#X restore 211 294 pd sfx;
+#X obj 257 19 key 1;
+#X msg 134 69 1.5 ???;
+#X obj 87 225 expr if(bx<=20 \, py-10<=by && py+60>=by \, -1) \; if
+(bx>=415 \, 3 \, -1) \; if (by<=0 \, 4 \, if (by>=500 \, 5 \, -1))
+;
+#X obj 71 51 cnv 10 10 10 \$0-bs \$0-br empty 20 12 0 14 -1 -66577
+0;
+#X connect 2 0 42 0;
+#X connect 3 0 2 0;
+#X connect 4 0 25 0;
+#X connect 4 0 28 0;
+#X connect 5 0 6 0;
+#X connect 6 0 40 0;
+#X connect 6 1 7 0;
+#X connect 8 0 21 0;
+#X connect 8 1 52 0;
+#X connect 8 2 45 0;
+#X connect 11 0 41 0;
+#X connect 13 0 47 0;
+#X connect 14 0 19 2;
+#X connect 15 0 19 2;
+#X connect 17 0 38 0;
+#X connect 17 1 18 0;
+#X connect 17 2 38 0;
+#X connect 17 3 46 0;
+#X connect 17 4 14 0;
+#X connect 17 5 15 0;
+#X connect 18 0 19 1;
+#X connect 18 0 21 1;
+#X connect 18 0 27 0;
+#X connect 19 0 13 1;
+#X connect 20 0 13 0;
+#X connect 20 1 19 0;
+#X connect 21 0 20 0;
+#X connect 22 0 28 1;
+#X connect 23 0 28 1;
+#X connect 24 0 30 0;
+#X connect 26 0 29 0;
+#X connect 28 0 8 0;
+#X connect 29 0 24 1;
+#X connect 30 0 3 0;
+#X connect 30 1 43 0;
+#X connect 30 2 31 0;
+#X connect 31 0 37 0;
+#X connect 32 0 17 0;
+#X connect 32 0 49 0;
+#X connect 36 0 4 0;
+#X connect 38 0 48 0;
+#X connect 41 0 39 0;
+#X connect 41 1 12 0;
+#X connect 43 0 2 0;
+#X connect 44 0 28 1;
+#X connect 45 0 9 0;
+#X connect 46 0 19 1;
+#X connect 46 0 21 1;
+#X connect 47 0 16 0;
+#X connect 50 0 24 0;
+#X connect 51 0 28 1;
+#X connect 52 0 32 0;
+#X connect 52 1 32 0;
+#X connect 52 2 32 0;
+#X restore 136 312 pd let's-play-pong!;
 #X obj 0 639 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
 14 -228856 -66577 0;
 #X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header my_canvas 3 12 0
@@ -478,232 +702,9 @@ a [cnv] \, as are the horizontal dividers below.;
 #X text 66 275 You can also use a white [cnv] to;
 #X text 66 290 conceal parts of a patch (use;
 #X text 66 305 with care);
-#N canvas 93 78 450 511 let's-play-pong! 0;
-#X obj 148 128 cnv 15 100 25 empty \$0-score Score:0 5 12 0 14 -233017
--66577 0;
-#X obj 14 -131 cnv 5 5 60 \$0-ps \$0-pr empty 20 12 0 14 -1 -66577
-0;
-#X obj 257 19 key;
-#X msg 257 112 delta 0 \$1;
-#X msg 257 87 -5;
-#X obj 68 48 tgl 16 0 empty empty Go! 19 8 0 10 -4034 -1 -1 0 1;
-#X obj 337 158 r \$0-ps;
-#X obj 337 180 unpack;
-#X obj 370 202 v py;
-#X obj 68 117 t b b b;
-#X msg 107 169 \; \$1-br get_pos \; \$1-pr get_pos \;;
-#X obj 425 6 cnv 5 5 500 empty empty empty 20 12 0 14 -1 -66577 0;
-#X obj 257 158 r \$0-bs;
-#X obj 290 202 v by;
-#X obj 68 447 pack;
-#X msg 145 340 1;
-#X msg 178 340 -1;
-#X obj 68 491 s \$0-br;
-#X obj 87 297 sel 0 1 2 3 4 5;
-#X msg 101 361 1;
-#N canvas 574 158 450 300 drift 0;
-#X obj 55 40 inlet;
-#X obj 136 40 inlet;
-#X obj 205 45 inlet;
-#X obj 55 117 f;
-#X obj 93 142 mod;
-#X obj 55 164 sel 1;
-#X obj 55 231 f 1;
-#X obj 55 266 outlet;
-#X msg 90 231 0;
-#X obj 136 61 b;
-#X obj 136 88 random 8;
-#X obj 136 115 sel 0;
-#X msg 130 137 1e+37;
-#X obj 205 155 t a;
-#X floatatom 13 147 5 0 0 0 - - -, f 5;
-#X obj 93 118 + 1;
-#X connect 0 0 3 0;
-#X connect 1 0 9 0;
-#X connect 2 0 13 0;
-#X connect 3 0 5 0;
-#X connect 3 0 14 0;
-#X connect 3 0 15 0;
-#X connect 4 0 3 1;
-#X connect 5 0 6 0;
-#X connect 5 1 8 0;
-#X connect 6 0 7 0;
-#X connect 8 0 7 0;
-#X connect 9 0 10 0;
-#X connect 10 0 11 0;
-#X connect 11 0 12 0;
-#X connect 11 1 4 1;
-#X connect 12 0 4 1;
-#X connect 13 0 6 1;
-#X connect 15 0 4 0;
-#X restore 95 427 pd drift;
-#X obj 68 405 t a b;
-#X obj 68 383 f 1;
-#X msg 134 18 10 SLOW;
-#X msg 134 35 7 MEDIUM;
-#X obj 257 43 spigot;
-#X obj 77 71 s \$0-k;
-#X obj 310 10 r \$0-k;
-#N canvas 0 0 450 300 score 0;
-#X obj 84 59 inlet;
-#X obj 84 113 f;
-#X obj 120 113 + 1;
-#X obj 84 86 b;
-#X msg 84 152 label Score:\$1;
-#X obj 84 179 s \$0-score;
-#X obj 165 51 sel 0;
-#X obj 165 78 0;
-#X obj 210 92 loadbang;
-#X msg 210 114 0;
-#X obj 165 24 r play;
-#X connect 0 0 3 0;
-#X connect 1 0 2 0;
-#X connect 1 0 4 0;
-#X connect 2 0 1 1;
-#X connect 3 0 1 0;
-#X connect 4 0 5 0;
-#X connect 6 0 7 0;
-#X connect 7 0 1 1;
-#X connect 8 0 9 0;
-#X connect 9 0 4 0;
-#X connect 10 0 6 0;
-#X restore 101 386 pd score;
-#X obj 68 95 metro 10;
-#N canvas 433 184 450 300 once 0;
-#X obj 26 21 inlet;
-#X obj 26 102 outlet;
-#X obj 26 75 t a b;
-#X msg 89 48 0;
-#X obj 26 48 spigot 1;
-#X connect 0 0 4 0;
-#X connect 2 0 1 0;
-#X connect 2 1 3 0;
-#X connect 3 0 4 1;
-#X connect 4 0 2 0;
-#X restore 310 32 pd once;
-#X obj 257 65 select 97 122 32;
-#X msg 336 89 1;
-#X obj 87 277 t a;
-#X obj 256 442 cnv 15 100 40 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 256 439 a = up \; z = down \; <space> = replay;
-#X msg 134 69 1.5 WTF;
-#X text 216 318 0 - die at left wall \; 1 - richochet off left wall
-\; 2 - die at right wall (not yet) \; 3 - richochet off right wall
-\; 4 - richochet off top \; 5 - richochet of bottom \;;
-#X obj 87 225 expr if(bx<=20 \, py<=by && py+60>=by \, -1) \; if (bx>=415
-\, 3 \, -1) \; if (by<=0 \, 4 \, if (by>=500 \, 5 \, -1));
-#X obj 68 18 r play;
-#X obj 336 111 s play;
-#X msg 87 319 0;
-#X obj -82 271 cnv 10 10 10 \$0-bs \$0-br empty 20 12 0 14 -1 -66577
-0;
-#X obj 257 202 v bx;
-#X obj 337 202 v px;
-#X obj 257 180 unpack;
-#X obj 257 134 s \$0-pr;
-#X msg 294 87 5;
-#X msg 134 52 4 FAST;
-#X obj 107 139 f \$0;
-#X msg 130 361 -1;
-#X msg 68 469 delta \$1 \$2;
-#X obj 87 341 s play;
-#N canvas 528 152 450 386 sfx 0;
-#X obj 21 169 noise~;
-#X obj 22 201 *~;
-#X obj 102 176 vline~;
-#X obj 23 249 +~;
-#X obj 174 146 delread~ \$0-b;
-#X obj 36 278 delwrite~ \$0-b 500;
-#X obj 22 302 *~ 0.1;
-#X obj 23 330 dac~;
-#X obj 135 120 del;
-#X msg 102 120 1;
-#X msg 135 145 0;
-#X obj 174 120 * 10;
-#X obj 175 176 *~ 0.8;
-#X msg 174 81 2;
-#X obj 117 9 inlet;
-#X obj 174 54 change;
-#X obj 117 31 sel -1 0 2;
-#X connect 0 0 1 0;
-#X connect 1 0 3 0;
-#X connect 2 0 1 1;
-#X connect 3 0 5 0;
-#X connect 3 0 6 0;
-#X connect 4 0 12 0;
-#X connect 6 0 7 0;
-#X connect 6 0 7 1;
-#X connect 8 0 10 0;
-#X connect 9 0 2 0;
-#X connect 10 0 2 0;
-#X connect 11 0 4 0;
-#X connect 12 0 3 1;
-#X connect 13 0 9 0;
-#X connect 13 0 8 0;
-#X connect 13 0 11 0;
-#X connect 14 0 16 0;
-#X connect 15 0 13 0;
-#X connect 16 3 15 0;
-#X restore 211 294 pd sfx;
-#X connect 2 0 25 0;
-#X connect 3 0 46 0;
-#X connect 4 0 3 0;
-#X connect 5 0 26 0;
-#X connect 5 0 29 0;
-#X connect 6 0 7 0;
-#X connect 7 0 44 0;
-#X connect 7 1 8 0;
-#X connect 9 0 22 0;
-#X connect 9 1 38 0;
-#X connect 9 2 49 0;
-#X connect 12 0 45 0;
-#X connect 14 0 51 0;
-#X connect 15 0 20 2;
-#X connect 16 0 20 2;
-#X connect 18 0 41 0;
-#X connect 18 1 19 0;
-#X connect 18 2 41 0;
-#X connect 18 3 50 0;
-#X connect 18 4 15 0;
-#X connect 18 5 16 0;
-#X connect 19 0 20 1;
-#X connect 19 0 22 1;
-#X connect 19 0 28 0;
-#X connect 20 0 14 1;
-#X connect 21 0 14 0;
-#X connect 21 1 20 0;
-#X connect 22 0 21 0;
-#X connect 23 0 29 1;
-#X connect 24 0 29 1;
-#X connect 25 0 31 0;
-#X connect 27 0 30 0;
-#X connect 29 0 9 0;
-#X connect 30 0 25 1;
-#X connect 31 0 4 0;
-#X connect 31 1 47 0;
-#X connect 31 2 32 0;
-#X connect 32 0 40 0;
-#X connect 33 0 18 0;
-#X connect 33 0 53 0;
-#X connect 36 0 29 1;
-#X connect 38 0 33 0;
-#X connect 38 1 33 0;
-#X connect 38 2 33 0;
-#X connect 39 0 5 0;
-#X connect 41 0 52 0;
-#X connect 45 0 43 0;
-#X connect 45 1 13 0;
-#X connect 47 0 3 0;
-#X connect 48 0 29 1;
-#X connect 49 0 10 0;
-#X connect 50 0 20 1;
-#X connect 50 0 22 1;
-#X connect 51 0 17 0;
-#X restore 136 312 pd let's-play-pong!;
 #X text 185 551 musil@iem.kug.ac.at;
 #X text 171 550 c;
-#X obj 60 267 cnv 15 210 70 empty \$0-cnv empty 20 12 0 14 -262144
+#X obj 63 267 cnv 15 210 70 empty \$0-cnv empty 20 12 0 14 -262144
 -262144 0;
 #X obj 69 329 cnv 15 17 17 empty empty empty 20 12 0 14 -262144 -66577
 0;
@@ -722,7 +723,7 @@ how you canuse cnv to hide things;
 0 14 -204280 -1 0;
 #X text 88 2 Using [cnv] to hide objects that capture mouse clicks
 ;
-#X obj 100 47 cnv 15 43 43 empty empty CLICK 5 22 0 10 -247832 -66577
+#X obj 100 47 cnv 15 43 43 empty empty CLICK 6 22 0 10 -247832 -66577
 0;
 #X obj 100 109 tgl 21 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
 1;
@@ -736,12 +737,12 @@ insteadpasses them to objects below it.;
 #X connect 0 0 4 0;
 #X restore 169 608 pd using_canvas_to_hide_objects_that_capture_mouse_clicks
 ;
-#X connect 20 0 38 0;
-#X connect 21 0 20 0;
-#X connect 22 0 29 0;
-#X connect 27 0 30 0;
-#X connect 29 0 16 0;
-#X connect 29 1 17 0;
-#X connect 30 0 23 0;
-#X connect 30 1 24 0;
-#X connect 38 0 39 0;
+#X connect 21 0 39 0;
+#X connect 22 0 21 0;
+#X connect 23 0 30 0;
+#X connect 28 0 31 0;
+#X connect 30 0 17 0;
+#X connect 30 1 18 0;
+#X connect 31 0 24 0;
+#X connect 31 1 25 0;
+#X connect 39 0 40 0;
-- 
GitLab