aboutsummaryrefslogtreecommitdiff
path: root/externals/gridflow/examples
diff options
context:
space:
mode:
Diffstat (limited to 'externals/gridflow/examples')
-rw-r--r--externals/gridflow/examples/bounce.pd32
-rw-r--r--externals/gridflow/examples/doodle.pd31
-rw-r--r--externals/gridflow/examples/heat.pd173
-rw-r--r--externals/gridflow/examples/markov.pd133
-rw-r--r--externals/gridflow/examples/mechanics.pd121
5 files changed, 490 insertions, 0 deletions
diff --git a/externals/gridflow/examples/bounce.pd b/externals/gridflow/examples/bounce.pd
new file mode 100644
index 00000000..46421cad
--- /dev/null
+++ b/externals/gridflow/examples/bounce.pd
@@ -0,0 +1,32 @@
+#N canvas 0 0 450 300 10;
+#X obj 34 284 #out window;
+#X floatatom 48 71 5 0 0 0 - - -;
+#X obj 34 16 metro 30;
+#X obj 6 19 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1;
+#X obj 34 42 f;
+#X obj 95 34 + 1;
+#X msg 34 265 set_geometry \$1 \$2 200 200;
+#X obj 34 93 t f f;
+#X obj 34 246 pack 0 0;
+#X obj 64 136 expr $f1-int($f1);
+#X obj 64 156 expr 2*if($f1>=.5 \, $f1 \, (1-$f1));
+#X obj 64 176 expr $f1*400;
+#X obj 64 115 / 200;
+#X obj 95 53 % 1000;
+#X obj 34 206 expr 400-200*abs(sin($f1/3.1416/5));
+#X connect 2 0 4 0;
+#X connect 3 0 2 0;
+#X connect 4 0 5 0;
+#X connect 4 0 1 0;
+#X connect 4 0 7 0;
+#X connect 5 0 13 0;
+#X connect 6 0 0 0;
+#X connect 7 0 14 0;
+#X connect 7 1 12 0;
+#X connect 8 0 6 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 8 1;
+#X connect 12 0 9 0;
+#X connect 13 0 4 1;
+#X connect 14 0 8 0;
diff --git a/externals/gridflow/examples/doodle.pd b/externals/gridflow/examples/doodle.pd
new file mode 100644
index 00000000..8ec75c39
--- /dev/null
+++ b/externals/gridflow/examples/doodle.pd
@@ -0,0 +1,31 @@
+#N canvas 0 0 450 427 10;
+#X obj 22 22 metro 33.3667;
+#X obj 1 22 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1;
+#X obj 143 74 t b l;
+#X obj 282 93 loadbang;
+#X msg 182 74 put_at ( \$1 \$2 0 );
+#X msg 284 120 0 192 255;
+#X obj 22 114 #store (64 64 3 #);
+#X obj 22 133 #scale_by 8;
+#X obj 22 152 #out window;
+#X obj 22 171 #mouse;
+#X obj 22 190 # / 8;
+#X obj 22 209 #export_list;
+#X obj 143 93 #store;
+#X obj 232 154 #color;
+#X connect 0 0 6 0;
+#X connect 1 0 0 0;
+#X connect 2 0 12 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 6 1;
+#X connect 5 0 13 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 9 1 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 2 0;
+#X connect 12 0 6 1;
+#X connect 13 0 12 1;
diff --git a/externals/gridflow/examples/heat.pd b/externals/gridflow/examples/heat.pd
new file mode 100644
index 00000000..743fc4e6
--- /dev/null
+++ b/externals/gridflow/examples/heat.pd
@@ -0,0 +1,173 @@
+#N canvas 59 155 741 486 10;
+#X obj 228 23 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#N canvas 199 246 450 453 heat 1;
+#X obj 129 23 inlet mask;
+#X obj 22 42 t a a;
+#X obj 22 224 # +;
+#X obj 22 23 inlet heatmap;
+#X obj 24 394 outlet heatmap;
+#X obj 241 154 #greyscale_to_rgb;
+#X obj 241 175 #out window;
+#X obj 22 80 #store;
+#X obj 22 61 #finished;
+#X obj 52 167 # + 128;
+#X obj 52 186 # >> 8;
+#X obj 52 134 # *;
+#X obj 52 103 #convolve (3 3 # 0 1 0 1 -4 1);
+#X obj 52 205 # + 2;
+#X obj 52 225 # >> 4;
+#X connect 0 0 11 1;
+#X connect 1 0 8 0;
+#X connect 1 1 7 1;
+#X connect 1 1 12 0;
+#X connect 2 0 4 0;
+#X connect 3 0 1 0;
+#X connect 5 0 6 0;
+#X connect 7 0 2 0;
+#X connect 8 0 7 0;
+#X connect 9 0 10 0;
+#X connect 10 0 13 0;
+#X connect 11 0 9 0;
+#X connect 12 0 11 0;
+#X connect 13 0 14 0;
+#X connect 14 0 2 1;
+#X restore 27 81 pd heat;
+#X obj 27 61 #store;
+#X obj 94 42 loadbang;
+#X obj 27 16 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X obj 27 363 #out window;
+#X obj 227 157 #greyscale_to_rgb;
+#X obj 227 138 # >> 2;
+#X obj 48 23 s metro;
+#X obj 27 382 #mouse \, ...;
+#X obj 120 382 # >> 1;
+#X obj 27 344 #scale_by 2;
+#X msg 94 61 240 320 1 # 0;
+#N canvas 205 52 520 286 finger 0;
+#X obj 28 62 shunt 2;
+#X msg 289 71 4 2 # 0 0 0 1 1 1 1 0;
+#X obj 289 90 # * 8;
+#X obj 289 109 # - 4;
+#X obj 289 128 # +;
+#X obj 28 23 inlet;
+#X obj 28 142 outlet;
+#X obj 289 14 inlet position;
+#X obj 72 23 inlet button;
+#X obj 289 33 #export_list;
+#X obj 289 52 t b a;
+#X obj 72 81 #draw_polygon + (4000);
+#X connect 0 0 6 0;
+#X connect 0 1 11 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 11 2;
+#X connect 5 0 0 0;
+#X connect 7 0 9 0;
+#X connect 8 0 0 1;
+#X connect 9 0 10 0;
+#X connect 10 0 1 0;
+#X connect 10 1 4 1;
+#X connect 11 0 6 0;
+#X restore 27 163 pd finger;
+#X obj 15 436 fps detailed;
+#X obj 16 456 display;
+#X obj 27 119 shunt 2;
+#X obj 90 104 f;
+#X obj 115 104 + 1;
+#X obj 27 100 t a b;
+#X obj 140 123 ==;
+#X obj 140 104 % 4;
+#N canvas 340 133 341 379 render 0;
+#X obj 12 285 # +;
+#X obj 26 23 inlet heatmap;
+#X obj 12 323 outlet rgb;
+#X obj 123 23 inlet mask;
+#X obj 26 53 t a a;
+#X obj 26 80 #inner (1 3 # 2 4 6) \, op >>;
+#X obj 82 161 t a a;
+#X obj 88 189 # -;
+#X obj 88 227 # + 128;
+#X obj 12 304 #clip;
+#X obj 88 208 # << 6;
+#X obj 26 108 shunt 2;
+#X obj 79 109 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X connect 0 0 9 0;
+#X connect 1 0 4 0;
+#X connect 3 0 0 1;
+#X connect 4 0 5 0;
+#X connect 5 0 11 0;
+#X connect 6 0 7 1;
+#X connect 6 1 7 0;
+#X connect 7 0 10 0;
+#X connect 8 0 0 0;
+#X connect 9 0 2 0;
+#X connect 10 0 8 0;
+#X connect 11 0 0 0;
+#X connect 11 1 6 0;
+#X connect 12 0 11 1;
+#X restore 28 271 pd render;
+#X obj 295 232 #fold +;
+#X obj 295 251 #fold +;
+#X obj 295 289 #fold +;
+#X obj 245 23 loadbang;
+#X obj 227 100 # max;
+#X obj 227 81 # << 1;
+#X obj 227 119 # min 256;
+#X obj 227 62 # - 40;
+#X obj 295 270 # / 320;
+#X obj 295 308 # / 240;
+#X obj 295 327 #export;
+#X floatatom 294 356 5 0 0 0 - - -;
+#X obj 27 42 metro 12;
+#X text 542 3 heat propagation simulation;
+#X text 396 43 use a greyscale image here;
+#X text 493 17 Copyright 2005 by Mathieu Bouchard;
+#X obj 227 43 #in ../images/pmask.png;
+#X text 396 57 as a heat conduction map;
+#X connect 0 0 39 0;
+#X connect 1 0 19 0;
+#X connect 2 0 1 0;
+#X connect 3 0 12 0;
+#X connect 4 0 35 0;
+#X connect 5 0 9 0;
+#X connect 5 0 14 0;
+#X connect 6 0 22 1;
+#X connect 7 0 6 0;
+#X connect 9 0 10 0;
+#X connect 9 1 10 0;
+#X connect 9 4 13 1;
+#X connect 10 0 13 2;
+#X connect 11 0 5 0;
+#X connect 12 0 2 1;
+#X connect 13 0 2 1;
+#X connect 13 0 22 0;
+#X connect 14 0 15 0;
+#X connect 16 0 2 1;
+#X connect 16 1 13 0;
+#X connect 17 0 18 0;
+#X connect 18 0 21 0;
+#X connect 19 0 16 0;
+#X connect 19 1 17 0;
+#X connect 20 0 16 1;
+#X connect 21 0 17 1;
+#X connect 21 0 20 0;
+#X connect 22 0 11 0;
+#X connect 23 0 24 0;
+#X connect 24 0 31 0;
+#X connect 25 0 32 0;
+#X connect 26 0 39 0;
+#X connect 27 0 29 0;
+#X connect 28 0 27 0;
+#X connect 29 0 1 1;
+#X connect 29 0 7 0;
+#X connect 30 0 28 0;
+#X connect 31 0 25 0;
+#X connect 32 0 33 0;
+#X connect 33 0 34 0;
+#X connect 35 0 2 0;
+#X connect 35 0 8 0;
+#X connect 39 0 30 0;
diff --git a/externals/gridflow/examples/markov.pd b/externals/gridflow/examples/markov.pd
new file mode 100644
index 00000000..d6bbe262
--- /dev/null
+++ b/externals/gridflow/examples/markov.pd
@@ -0,0 +1,133 @@
+#N canvas 238 57 825 641 10;
+#X obj 70 203 dac~;
+#X obj 71 141 osc~;
+#X obj 71 103 mtof;
+#X obj 71 122 t f b;
+#X obj 105 142 line~;
+#X obj 70 160 *~;
+#X obj 74 86 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 6700 1;
+#X obj 70 179 *~ 0.1;
+#X obj 33 6 key;
+#X obj 409 139 messageprepend set;
+#X obj 497 110 t l;
+#X msg 409 89 list \$1;
+#X obj 409 109 listprepend;
+#X msg 481 84 list;
+#X obj 97 7 loadbang;
+#X obj 34 29 listfind;
+#X obj 34 48 sel -1;
+#X obj 71 67 + 60;
+#X msg 114 28 list 113 50 119 51 101 114 53 116 54 121 55 117 105 57
+111 48 112 91 61 93 127;
+#X obj 409 69 key;
+#X msg 111 123 0.7 \, 0 400;
+#X floatatom 105 68 5 0 0 0 - - -;
+#X msg 200 180 list \$1;
+#X obj 275 199 listsublist 0 2;
+#X obj 200 199 listappend;
+#X obj 483 388 display;
+#X msg 270 264 1;
+#X msg 305 240 put_at ( \$2 \$1 );
+#X obj 166 319 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 75 309 f;
+#X obj 39 410 #store;
+#X obj 97 393 #fold +;
+#X obj 96 417 display;
+#X obj 275 219 t l l l;
+#X msg 184 279 bang;
+#X obj 8 387 #finished;
+#X floatatom 99 311 5 0 0 0 - - -;
+#X obj 90 288 t f;
+#X obj 17 262 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X msg 192 299 list \$1;
+#X obj 46 366 t a a;
+#X obj 39 502 #scan +;
+#X obj 200 157 spigot;
+#X obj 82 440 # rand;
+#X obj 80 472 display;
+#X obj 38 546 # <;
+#X obj 50 595 #fold +;
+#X obj 280 512 display;
+#X obj 132 596 #export;
+#X obj 248 157 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 104 329 + 60;
+#X obj 148 368 spigot;
+#X obj 199 367 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 17 286 metro 100;
+#X obj 50 617 display;
+#X obj 67 568 display;
+#X obj 90 537 display;
+#X obj 191 322 #store (17 17 #) \, op +;
+#X text 536 12 This will be an example of Markov Chains;
+#X text 536 27 But it's not too clean yet;
+#X connect 1 0 5 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X connect 3 1 20 0;
+#X connect 4 0 5 1;
+#X connect 5 0 7 0;
+#X connect 6 0 2 0;
+#X connect 7 0 0 0;
+#X connect 7 0 0 1;
+#X connect 8 0 15 0;
+#X connect 10 0 12 1;
+#X connect 11 0 12 0;
+#X connect 12 0 10 0;
+#X connect 12 0 9 0;
+#X connect 13 0 12 1;
+#X connect 14 0 18 0;
+#X connect 15 0 16 0;
+#X connect 16 1 17 0;
+#X connect 16 1 42 0;
+#X connect 17 0 6 0;
+#X connect 17 0 21 0;
+#X connect 18 0 15 1;
+#X connect 19 0 11 0;
+#X connect 20 0 4 0;
+#X connect 22 0 24 0;
+#X connect 23 0 24 1;
+#X connect 23 0 33 0;
+#X connect 24 0 23 0;
+#X connect 26 0 57 1;
+#X connect 27 0 57 1;
+#X connect 28 0 57 0;
+#X connect 29 0 39 0;
+#X connect 30 0 41 0;
+#X connect 30 0 47 0;
+#X connect 31 0 32 0;
+#X connect 31 0 43 0;
+#X connect 33 0 34 0;
+#X connect 33 1 26 0;
+#X connect 33 2 27 0;
+#X connect 34 0 57 0;
+#X connect 35 0 30 0;
+#X connect 36 0 50 0;
+#X connect 37 0 29 1;
+#X connect 37 0 36 0;
+#X connect 38 0 53 0;
+#X connect 39 0 57 0;
+#X connect 40 0 35 0;
+#X connect 40 1 30 1;
+#X connect 40 1 31 0;
+#X connect 41 0 45 0;
+#X connect 41 0 56 0;
+#X connect 42 0 22 0;
+#X connect 43 0 44 0;
+#X connect 43 0 45 1;
+#X connect 45 0 46 0;
+#X connect 45 0 55 0;
+#X connect 46 0 48 0;
+#X connect 46 0 54 0;
+#X connect 48 0 37 0;
+#X connect 49 0 42 1;
+#X connect 50 0 6 0;
+#X connect 51 0 40 0;
+#X connect 52 0 51 1;
+#X connect 53 0 29 0;
+#X connect 57 0 25 0;
+#X connect 57 0 51 0;
diff --git a/externals/gridflow/examples/mechanics.pd b/externals/gridflow/examples/mechanics.pd
new file mode 100644
index 00000000..944dcb7c
--- /dev/null
+++ b/externals/gridflow/examples/mechanics.pd
@@ -0,0 +1,121 @@
+#N canvas 491 20 624 716 10;
+#X obj 188 65 # rand;
+#X obj 81 97 #store;
+#X obj 188 8 loadbang;
+#X obj 134 120 #transpose;
+#X obj 64 8 tgl 17 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
+#X obj 81 171 #inner \, op sq- \, fold +;
+#X msg 139 56 1;
+#X msg 100 56 0;
+#X obj 81 120 shunt 2;
+#X obj 81 29 t b b b b;
+#X obj 27 244 #transpose 1 3;
+#X obj 27 282 #fold +;
+#X obj 27 357 # inv*;
+#X obj 159 424 # +;
+#X msg 188 27 bang;
+#X obj 12 648 #out window;
+#X obj 12 29 t b b;
+#X obj 12 667 fps detailed;
+#X obj 190 471 # inv+;
+#X obj 279 235 # + 1;
+#X obj 279 216 # * -2;
+#X obj 185 424 # *;
+#X msg 261 76 7 2 # 0;
+#X obj 12 574 # min 255;
+#X obj 81 8 metro 40;
+#X obj 350 598 #dim;
+#X msg 350 636 \$1;
+#X msg 349 674 \$1 2;
+#X obj 350 617 #export_list;
+#X obj 287 500 t a a;
+#X obj 350 655 * 6;
+#X obj 27 225 #outer sq-;
+#X msg 188 46 7 2 # 5760 7680;
+#X obj 240 521 # / 16;
+#X obj 27 322 # >> 8;
+#X obj 46 496 display;
+#X obj 190 452 # >> 8;
+#X obj 74 357 # << 8;
+#X obj 27 263 # * (2 2 # 1 0 0 1);
+#X obj 81 190 #outer ignore (2 #);
+#X obj 279 178 # abs- (2880 3840);
+#X obj 279 197 # >= (2880 3840);
+#X obj 290 460 # min (36000 48000);
+#X obj 290 479 # max (0 0);
+#X obj 240 541 #inner (2 6 2 # 1 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1
+0 1 0 1 0 0);
+#X obj 240 573 # + (6 2 # -8 -8 -8 8 8 8 8 -8 -8 -8 180 240);
+#X obj 12 555 # *>>8 (232 242 252);
+#X obj 12 536 #draw_polygon + \, color (3 # 130);
+#X obj 12 517 #store (360 480 3 # 0);
+#X obj 28 376 #fold + \, seed (2 #);
+#X obj 231 613 #redim (42 2);
+#X text 310 8 This was supposed to be some kind of;
+#X text 310 24 Newtonian physics simulation;
+#X text 310 42 But it doesn't quite work;
+#X connect 0 0 1 1;
+#X connect 1 0 8 0;
+#X connect 2 0 14 0;
+#X connect 3 0 5 1;
+#X connect 3 0 31 1;
+#X connect 4 0 24 0;
+#X connect 5 0 39 0;
+#X connect 6 0 8 1;
+#X connect 7 0 8 1;
+#X connect 8 0 5 0;
+#X connect 8 0 31 0;
+#X connect 8 1 3 0;
+#X connect 8 1 18 1;
+#X connect 8 1 40 0;
+#X connect 9 0 16 0;
+#X connect 9 1 7 0;
+#X connect 9 2 1 0;
+#X connect 9 3 6 0;
+#X connect 10 0 38 0;
+#X connect 11 0 34 0;
+#X connect 12 0 49 0;
+#X connect 13 0 21 1;
+#X connect 13 0 36 0;
+#X connect 14 0 32 0;
+#X connect 14 0 22 0;
+#X connect 15 0 17 0;
+#X connect 16 0 48 0;
+#X connect 16 1 1 0;
+#X connect 18 0 29 0;
+#X connect 19 0 21 0;
+#X connect 20 0 19 0;
+#X connect 21 0 13 1;
+#X connect 22 0 13 1;
+#X connect 22 0 21 1;
+#X connect 23 0 15 0;
+#X connect 23 0 48 1;
+#X connect 24 0 9 0;
+#X connect 25 0 28 0;
+#X connect 26 0 30 0;
+#X connect 27 0 50 1;
+#X connect 28 0 26 0;
+#X connect 29 0 1 1;
+#X connect 29 0 33 0;
+#X connect 29 1 25 0;
+#X connect 30 0 27 0;
+#X connect 31 0 10 0;
+#X connect 32 0 0 0;
+#X connect 33 0 44 0;
+#X connect 34 0 12 0;
+#X connect 36 0 18 0;
+#X connect 36 0 35 0;
+#X connect 37 0 12 1;
+#X connect 38 0 11 0;
+#X connect 39 0 37 0;
+#X connect 40 0 41 0;
+#X connect 41 0 20 0;
+#X connect 42 0 43 0;
+#X connect 43 0 29 0;
+#X connect 44 0 45 0;
+#X connect 45 0 50 0;
+#X connect 46 0 23 0;
+#X connect 47 0 46 0;
+#X connect 48 0 47 0;
+#X connect 49 0 13 0;
+#X connect 50 0 47 2;