aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/petal-test.pd68
-rw-r--r--examples/petal.pd67
2 files changed, 135 insertions, 0 deletions
diff --git a/examples/petal-test.pd b/examples/petal-test.pd
new file mode 100644
index 0000000..710eee3
--- /dev/null
+++ b/examples/petal-test.pd
@@ -0,0 +1,68 @@
+#N canvas 562 93 676 425 10;
+#X declare -path /Users/hans/code/pure-data/trunk/externals/many/examples
+;
+#X obj 579 71 gemwin;
+#X obj 574 22 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 128 337 gemhead;
+#X obj 227 215 line;
+#X msg 227 195 \$1 1000;
+#X msg 221 161 21;
+#X msg 247 161 13;
+#X msg 277 161 8;
+#X text 281 366 make 35 petal objects waiting for commands;
+#X text 415 152 radius of the flower;
+#X text 333 131 radius of the petals;
+#X text 167 141 number of petals;
+#N canvas 0 22 450 300 pak 0;
+#X obj 107 37 inlet;
+#X obj 209 35 inlet;
+#X obj 209 57 t b a;
+#X obj 107 122 pack 0 0 0;
+#X obj 107 158 outlet;
+#X obj 149 35 inlet;
+#X obj 149 57 t b a;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 3 2;
+#X connect 3 0 4 0;
+#X connect 5 0 6 0;
+#X connect 6 0 3 0;
+#X connect 6 1 3 1;
+#X restore 316 241 pd pak;
+#X obj 320 144 vsl 15 60 0 2 0 1 empty empty empty 0 -9 0 10 -261682
+-1 -1 5500 0;
+#X floatatom 321 211 5 0 0 0 - - -;
+#X obj 397 157 vsl 15 60 0 4 0 1 empty empty empty 0 -9 0 10 -203904
+-1 -1 3300 0;
+#X floatatom 398 224 5 0 0 0 - - -;
+#X text 127 25 draw a shape using many instances and a little math
+;
+#X msg 586 41 create \, 1;
+#X msg 192 161 40;
+#X msg 194 296 draw fill;
+#X msg 215 317 draw line;
+#X msg 175 277 draw point;
+#X obj 175 255 loadbang;
+#X obj 128 364 many/bundle 250 petal;
+#X msg 153 161 250;
+#X connect 1 0 0 0;
+#X connect 2 0 24 0;
+#X connect 3 0 12 0;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 6 0 4 0;
+#X connect 7 0 4 0;
+#X connect 12 0 24 1;
+#X connect 13 0 14 0;
+#X connect 14 0 12 1;
+#X connect 15 0 16 0;
+#X connect 16 0 12 2;
+#X connect 18 0 0 0;
+#X connect 19 0 4 0;
+#X connect 20 0 24 1;
+#X connect 21 0 24 1;
+#X connect 22 0 24 1;
+#X connect 23 0 22 0;
+#X connect 25 0 4 0;
diff --git a/examples/petal.pd b/examples/petal.pd
new file mode 100644
index 0000000..eaf0960
--- /dev/null
+++ b/examples/petal.pd
@@ -0,0 +1,67 @@
+#N canvas 602 416 942 484 10;
+#X obj 99 196 separator;
+#X obj 99 429 circle;
+#X obj 522 239 * 360;
+#X obj 99 312 rotateXYZ 0 0 0;
+#X obj 522 190 t b f;
+#X obj 39 35 inlet;
+#X obj 32 455 outlet;
+#X obj 99 340 translateXYZ 1 0 0;
+#X obj 424 310 * 1;
+#X obj 592 262 t b f;
+#X obj 522 218 / 1;
+#X obj 424 247 <= 0;
+#X text 82 458 this object just ignores triggers;
+#X text 483 130 \$1 is this objects index \, we use it to work out
+if we need to render;
+#X text 14 73 draw a petal (really just a circle)..;
+#X text 460 246 if we aren't needed \, scale ourselves to 0 is there
+a better way? email me.;
+#X obj 99 368 scaleXYZ 1;
+#X obj 522 33 inlet;
+#X obj 347 455 outlet;
+#X text 82 34 we connect to the global gemhead;
+#X obj 522 89 unpack float float float;
+#X text 683 87 petal# petalsize petalradius;
+#X obj 427 144 float \$1;
+#X obj 427 120 loadbang;
+#X obj 99 284 colorRGB 0.5 0 1;
+#X obj 168 245 % 8;
+#X obj 168 264 / 7;
+#X obj 522 58 route list;
+#X obj 285 108 route draw;
+#X obj 280 381 list prepend draw;
+#X obj 280 401 list trim;
+#X connect 0 0 24 0;
+#X connect 2 0 3 3;
+#X connect 3 0 7 0;
+#X connect 4 0 10 0;
+#X connect 4 0 11 0;
+#X connect 4 1 10 1;
+#X connect 4 1 11 1;
+#X connect 5 0 0 0;
+#X connect 7 0 16 0;
+#X connect 8 0 16 1;
+#X connect 8 0 16 2;
+#X connect 8 0 16 3;
+#X connect 9 0 8 0;
+#X connect 9 1 8 1;
+#X connect 10 0 2 0;
+#X connect 11 0 8 0;
+#X connect 16 0 1 0;
+#X connect 17 0 27 0;
+#X connect 20 0 4 0;
+#X connect 20 1 9 0;
+#X connect 20 2 7 1;
+#X connect 22 0 11 0;
+#X connect 22 0 10 0;
+#X connect 22 0 25 0;
+#X connect 23 0 22 0;
+#X connect 24 0 3 0;
+#X connect 25 0 26 0;
+#X connect 26 0 24 3;
+#X connect 27 0 20 0;
+#X connect 27 1 28 0;
+#X connect 28 0 29 0;
+#X connect 29 0 30 0;
+#X connect 30 0 1 0;