aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/color.rgb2pd24.pd4
-rw-r--r--core/ds-begin-help.pd41
-rw-r--r--core/ds-begin.pd13
-rw-r--r--core/ds-dump-help.pd58
-rw-r--r--core/ds-dump-only-help.pd84
-rw-r--r--core/ds-dump-only.pd24
-rw-r--r--core/ds-dump.pd7
-rw-r--r--core/ds-end-help.pd41
-rw-r--r--core/ds-end.pd24
-rw-r--r--core/ds-select-help.pd39
10 files changed, 331 insertions, 4 deletions
diff --git a/core/color.rgb2pd24.pd b/core/color.rgb2pd24.pd
index 2115f38..d3b25c6 100644
--- a/core/color.rgb2pd24.pd
+++ b/core/color.rgb2pd24.pd
@@ -22,6 +22,6 @@
#X connect 7 0 9 0;
#X connect 8 0 4 0;
#X connect 9 0 0 0;
-#X connect 9 0 10 0;
+#X connect 9 1 10 0;
#X connect 10 0 11 0;
-#X connect 11 0 9 0;
+#X connect 11 0 9 1;
diff --git a/core/ds-begin-help.pd b/core/ds-begin-help.pd
new file mode 100644
index 0000000..b17158d
--- /dev/null
+++ b/core/ds-begin-help.pd
@@ -0,0 +1,41 @@
+#N struct 1631datatemplate float x float y;
+#N canvas 544 342 450 300 10;
+#X obj 127 140 ds-begin pd-\$0mydata;
+#N canvas 0 22 450 300 \$0datatemplate 0;
+#X obj 99 58 drawpolygon 90 3 0 0 0 10 10 10 10 0 0 0;
+#X obj 112 95 loadbang;
+#X obj 112 124 t b b b;
+#X msg 188 127 clear;
+#X obj 188 149 s pd-\$0mydata;
+#X msg 112 182 0 0 \, 20 0 \, 40 0;
+#X obj 131 213 ds-begin pd-\$0mydata;
+#X obj 90 247 append \$0datatemplate x y;
+#X obj 94 96 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 99 32 struct \$0datatemplate float x float y;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 2 1 6 0;
+#X connect 2 2 3 0;
+#X connect 3 0 4 0;
+#X connect 5 0 7 0;
+#X connect 6 0 7 2;
+#X connect 8 0 2 0;
+#X restore 293 88 pd \$0datatemplate;
+#N canvas 3 345 126 108 \$0mydata 1;
+#X scalar 1631datatemplate 0 0 \;;
+#X scalar 1631datatemplate 20 0 \;;
+#X scalar 1631datatemplate 40 0 \;;
+#X restore 293 110 pd \$0mydata;
+#X obj 50 177 append \$0datatemplate x y;
+#X obj 50 99 t b b;
+#X obj 50 68 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X msg 50 140 20 20;
+#X text 8 5 Convenience abstraction for the common task of outputting
+the head of a data structure subpatch.;
+#X connect 0 0 3 2;
+#X connect 4 0 6 0;
+#X connect 4 1 0 0;
+#X connect 5 0 4 0;
+#X connect 6 0 3 0;
diff --git a/core/ds-begin.pd b/core/ds-begin.pd
new file mode 100644
index 0000000..d2322ff
--- /dev/null
+++ b/core/ds-begin.pd
@@ -0,0 +1,13 @@
+#N canvas 339 80 224 198 10;
+#X obj 48 65 list append traverse \$1;
+#X obj 48 88 list trim;
+#X obj 21 13 inlet;
+#X obj 21 36 t b b;
+#X obj 21 156 outlet;
+#X obj 21 120 pointer;
+#X connect 0 0 1 0;
+#X connect 1 0 5 0;
+#X connect 2 0 3 0;
+#X connect 3 0 5 0;
+#X connect 3 1 0 0;
+#X connect 5 0 4 0;
diff --git a/core/ds-dump-help.pd b/core/ds-dump-help.pd
new file mode 100644
index 0000000..aa8d298
--- /dev/null
+++ b/core/ds-dump-help.pd
@@ -0,0 +1,58 @@
+#N struct datatemplate float x float y;
+#N canvas 471 25 394 302 10;
+#X text 12 13 Outputs all (input bang) or first n (input float n) pointers
+in a subpatch. Takes a subpatch as its argument.;
+#X obj 55 136 ds-dump pd-\$0data;
+#X obj 55 86 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X text 13 48 Right outlet bangs at end of data.;
+#X obj 55 174 get datatemplate x;
+#N canvas 450 363 128 100 \$0data 1;
+#X scalar datatemplate 10 10 \;;
+#X scalar datatemplate 20 20 \;;
+#X scalar datatemplate 30 30 \;;
+#X scalar datatemplate 40 40 \;;
+#X restore 271 116 pd \$0data;
+#N canvas 10 355 450 300 datatemplate 0;
+#X msg 190 198 traverse pd-\$1data \, bang;
+#X obj 190 224 pointer;
+#X obj 163 128 loadbang;
+#X obj 79 279 append datatemplate x y;
+#X msg 17 208 10 10 \, 20 20 \, 30 30 \, 40 40;
+#X obj 48 18 struct datatemplate float x float y;
+#X obj 48 41 drawpolygon 0 3 0 0 0 10 10 10 10 0 0 0;
+#X obj 144 129 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 190 175 \$0;
+#X obj 163 153 t b b b;
+#X msg 229 153 clear;
+#X obj 229 176 s pd-\$0data;
+#X connect 0 0 1 0;
+#X connect 1 0 3 2;
+#X connect 2 0 9 0;
+#X connect 4 0 3 0;
+#X connect 7 0 9 0;
+#X connect 8 0 0 0;
+#X connect 9 0 4 0;
+#X connect 9 1 8 0;
+#X connect 9 2 10 0;
+#X connect 10 0 11 0;
+#X restore 272 141 pd datatemplate;
+#X obj 55 110 t a b;
+#X obj 55 200 list-extend;
+#X obj 55 224 prepent set;
+#X msg 80 85 2;
+#X text 269 260 2008 Luke Iannini;
+#X text 272 274 proyekto.net;
+#X obj 169 137 bng 15 250 50 0 empty empty end 17 7 0 10 -262144 -1
+-1;
+#X msg 55 251;
+#X connect 1 0 4 0;
+#X connect 1 1 13 0;
+#X connect 2 0 7 0;
+#X connect 4 0 8 0;
+#X connect 7 0 1 0;
+#X connect 7 1 8 1;
+#X connect 8 0 9 0;
+#X connect 9 0 14 0;
+#X connect 10 0 7 0;
diff --git a/core/ds-dump-only-help.pd b/core/ds-dump-only-help.pd
new file mode 100644
index 0000000..3fe50c1
--- /dev/null
+++ b/core/ds-dump-only-help.pd
@@ -0,0 +1,84 @@
+#N struct datatemplatered float x float y;
+#N struct datatemplateblue float x float y;
+#N canvas 447 356 450 300 10;
+#X obj 55 86 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X text 13 48 Right outlet bangs at end of data.;
+#N canvas 963 339 134 109 \$0data 1;
+#X scalar datatemplatered 30 10 \;;
+#X scalar datatemplatered 40 20 \;;
+#X scalar datatemplatered 50 30 \;;
+#X scalar datatemplatered 60 40 \;;
+#X scalar datatemplateblue 10 10 \;;
+#X scalar datatemplateblue 20 20 \;;
+#X scalar datatemplateblue 30 30 \;;
+#X scalar datatemplateblue 40 40 \;;
+#X restore 321 56 pd \$0data;
+#X obj 55 110 t a b;
+#X obj 55 200 list-extend;
+#X obj 55 224 prepent set;
+#X text 269 260 2008 Luke Iannini;
+#X text 272 274 proyekto.net;
+#X obj 298 142 bng 15 250 50 0 empty empty end 17 7 0 10 -262144 -1
+-1;
+#X msg 55 251;
+#N canvas 10 355 450 300 datatemplateblue 0;
+#X msg 190 198 traverse pd-\$1data \, bang;
+#X obj 190 224 pointer;
+#X obj 163 128 loadbang;
+#X msg 17 208 10 10 \, 20 20 \, 30 30 \, 40 40;
+#X obj 144 129 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 190 175 \$0;
+#X msg 229 153 clear;
+#X obj 229 176 s pd-\$0data;
+#X obj 48 18 struct datatemplateblue float x float y;
+#X obj 79 279 append datatemplateblue x y;
+#X obj 48 41 drawpolygon 9 3 0 0 0 10 10 10 10 0 0 0;
+#X obj 163 153 t b b b b;
+#X obj 89 153 s \$0makeRed;
+#X connect 0 0 1 0;
+#X connect 1 0 9 2;
+#X connect 2 0 11 0;
+#X connect 3 0 9 0;
+#X connect 4 0 11 0;
+#X connect 5 0 0 0;
+#X connect 6 0 7 0;
+#X connect 11 0 12 0;
+#X connect 11 1 3 0;
+#X connect 11 2 5 0;
+#X connect 11 3 6 0;
+#X restore 322 81 pd datatemplateblue;
+#N canvas 10 355 450 300 datatemplatered 0;
+#X msg 190 198 traverse pd-\$1data \, bang;
+#X obj 190 224 pointer;
+#X obj 144 129 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 190 175 \$0;
+#X obj 79 279 append datatemplatered x y;
+#X obj 48 18 struct datatemplatered float x float y;
+#X obj 48 41 drawpolygon 900 3 0 0 0 10 10 10 10 0 0 0;
+#X msg 17 208 30 10 \, 40 20 \, 50 30 \, 60 40;
+#X obj 163 152 t b b;
+#X obj 163 128 r \$0makeRed;
+#X connect 0 0 1 0;
+#X connect 1 0 4 2;
+#X connect 2 0 8 0;
+#X connect 3 0 0 0;
+#X connect 7 0 4 0;
+#X connect 8 0 7 0;
+#X connect 8 1 3 0;
+#X connect 9 0 8 0;
+#X restore 322 101 pd datatemplatered;
+#X text 12 13 Outputs all pointers in a subpatch conforming to a specific
+template \, with the rest coming out the middle outlet.;
+#X obj 55 174 get datatemplatered x;
+#X obj 55 141 ds-dump-only pd-\$0data datatemplatered;
+#X connect 0 0 3 0;
+#X connect 3 0 14 0;
+#X connect 3 1 4 1;
+#X connect 4 0 5 0;
+#X connect 5 0 9 0;
+#X connect 13 0 4 0;
+#X connect 14 0 13 0;
+#X connect 14 2 8 0;
diff --git a/core/ds-dump-only.pd b/core/ds-dump-only.pd
new file mode 100644
index 0000000..b0edbc8
--- /dev/null
+++ b/core/ds-dump-only.pd
@@ -0,0 +1,24 @@
+#N canvas 480 22 450 300 10;
+#X obj 182 135 until;
+#X msg 182 156 next;
+#X obj 56 90 list append \$1;
+#X obj 56 113 prepent traverse;
+#X obj 56 53 loadbang;
+#X obj 182 22 inlet;
+#X obj 182 242 outlet;
+#X obj 336 242 outlet;
+#X obj 317 40 t b b b;
+#X obj 242 242 outlet;
+#X obj 182 179 pointer \$2;
+#X connect 0 0 1 0;
+#X connect 1 0 10 0;
+#X connect 2 0 3 0;
+#X connect 3 0 10 0;
+#X connect 4 0 2 0;
+#X connect 5 0 0 0;
+#X connect 8 0 2 0;
+#X connect 8 1 7 0;
+#X connect 8 2 0 1;
+#X connect 10 0 6 0;
+#X connect 10 1 9 0;
+#X connect 10 2 8 0;
diff --git a/core/ds-dump.pd b/core/ds-dump.pd
index d63eb0c..5e8f87a 100644
--- a/core/ds-dump.pd
+++ b/core/ds-dump.pd
@@ -5,10 +5,11 @@
#X obj 56 90 list append \$1;
#X obj 56 113 prepent traverse;
#X obj 56 53 loadbang;
-#X obj 181 22 inlet;
+#X obj 182 16 inlet;
#X obj 182 242 outlet;
#X obj 336 242 outlet;
#X obj 317 40 t b b b;
+#X obj 182 46 t a b;
#X connect 0 0 2 0;
#X connect 1 0 7 0;
#X connect 1 1 9 0;
@@ -16,7 +17,9 @@
#X connect 3 0 4 0;
#X connect 4 0 1 0;
#X connect 5 0 3 0;
-#X connect 6 0 0 0;
+#X connect 6 0 10 0;
#X connect 9 0 3 0;
#X connect 9 1 8 0;
#X connect 9 2 0 1;
+#X connect 10 0 0 0;
+#X connect 10 1 3 0;
diff --git a/core/ds-end-help.pd b/core/ds-end-help.pd
new file mode 100644
index 0000000..085b8fd
--- /dev/null
+++ b/core/ds-end-help.pd
@@ -0,0 +1,41 @@
+#N struct 1635datatemplate float x float y;
+#N canvas 0 22 450 300 10;
+#N canvas 0 22 450 300 \$0datatemplate 0;
+#X obj 99 58 drawpolygon 90 3 0 0 0 10 10 10 10 0 0 0;
+#X obj 112 95 loadbang;
+#X obj 112 124 t b b b;
+#X msg 188 127 clear;
+#X obj 188 149 s pd-\$0mydata;
+#X msg 112 182 0 0 \, 20 0 \, 40 0;
+#X obj 131 213 ds-begin pd-\$0mydata;
+#X obj 90 247 append \$0datatemplate x y;
+#X obj 94 96 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 99 32 struct \$0datatemplate float x float y;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 2 1 6 0;
+#X connect 2 2 3 0;
+#X connect 3 0 4 0;
+#X connect 5 0 7 0;
+#X connect 6 0 7 2;
+#X connect 8 0 2 0;
+#X restore 293 88 pd \$0datatemplate;
+#N canvas 3 345 126 108 \$0mydata 1;
+#X scalar 1635datatemplate 0 0 \;;
+#X scalar 1635datatemplate 20 0 \;;
+#X scalar 1635datatemplate 40 0 \;;
+#X restore 293 110 pd \$0mydata;
+#X obj 50 177 append \$0datatemplate x y;
+#X obj 50 99 t b b;
+#X obj 50 68 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 127 140 ds-end pd-\$0mydata;
+#X msg 50 140 60 0;
+#X text 8 4 Outputs the last pointer in a data structure so that one
+can append after it.;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 4 0 3 0;
+#X connect 5 0 2 2;
+#X connect 6 0 2 0;
diff --git a/core/ds-end.pd b/core/ds-end.pd
new file mode 100644
index 0000000..ebbe4d1
--- /dev/null
+++ b/core/ds-end.pd
@@ -0,0 +1,24 @@
+#N canvas 61 377 261 305 10;
+#X obj 139 175 pointer;
+#X obj 139 37 inlet;
+#X obj 100 228 pointer;
+#X obj 32 113 list append \$1;
+#X obj 32 137 prepent traverse;
+#X obj 139 60 t b b b;
+#X obj 139 110 until;
+#X msg 139 140 next;
+#X obj 178 198 t b b;
+#X obj 100 255 outlet;
+#X connect 0 0 2 1;
+#X connect 0 1 8 0;
+#X connect 1 0 5 0;
+#X connect 2 0 9 0;
+#X connect 3 0 4 0;
+#X connect 4 0 0 0;
+#X connect 5 0 6 0;
+#X connect 5 1 0 0;
+#X connect 5 2 3 0;
+#X connect 6 0 7 0;
+#X connect 7 0 0 0;
+#X connect 8 0 2 0;
+#X connect 8 1 6 1;
diff --git a/core/ds-select-help.pd b/core/ds-select-help.pd
new file mode 100644
index 0000000..1143418
--- /dev/null
+++ b/core/ds-select-help.pd
@@ -0,0 +1,39 @@
+#N canvas 1 22 450 300 10;
+#N canvas 0 22 450 300 \$0data 0;
+#X restore 313 163 pd \$0data;
+#N canvas 535 125 450 300 createdata 0;
+#X obj 212 101 \$0;
+#X msg 212 125 traverse pd-\$1data \, bang;
+#X obj 212 148 pointer;
+#X obj 23 181 append \$0mytemplate x y velocity;
+#X obj 23 23 loadbang;
+#X obj 23 44 t b b;
+#X msg 23 116 50 60 70;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 3;
+#X connect 4 0 5 0;
+#X connect 5 0 6 0;
+#X connect 5 1 0 0;
+#X connect 6 0 3 0;
+#X restore 312 199 pd createdata;
+#N canvas 479 22 359 135 \$0mytemplate 0;
+#X obj 17 18 struct \$0mytemplate float x float y float velocity;
+#X obj 17 48 drawpolygon 900 1 0 0 0 10 10 10 10 0 0 0;
+#X restore 312 136 pd \$0mytemplate;
+#X obj 19 129 ds-dump pd-\$0data;
+#X obj 19 91 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 19 163 ds-select \$0mytemplate velocity 52;
+#X obj 19 188 get \$0mytemplate x y;
+#X floatatom 19 218 5 0 0 0 - - -;
+#X floatatom 136 218 5 0 0 0 - - -;
+#X text 7 5 [ds-select] outputs pointers to elements whose attribute
+value matches its arguments. Non-matching pointers are sent to the
+right outlet. Call like [ds-select <template> <attribute> *<value>]
+*optional. The value can also be set by the right inlet.;
+#X connect 3 0 5 0;
+#X connect 4 0 3 0;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 6 1 8 0;