aboutsummaryrefslogtreecommitdiff
path: root/doc/pddp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/pddp')
-rw-r--r--doc/pddp/all_about_lists_vs_anythings.pd211
1 files changed, 147 insertions, 64 deletions
diff --git a/doc/pddp/all_about_lists_vs_anythings.pd b/doc/pddp/all_about_lists_vs_anythings.pd
index fe9e2136..6de84b27 100644
--- a/doc/pddp/all_about_lists_vs_anythings.pd
+++ b/doc/pddp/all_about_lists_vs_anythings.pd
@@ -1,21 +1,18 @@
-#N canvas 330 124 865 611 10;
-#X msg 95 288 1 2 3;
-#X obj 125 319 route list;
-#X msg 62 268 list 1 2 3;
+#N canvas 266 99 873 619 10;
+#X msg 95 298 1 2 3;
+#X obj 125 329 route list;
+#X msg 62 278 list 1 2 3;
#X msg 10 63 list;
#X symbolatom 32 129 10 0 0 0 - - -;
#X obj 4 2 cnv 15 850 20 empty empty all_about_lists_vs_anythings 20
10 1 18 -233017 -66577 0;
-#X text 9 218 More than one "float" in a message is considered a "list".
-More than one "symbol" in a message is not implicitly considered a
-"list" \, only if you cast it.;
#X text 7 39 SPECIAL CASES OF "LISTS".;
-#X obj 125 342 bng 15 250 50 0 empty empty list -20 7 1 10 -262144
+#X obj 125 348 bng 15 250 50 0 empty empty list -20 7 1 10 -262144
-1 -1;
-#X obj 189 343 bng 15 250 50 0 empty empty non-list 19 7 1 10 -262144
+#X obj 189 349 bng 15 250 50 0 empty empty non-list 19 7 1 10 -262144
-1 -1;
-#X msg 184 267 list this is a set with a cast;
-#X msg 191 286 this is a set withOUT a cast;
+#X msg 184 277 list this is a set with a cast;
+#X msg 191 296 this is a set withOUT a cast;
#X obj 488 138 bng 15 250 50 0 empty empty bang 0 20 1 9 -262144 -1
-1;
#X obj 535 138 bng 15 250 50 0 empty empty float 0 21 1 9 -262144 -1
@@ -26,36 +23,25 @@ More than one "symbol" in a message is not implicitly considered a
#X msg 493 92 this is a set withOUT a cast;
#X obj 585 138 bng 15 250 50 0 empty empty list 0 21 1 9 -262144 -1
-1;
-#X obj 100 528 route list;
-#X obj 100 551 bng 15 250 50 0 empty empty list -20 7 1 10 -262144
+#X obj 120 527 route list;
+#X obj 120 546 bng 15 250 50 0 empty empty list -20 7 1 10 -262144
-1 -1;
-#X obj 164 552 bng 15 250 50 0 empty empty non-list 19 7 1 10 -262144
+#X obj 184 547 bng 15 250 50 0 empty empty non-list 19 7 1 10 -262144
-1 -1;
-#X msg 20 491 one 2 three 4 five;
-#X msg 20 469 1 two 3 four 5;
+#X msg 189 491 one 2 three 4 five;
+#X msg 40 491 1 two 3 four 5;
#X text 8 198 IMPLICIT LISTS;
-#X msg 179 469 list 1 two 3 four 5;
-#X msg 179 491 list one 2 three 4 five;
+#X msg 40 471 list 1 two 3 four 5;
+#X msg 189 471 list one 2 three 4 five;
#X msg 17 83 list 25;
#X msg 24 103 list foo;
-#X obj 10 171 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 57 170 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 105 169 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 153 170 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 201 169 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 10 148 route bang float symbol list;
#X text 87 104 A "list" of one "symbol" is converted to a "symbol"
;
#X text 72 83 A "list" of one "float" is converted to a "float";
#X text 50 63 An empty "list" is converted to a "bang";
#X obj 520 514 pddp_open all_about_atom_conversion;
#X obj 821 3 pddp;
-#X text 11 392 Sets of mixed atoms are defined based on what the "selector"
+#X text 11 400 Sets of mixed atoms are defined based on what the "selector"
(the first element of a set). If the "selector" is a "float" \, then
the set is a "list". If the "selector" is the word "list" \, then the
set is a "list". If the "selector" is a "symbol" \, then the set is
@@ -63,7 +49,7 @@ NOT a "list":;
#X text 22 575 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at>
;
#X text 239 589 released under the GNU GPL;
-#X text 445 576 $Revision: 1.4 $$Date: 2005-04-28 00:25:04 $;
+#X text 445 576 $Revision: 1.5 $$Date: 2005-07-25 21:33:45 $;
#X text 446 589 $Author: eighthave $;
#X text 673 551 updated for Pd 0.38-2;
#X obj 487 117 route bang float list pointer symbol;
@@ -82,41 +68,138 @@ of an object \, the elements of that "list" will be applied to the
respective inlet. This does not apply to sets that are NOT "lists".
;
#X text 443 192 "LISTS" MAP TO INLETS;
+#X text 450 367 WORKING WITH MIXED SETS;
+#X text 11 381 SETS OF MIXED "ATOMS";
+#X text 9 218 A message having more than one atom starting with a "float"
+is implicitly considered a list. A message having more than one atom
+starting with a "symbol" is not \, unless that "symbol" is the selector
+"list".;
+#X obj 11 169 bng 15 250 50 0 empty empty bang 0 20 1 9 -262144 -1
+-1;
+#X obj 58 169 bng 15 250 50 0 empty empty float 0 21 1 9 -262144 -1
+-1;
+#X obj 207 169 bng 15 250 50 0 empty empty symbol 0 21 1 9 -262144
+-1 -1;
+#X obj 108 169 bng 15 250 50 0 empty empty list 0 21 1 9 -262144 -1
+-1;
+#X obj 10 148 route bang float list pointer symbol;
+#X obj 158 169 bng 15 250 50 0 empty empty pointer 0 21 1 9 -262144
+-1 -1;
+#X obj 257 169 bng 15 250 50 0 empty empty UNDEFINED 0 21 1 9 -262144
+-1 -1;
#X text 450 389 When working with sets that might be either "lists"
-or undefined \, use [prepend]. Most of the "list" handling objects
+or undefined \, use [prepend]. Many of the "list" handling objects
in Pd are not general enough to handle this situation.;
-#X text 450 367 WORKING WITH MIXED SETS;
-#X text 11 373 SETS OF MIXED "ATOMS";
+#N canvas 0 22 848 498 some 0;
+#X obj 176 169 print;
+#X msg 137 100 list one two three;
+#X msg 122 61 1 2 3;
+#X msg 131 80 one 2 three;
+#X obj 97 169 route list;
+#X obj 97 198 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 165 199 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 124 139 prepend test;
+#X text 19 23 [prepend] accepts lists and undefined sets and outputs
+undefined sets.;
+#X text 12 229 [print] only interprets the "list" selector when the
+following body of the message is an implied list \, i.e. a set of atoms
+that starts with a float.;
+#X msg 86 307 list one two three;
+#X msg 67 269 1 2 3;
+#X msg 77 287 one 2 three;
+#X obj 37 401 route list;
+#X obj 37 430 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 105 431 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 64 371 prepend list;
+#X obj 116 401 print PREPEND;
+#X obj 92 351 print STRAIGHT;
+#X msg 100 326 list 1 two 3;
+#X msg 490 222 list one two three;
+#X msg 475 183 1 2 3;
+#X msg 484 202 one 2 three;
+#X obj 450 291 route list;
+#X obj 450 320 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 518 321 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 616 294 route list;
+#X obj 616 323 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 684 324 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 221 141 (I used cyclone's);
+#X obj 477 261 route one;
+#X text 415 127 [route] accepts lists and undefined sets and outputs
+lists \, and like [print] only interprets the 'list' selector for implied
+lists:;
+#X obj 529 291 print ONE;
+#X obj 692 294 print NOT_ONE;
+#X connect 1 0 7 0;
+#X connect 2 0 7 0;
+#X connect 3 0 7 0;
+#X connect 4 0 5 0;
+#X connect 4 1 6 0;
+#X connect 7 0 0 0;
+#X connect 7 0 4 0;
+#X connect 10 0 16 0;
+#X connect 10 0 18 0;
+#X connect 11 0 16 0;
+#X connect 11 0 18 0;
+#X connect 12 0 16 0;
+#X connect 12 0 18 0;
+#X connect 13 0 14 0;
+#X connect 13 1 15 0;
+#X connect 16 0 13 0;
+#X connect 16 0 17 0;
+#X connect 19 0 18 0;
+#X connect 19 0 16 0;
+#X connect 20 0 30 0;
+#X connect 21 0 30 0;
+#X connect 22 0 30 0;
+#X connect 23 0 24 0;
+#X connect 23 1 25 0;
+#X connect 26 0 27 0;
+#X connect 26 1 28 0;
+#X connect 30 0 23 0;
+#X connect 30 0 32 0;
+#X connect 30 1 26 0;
+#X connect 30 1 33 0;
+#X restore 463 466 pd some odd cases of list handling;
#X connect 0 0 1 0;
-#X connect 1 0 8 0;
-#X connect 1 1 9 0;
+#X connect 1 0 7 0;
+#X connect 1 1 8 0;
#X connect 2 0 1 0;
-#X connect 3 0 33 0;
+#X connect 3 0 56 0;
+#X connect 9 0 1 0;
#X connect 10 0 1 0;
-#X connect 11 0 1 0;
-#X connect 15 0 45 0;
-#X connect 16 0 45 0;
-#X connect 18 0 19 0;
-#X connect 18 1 20 0;
-#X connect 21 0 18 0;
-#X connect 22 0 18 0;
-#X connect 24 0 18 0;
-#X connect 25 0 18 0;
-#X connect 26 0 33 0;
-#X connect 27 0 4 0;
-#X connect 27 0 33 0;
-#X connect 33 0 28 0;
-#X connect 33 1 29 0;
-#X connect 33 2 30 0;
-#X connect 33 3 31 0;
-#X connect 33 4 32 0;
-#X connect 45 0 12 0;
-#X connect 45 1 13 0;
-#X connect 45 2 17 0;
-#X connect 45 3 46 0;
-#X connect 45 4 14 0;
-#X connect 45 5 47 0;
-#X connect 48 0 49 0;
-#X connect 49 0 50 0;
-#X connect 51 0 49 0;
-#X connect 53 0 49 0;
+#X connect 14 0 38 0;
+#X connect 15 0 38 0;
+#X connect 17 0 18 0;
+#X connect 17 1 19 0;
+#X connect 20 0 17 0;
+#X connect 21 0 17 0;
+#X connect 23 0 17 0;
+#X connect 24 0 17 0;
+#X connect 25 0 56 0;
+#X connect 26 0 4 0;
+#X connect 26 0 56 0;
+#X connect 38 0 11 0;
+#X connect 38 1 12 0;
+#X connect 38 2 16 0;
+#X connect 38 3 39 0;
+#X connect 38 4 13 0;
+#X connect 38 5 40 0;
+#X connect 41 0 42 0;
+#X connect 42 0 43 0;
+#X connect 44 0 42 0;
+#X connect 46 0 42 0;
+#X connect 56 0 52 0;
+#X connect 56 1 53 0;
+#X connect 56 2 55 0;
+#X connect 56 3 57 0;
+#X connect 56 4 54 0;
+#X connect 56 5 58 0;