aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Iannini <lukeiannini@users.sourceforge.net>2008-09-20 08:13:34 +0000
committerLuke Iannini <lukeiannini@users.sourceforge.net>2008-09-20 08:13:34 +0000
commit13f18a2f9201aa48da177326206a10afd12f4842 (patch)
tree6287d8ef8070eddef3c63721913893db38a947af
parent735ed9822b4aa58fefac8a179d49cb09f93f8831 (diff)
list-value is [value] for lists, and list-value-extend is a handy shortcut for shared stacks
svn path=/trunk/abstractions/senderfruit/; revision=10302
-rw-r--r--core/list-value-extend-help.pd46
-rw-r--r--core/list-value-extend.pd21
-rw-r--r--core/list-value-help.pd25
-rw-r--r--core/list-value.pd27
4 files changed, 119 insertions, 0 deletions
diff --git a/core/list-value-extend-help.pd b/core/list-value-extend-help.pd
new file mode 100644
index 0000000..a81ed16
--- /dev/null
+++ b/core/list-value-extend-help.pd
@@ -0,0 +1,46 @@
+#N canvas 0 22 622 415 10;
+#X declare -lib list-abs;
+#X declare -lib list-abs;
+#X declare -lib list-abs;
+#X obj 451 20 import list-abs;
+#X obj 47 208 prepent set;
+#X msg 47 124 a b c;
+#X msg 91 124 d e f;
+#X msg 136 124 bang;
+#X msg 47 231;
+#X obj 283 208 prepent set;
+#X obj 283 127 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 139 345 prepent set;
+#X obj 139 294 metro 100;
+#X obj 139 252 loadbang;
+#X obj 139 274 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X text 275 313 uses [list-value] internally \; exploit that if you
+like;
+#X text 460 370 2008 Luke Iannini;
+#X msg 283 231;
+#X msg 139 370;
+#X obj 139 316 list-value \$0.my-list;
+#X obj 47 172 list-value-extend \$0.my-list;
+#X obj 283 172 list-value-extend \$0.my-list;
+#X text 15 24 [list-value-extend] - append new input to the current
+value \, then replace the current value with the result. Outputs current
+value when [bang(ed \, just like vanilla [list-value]. Use [clear(
+to clear all [list-value-extend]s and [list-value]s of the same name.
+;
+#X msg 173 124 clear;
+#X connect 1 0 5 0;
+#X connect 2 0 17 0;
+#X connect 3 0 17 0;
+#X connect 4 0 17 0;
+#X connect 6 0 14 0;
+#X connect 7 0 18 0;
+#X connect 8 0 15 0;
+#X connect 9 0 16 0;
+#X connect 10 0 11 0;
+#X connect 11 0 9 0;
+#X connect 16 0 8 0;
+#X connect 17 0 1 0;
+#X connect 18 0 6 0;
+#X connect 20 0 17 0;
diff --git a/core/list-value-extend.pd b/core/list-value-extend.pd
new file mode 100644
index 0000000..4c3eeb0
--- /dev/null
+++ b/core/list-value-extend.pd
@@ -0,0 +1,21 @@
+#N canvas 355 364 450 300 10;
+#X declare -lib list-abs;
+#X obj 153 85 t a b;
+#X obj 281 42 import list-abs;
+#X obj 153 165 list-extend;
+#X obj 60 36 inlet;
+#X obj 60 195 list-value \$1;
+#X obj 60 218 outlet;
+#X obj 180 135 list-value \$1;
+#X obj 60 59 route bang clear;
+#X msg 106 104 clear;
+#X connect 0 0 2 0;
+#X connect 0 1 6 0;
+#X connect 2 0 6 0;
+#X connect 3 0 7 0;
+#X connect 4 0 5 0;
+#X connect 6 0 2 1;
+#X connect 7 0 4 0;
+#X connect 7 1 8 0;
+#X connect 7 2 0 0;
+#X connect 8 0 4 0;
diff --git a/core/list-value-help.pd b/core/list-value-help.pd
new file mode 100644
index 0000000..f412497
--- /dev/null
+++ b/core/list-value-help.pd
@@ -0,0 +1,25 @@
+#N canvas 439 39 591 371 10;
+#X declare -lib list-abs;
+#X msg 111 152 a b c;
+#X obj 263 156 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 263 199 list-value cheese;
+#X obj 111 200 list-value cheese;
+#X obj 439 23 import list-abs;
+#X obj 263 272 prepent set;
+#X msg 159 152 e f g;
+#X text 17 22 [list-value] - [v]/[value] for lists \, or anything else.
+;
+#X text 16 48 Works just like [v] - including updating newly instantiated
+[list-value]s with the right data.;
+#X text 397 332 2008 Luke Iannini;
+#X msg 263 305;
+#X text 18 83 Accepts a [clear( message to clear all [list-value] objects
+of the same name;
+#X msg 205 152 clear;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 5 0 10 0;
+#X connect 6 0 3 0;
+#X connect 12 0 3 0;
diff --git a/core/list-value.pd b/core/list-value.pd
new file mode 100644
index 0000000..b5f14bc
--- /dev/null
+++ b/core/list-value.pd
@@ -0,0 +1,27 @@
+#N canvas 536 378 450 300 10;
+#X obj 55 171 list;
+#X obj 76 125 s \$1;
+#X obj 76 145 r \$1;
+#X obj 55 197 outlet;
+#X obj 55 51 inlet;
+#X obj 244 73 loadbang;
+#X obj 244 163 list;
+#X obj 265 138 r \$1;
+#X obj 301 210 s \$1;
+#X obj 244 186 route bang;
+#X obj 244 95 s \$1.INIT-NEW;
+#X obj 244 116 r \$1.INIT-NEW;
+#X obj 55 73 route bang clear;
+#X obj 76 102 t b;
+#X connect 0 0 3 0;
+#X connect 2 0 0 1;
+#X connect 4 0 12 0;
+#X connect 5 0 10 0;
+#X connect 6 0 9 0;
+#X connect 7 0 6 1;
+#X connect 9 1 8 0;
+#X connect 11 0 6 0;
+#X connect 12 0 0 0;
+#X connect 12 1 13 0;
+#X connect 12 2 1 0;
+#X connect 13 0 1 0;