#N canvas 18 198 626 548 10;
#X declare -lib Gem;
#X text 452 8 GEM object;
#X obj 8 345 cnv 15 430 150 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X text 39 348 Inlets:;
#X text 38 465 Outlets:;
#X obj 8 306 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X text 17 305 Arguments:;
#X obj 7 76 cnv 15 430 225 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 449 77 cnv 15 170 250 empty empty empty 20 12 0 14 #dce4fc #404040 0;
#X text 453 60 Example:;
#X obj 504 294 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X obj 450 138 cnv 15 160 110 empty empty empty 20 12 0 14 #14e814 #404040 0;
#X obj 451 84 gemhead;
#X text 71 31 Class: pix object;
#X obj 510 85 bng 15 250 50 0 empty empty pix_load 20 8 0 8 #fcfcfc #000000 #000000;
#N canvas 0 0 587 366 image 0;
#X obj 77 48 inlet;
#X obj 77 344 outlet;
#X obj 77 205 pix_image examples/data/fractal.JPG;
#X obj 223 55 inlet;
#X msg 223 123 open \$1;
#X obj 223 100 openpanel;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X connect 3 0 5 0;
#X connect 4 0 2 0;
#X connect 5 0 4 0;
#X restore 451 113 pd image;
#X text 63 316 <none>;
#X text 56 478 Outlet 1: gemlist;
#X text 63 362 Inlet 1: gemlist;
#X obj 451 263 _pix2rectangle 3;
#X text 516 105 open an image;
#X text 509 118 (JPEG \, TIFF \, ..);
#X text 63 375 Inlet 1: 1|0 : apply/don't apply (default:1);
#X msg 463 146 bang;
#X text 50 12 Synopsis: [pix_puzzle];
#X text 63 77 Description: shuffle an image;
#X text 16 97 [pix_puzzle] is an effect that will cut your image into rectangular pieces and shuffle these.;
#X text 17 128 You can change the number of pieces per row/column with the "size" message. "bang" triggers a re-shuffling of the pieces.;
#X obj 29 505 cnv 15 423 30 empty empty empty 20 12 0 14 #fcac44 #404040 0;
#X text 34 505 acknowledgment: this effect is based on effecTV by Kentarou Fukuchi (http://effectv.sourceforge.net);
#X obj 451 223 pix_puzzle;
#X text 64 390 Inlet 1: bang: reshuffle;
#X msg 509 145 size 4 3;
#X msg 551 212 move \$1;
#X floatatom 551 193 5 0 0 0 - - - 0;
#X text 63 433 Inlet 1: move <int>: move the empty field;
#X text 192 238 8;
#X text 175 253 4;
#X text 209 254 6;
#X text 192 271 2;
#X text 44 204 "move 5" will en/disable an empty field;
#X text 16 171 There is a little game hidden in the [pix_puzzle]. Go and find it:;
#X text 46 221 Moving can be done according to the number-pad;
#X msg 551 171 5;
#X text 63 405 Inlet 1: size <int> <int>: number of elements in x/y (default: 8 8);
#N canvas 0 0 243 214 numkeys 0;
#X obj 63 16 key;
#X obj 63 181 outlet;
#X msg 63 115 5;
#X msg 91 115 8;
#X msg 119 115 4;
#X obj 63 90 select 53 56 52 54 50;
#X msg 148 115 6;
#X msg 176 115 2;
#X connect 0 0 5 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
#X connect 5 0 2 0;
#X connect 5 1 3 0;
#X connect 5 2 4 0;
#X connect 5 3 6 0;
#X connect 5 4 7 0;
#X connect 6 0 1 0;
#X connect 7 0 1 0;
#X restore 475 176 pd numkeys;
#X text 12 285 (i admit this is not very intuitive...);
#N canvas 484 243 450 300 META 0;
#X obj 10 25 declare -lib Gem;
#X text 10 45 DESCRIPTION shuffle an image;
#X text 10 65 KEYWORDS Gem pix image;
#X text 20 85 INLET_0 gemlist bool bang size move;
#X text 20 105 OUTLET_0 gemlist;
#X text 10 125 AUTHOR IOhannes m zmölnig;
#X text 10 145 LICENSE GPL v2;
#X restore 518 8 pd META;
#X obj 510 298 _gemwin;
#X connect 11 0 14 0;
#X connect 13 0 14 1;
#X connect 14 0 29 0;
#X connect 22 0 29 0;
#X connect 29 0 18 0;
#X connect 31 0 29 0;
#X connect 32 0 29 0;
#X connect 33 0 32 0;
#X connect 42 0 33 0;
#X connect 44 0 33 0;
