From 2389091c6bf73e52fd19551f366034a15fdf7d95 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 13 Apr 2006 23:48:34 +0000 Subject: integrated lots of ideas and content from ggkarman's Tutoriales pd svn path=/trunk/; revision=4906 --- doc/tutorials/intro/Attic/grabbing_keystrokes.pd | 61 +++++++++++++++++ .../intro/Attic/sorting_messages_by_type.pd | 80 +++++++++++----------- 2 files changed, 102 insertions(+), 39 deletions(-) create mode 100644 doc/tutorials/intro/Attic/grabbing_keystrokes.pd (limited to 'doc/tutorials/intro/Attic') diff --git a/doc/tutorials/intro/Attic/grabbing_keystrokes.pd b/doc/tutorials/intro/Attic/grabbing_keystrokes.pd new file mode 100644 index 00000000..bf369dc5 --- /dev/null +++ b/doc/tutorials/intro/Attic/grabbing_keystrokes.pd @@ -0,0 +1,61 @@ +#N canvas 493 88 628 453 12; +#X obj 10 10 cnv 15 400 40 empty empty grabbing_keystrokes 20 12 0 +24 -228992 -66577 0; +#X obj 115 152 key; +#X floatatom 115 176 5 0 0 0 - - -; +#X text 284 216 This times how long between each; +#X text 284 232 press of the 'a' key.; +#X floatatom 215 176 5 0 0 0 - - -; +#X obj 215 152 keyup; +#X floatatom 315 176 5 0 0 0 - - -; +#X obj 315 152 keyname; +#X symbolatom 379 176 10 0 0 0 - - -; +#X text 20 231 't' key as toggle:; +#X obj 68 303 select 116; +#X obj 68 272 keyup; +#N canvas 238 530 478 328 /SUBPATCH/ 0; +#X obj 101 10 inlet; +#X obj 100 100 tgl 32 0 empty \$0-tgl empty 0 -6 0 8 -166441 -166441 +-262144 0 1; +#X obj 156 68 select 1; +#X msg 172 186 color \$1 \$2 \$3; +#X msg 268 146 1 1 0; +#X msg 133 144 -65281 0 -1; +#X obj 268 85 bang; +#X obj 176 241 send \$0-tgl; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 2 1 6 0; +#X connect 3 0 7 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 6 0 4 0; +#X coords 0 -1 1 1 32 32 1 100 100; +#X restore 68 327 pd; +#X text 13 63 Pd provides a set of objects for getting events from +the keyboard. [key] outputs on key down \, [keyup] outputs on key up +\, and [keyname] outputs both key up and key down \, and gives a symbolic +name for the current key.; +#X text 21 391 These objects will only grab keys when this window has +focus. If you click on the Pd window \, this window won't get key events +anymore.; +#X obj 376 259 key; +#X floatatom 376 283 5 0 0 0 - - -; +#X obj 475 261 keyup; +#X obj 376 312 select 97; +#X obj 475 312 select 97; +#X obj 411 341 timer; +#X floatatom 411 367 5 0 0 0 - - -; +#X connect 1 0 2 0; +#X connect 6 0 5 0; +#X connect 8 0 7 0; +#X connect 8 1 9 0; +#X connect 11 0 13 0; +#X connect 12 0 11 0; +#X connect 16 0 17 0; +#X connect 17 0 19 0; +#X connect 18 0 20 0; +#X connect 19 0 21 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; diff --git a/doc/tutorials/intro/Attic/sorting_messages_by_type.pd b/doc/tutorials/intro/Attic/sorting_messages_by_type.pd index 12e84c05..65f633be 100644 --- a/doc/tutorials/intro/Attic/sorting_messages_by_type.pd +++ b/doc/tutorials/intro/Attic/sorting_messages_by_type.pd @@ -1,47 +1,49 @@ -#N canvas 565 106 627 443 12; -#X obj -60 8 cnv 15 400 40 empty empty sorting_messages_by_type 20 +#N canvas 44 68 635 451 12; +#X obj 10 10 cnv 15 400 40 empty empty sorting_messages_by_type 20 12 0 24 -228992 -66577 0; -#X text -50 63 When processing messages \, some operations should only -be applied to messages of a certain type. [route] allows you to sort -messages by type:; -#X floatatom 168 339 5 0 0 0 - - -; -#X symbolatom 237 338 10 0 0 0 - - -; -#X obj 100 359 bng 15 250 50 0 empty empty bang -6 23 1 12 -262144 +#X floatatom 282 359 5 0 0 0 - - -; +#X symbolatom 351 358 10 0 0 0 - - -; +#X obj 214 379 bng 15 250 50 0 empty empty bang -6 23 1 12 -262144 -1 -1; -#X obj 100 315 route bang float symbol list; -#X obj 168 359 bng 15 250 50 0 empty empty float -4 23 1 12 -262144 +#X obj 214 335 route bang float symbol list; +#X obj 282 379 bng 15 250 50 0 empty empty float -4 23 1 12 -262144 -1 -1; -#X obj 237 359 bng 15 250 50 0 empty empty symbol -12 23 1 12 -262144 +#X obj 351 379 bng 15 250 50 0 empty empty symbol -12 23 1 12 -262144 -1 -1; -#X obj 306 359 bng 15 250 50 0 empty empty list -2 23 1 12 -262144 +#X obj 420 379 bng 15 250 50 0 empty empty list -2 23 1 12 -262144 -1 -1; -#X obj 375 359 bng 15 250 50 0 empty empty selector_series -18 23 1 +#X obj 489 379 bng 15 250 50 0 empty empty selector_series -18 23 1 12 -262144 -1 -1; -#X msg -43 173 bang; -#X msg 34 196 642.3; -#X msg 109 170 symbol moshimoshi; -#X msg 129 194 symbol sayonara; -#X obj -9 198 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X msg 40 172 bang; +#X msg 128 183 642.3; +#X msg 214 159 symbol moshimoshi; +#X msg 214 183 symbol sayonara; +#X obj 40 197 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X msg 331 171 1 2 3; -#X msg 344 194 5 for free!; -#X msg 345 228 list here we go...; -#X msg 345 261 not a list? nope...; -#X msg 11 172 float 5; +#X msg 411 171 1 2 3; +#X msg 411 194 5 for free!; +#X msg 411 218 list here we go...; +#X msg 423 251 not a list? nope...; +#X msg 105 159 float 5; +#X text 10 63 When processing messages \, some operations should only +be applied to messages of a certain type. [route] allows you to sort +messages by type:; +#X msg 423 276 selector data data; +#X connect 1 0 5 0; #X connect 2 0 6 0; -#X connect 3 0 7 0; -#X connect 5 0 4 0; -#X connect 5 1 2 0; -#X connect 5 2 3 0; -#X connect 5 3 8 0; -#X connect 5 4 9 0; -#X connect 10 0 5 0; -#X connect 11 0 5 0; -#X connect 12 0 5 0; -#X connect 13 0 5 0; -#X connect 14 0 5 0; -#X connect 15 0 5 0; -#X connect 16 0 5 0; -#X connect 17 0 5 0; -#X connect 18 0 5 0; -#X connect 19 0 5 0; +#X connect 4 0 3 0; +#X connect 4 1 1 0; +#X connect 4 2 2 0; +#X connect 4 3 7 0; +#X connect 4 4 8 0; +#X connect 9 0 4 0; +#X connect 10 0 4 0; +#X connect 11 0 4 0; +#X connect 12 0 4 0; +#X connect 13 0 4 0; +#X connect 14 0 4 0; +#X connect 15 0 4 0; +#X connect 16 0 4 0; +#X connect 17 0 4 0; +#X connect 18 0 4 0; +#X connect 20 0 4 0; -- cgit v1.2.1