aboutsummaryrefslogtreecommitdiff
path: root/Gem/examples/04.pix/12.blending.pd
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-03-19 20:12:11 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-03-19 20:12:11 +0000
commit17dc0febb17888015be1e4ad1ed4b096a4909865 (patch)
tree0c32573795cf15c79d5e8f792772bf952dab415b /Gem/examples/04.pix/12.blending.pd
parent454d0818e5ad0820771abebefa9758c66068b8d1 (diff)
Gem 206d71791bc3642e8c5391a4c59c30ba7411fab8 osx/i386
built 'master:206d71791bc3642e8c5391a4c59c30ba7411fab8' for osx/i386
Diffstat (limited to 'Gem/examples/04.pix/12.blending.pd')
-rw-r--r--Gem/examples/04.pix/12.blending.pd173
1 files changed, 173 insertions, 0 deletions
diff --git a/Gem/examples/04.pix/12.blending.pd b/Gem/examples/04.pix/12.blending.pd
new file mode 100644
index 0000000..473c48e
--- /dev/null
+++ b/Gem/examples/04.pix/12.blending.pd
@@ -0,0 +1,173 @@
+#N canvas 138 0 775 371 10;
+#X obj 254 305 pix_texture;
+#X obj 290 112 gemhead 20;
+#X obj 254 65 gemhead;
+#X text 257 30 various methods for blending images;
+#N canvas 165 295 561 386 blending 0;
+#X obj 28 65 inlet;
+#X obj 191 354 outlet;
+#X obj 173 285 inlet;
+#X obj 320 8 inlet;
+#X obj 28 322 pix_composite;
+#X obj 129 323 pix_add;
+#X obj 285 322 pix_diff;
+#X obj 191 322 pix_subtract;
+#X obj 28 227 pix_alpha;
+#N canvas 445 182 508 174 select 0;
+#X obj 88 35 inlet;
+#X msg 88 98 1;
+#X msg 144 98 2;
+#X msg 201 97 3;
+#X msg 257 97 0;
+#X obj 88 121 outlet;
+#X msg 329 100 4;
+#X obj 88 59 select pix_add pix_subtract pix_diff pix_composite pix_multiply
+;
+#X connect 0 0 7 0;
+#X connect 1 0 5 0;
+#X connect 2 0 5 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 6 0 5 0;
+#X connect 7 0 1 0;
+#X connect 7 1 2 0;
+#X connect 7 2 3 0;
+#X connect 7 3 4 0;
+#X connect 7 4 6 0;
+#X restore 350 82 pd select blending method;
+#X obj 360 324 pix_multiply;
+#N canvas 172 373 450 300 demux5 0;
+#X obj 59 30 inlet;
+#X obj 283 17 inlet;
+#X obj 59 193 outlet;
+#X obj 59 137 spigot;
+#X obj 96 109 == 0;
+#X obj 106 137 spigot;
+#X obj 153 139 spigot;
+#X obj 200 137 spigot;
+#X obj 246 137 spigot;
+#X obj 143 109 == 1;
+#X obj 190 109 == 2;
+#X obj 237 109 == 3;
+#X obj 283 109 == 4;
+#X obj 96 83 loadbang;
+#X obj 59 52 t a a a a a;
+#X obj 106 194 outlet;
+#X obj 153 195 outlet;
+#X obj 200 196 outlet;
+#X obj 246 195 outlet;
+#X obj 283 61 f;
+#X connect 0 0 14 0;
+#X connect 1 0 19 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 1;
+#X connect 5 0 15 0;
+#X connect 6 0 16 0;
+#X connect 7 0 17 0;
+#X connect 8 0 18 0;
+#X connect 9 0 5 1;
+#X connect 10 0 6 1;
+#X connect 11 0 7 1;
+#X connect 12 0 8 1;
+#X connect 13 0 4 0;
+#X connect 14 0 3 0;
+#X connect 14 1 5 0;
+#X connect 14 2 6 0;
+#X connect 14 3 7 0;
+#X connect 14 4 8 0;
+#X connect 19 0 4 0;
+#X connect 19 0 9 0;
+#X connect 19 0 10 0;
+#X connect 19 0 11 0;
+#X connect 19 0 12 0;
+#X restore 28 189 pd demux5;
+#X obj 320 28 t b a;
+#X obj 28 129 pix_buf;
+#X text 26 39 pix1;
+#X text 176 269 pix2;
+#X obj 350 56 symbol;
+#X text 99 232 we need an alpha componenct for 'composite';
+#X text 85 115 [pix_add] and friends will overwrite the original (left)
+image with the blend. [pix_buf] holds a local copy of the original
+image and will refresh the output when banged.;
+#X connect 0 0 13 0;
+#X connect 2 0 5 1;
+#X connect 2 0 4 1;
+#X connect 2 0 7 1;
+#X connect 2 0 6 1;
+#X connect 2 0 10 1;
+#X connect 3 0 12 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 1 0;
+#X connect 7 0 1 0;
+#X connect 8 0 4 0;
+#X connect 9 0 11 1;
+#X connect 10 0 1 0;
+#X connect 11 0 8 0;
+#X connect 11 1 5 0;
+#X connect 11 2 7 0;
+#X connect 11 3 6 0;
+#X connect 11 4 10 0;
+#X connect 12 0 13 0;
+#X connect 12 1 16 0;
+#X connect 13 0 11 0;
+#X connect 16 0 9 0;
+#X restore 254 250 pd blending;
+#X obj 254 328 square 3;
+#X text 461 210 additive blending (likely to get white);
+#X text 461 231 subtractive blending (likely to get black);
+#X text 467 184 alpha blending;
+#X msg 367 281 pix_multiply;
+#X msg 368 256 pix_diff;
+#X msg 366 232 pix_subtract;
+#X msg 366 207 pix_add;
+#X msg 367 184 pix_composite;
+#X text 469 281 multiply 2 images together;
+#X obj 254 87 pix_image ../data/dancer.JPG;
+#X obj 290 136 pix_image ../data/fractal.JPG;
+#X text 465 259 difference;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X connect 0 0 5 0;
+#X connect 1 0 16 0;
+#X connect 2 0 15 0;
+#X connect 4 0 0 0;
+#X connect 9 0 4 2;
+#X connect 10 0 4 2;
+#X connect 11 0 4 2;
+#X connect 12 0 4 2;
+#X connect 13 0 4 2;
+#X connect 15 0 4 0;
+#X connect 16 0 4 1;
+#X connect 19 0 20 0;
+#X connect 20 0 19 0;