#N canvas 694 194 643 569 10;
#X declare -lib Gem;
#X text 458 13 GEM object;
#X obj 14 391 cnv 15 430 155 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X text 45 392 Inlets:;
#X text 45 513 Outlets:;
#X obj 14 356 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X text 23 358 Arguments:;
#X obj 14 61 cnv 15 430 290 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 452 81 cnv 15 170 465 empty empty empty 20 12 0 14 #dce4fc #404040 0;
#X text 459 64 Example:;
#X obj 516 480 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X obj 457 120 cnv 15 160 320 empty empty empty 20 12 0 14 #14e814 #404040 0;
#X obj 457 94 gemhead;
#X text 23 527 Outlet 1: gemlist;
#X text 29 406 Inlet 1: gemlist;
#X text 69 369 list: [<width> <height>];
#X obj 532 94 block~ 4096;
#X obj 465 210 osc~ 1;
#X obj 465 249 *~ 0.5;
#X obj 465 229 +~ 1;
#X obj 519 191 noise~;
#X floatatom 536 239 5 0 0 0 - - - 0;
#X obj 567 191 tgl 15 0 empty empty empty 0 -6 0 8 #14e814 #000000 #000000 0 1;
#X obj 519 214 *~ 0;
#X obj 536 258 phasor~ 700;
#X floatatom 465 192 5 0 0 0 - - - 0;
#X text 56 17 Synopsis: [pix_sig2pix~];
#X text 77 36 Class: pix object (source);
#X text 35 62 Description: convert signals to images;
#X text 29 459 Inlet 1: signal: red channel;
#X text 29 472 Inlet 2: signal: green channel;
#X text 29 484 Inlet 3: signal: blue channel;
#X text 29 497 Inlet 4: signal: alpha channel;
#X text 29 419 Inlet 1: message: dimen <width> <height>;
#X obj 457 413 pix_sig2pix~ 64 64;
#N canvas 484 243 450 300 META 0;
#X obj 10 25 declare -lib Gem;
#X text 10 45 DESCRIPTION convert signals to images;
#X text 10 65 KEYWORDS Gem pix image;
#X text 20 85 INLET_0 gemlist dimen type mode signal;
#X text 20 105 INLET_1 signal;
#X text 20 125 INLET_2 signal;
#X text 20 145 INLET_3 signal;
#X text 20 165 OUTLET_0 gemlist;
#X text 10 185 AUTHOR IOhannes m zmölnig;
#X text 10 205 LICENSE GPL v2;
#X restore 524 13 pd META;
#X text 29 431 Inlet 1: message: type BYTE|FLOAT|DOUBLE;
#X obj 457 168 t a;
#X msg 492 147 type BYTE;
#X text 18 263 By default \, values are converted to unsigned BYTEs. You can change the storage type to FLOAT (or DOUBLE) with the 'type' message. FLOAT images can be uploaded as textures \, but virtually no other pix object can handle such images., f 69;
#X text 17 320 Signal values should be in the range 0..1 (and might be clipped or worse \, if this range is exceeded), f 69;
#X msg 474 314 mode clear;
#X msg 475 334 mode fill;
#X msg 475 354 mode line;
#X msg 481 126 dimen 512 512;
#X text 17 169 There are multiple ways how a signals fill up the image. 'clear' mode (the default) will just start writing the image from the beginning for each signal block. 'fill' mode will continue where it left. 'line' mode will only fill a single line (discarding extraneous samples \, zero-padding missing samples). 'waterfall' is similar to 'line'but will only write the first line and shift the rest of the pixels., f 69;
#X msg 475 374 mode waterfall;
#X text 18 79 [pix_sig2pix~] will interpret the 4 incoming audio-streams as values for the red \, green \, blue and alpha channel of an image. The default image-size is calculated from the blocksize (eg: 64samples -> 8x8 & 128samples -> 16x8) \, but you can set it either with arguments or the [dimen( message. If your imagesize is bigger than the blocksize \, the rest will be zeroed out. For legacy reasons \, images are upside-down. You can flip them with the 'upsidedown' message., f 69;
#X msg 480 285 upsidedown 0;
#X text 29 444 Inlet 1: message: mode clear|fill|line|waterfall;
#X obj 524 487 _gemwin;
#N canvas 735 418 450 300 dsp 0;
#X obj 59 45 inlet;
#X obj 59 68 select 1;
#X msg 59 91 \; pd dsp 1;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X restore 524 542 pd dsp;
#X obj 457 445 _pix2rectangle 3 \; quality 0;
#X connect 11 0 36 0;
#X connect 16 0 18 0;
#X connect 17 0 33 0;
#X connect 18 0 17 0;
#X connect 19 0 22 0;
#X connect 20 0 23 0;
#X connect 21 0 22 1;
#X connect 22 0 33 1;
#X connect 23 0 33 2;
#X connect 24 0 16 0;
#X connect 33 0 51 0;
#X connect 36 0 33 0;
#X connect 37 0 36 0;
#X connect 40 0 33 0;
#X connect 41 0 33 0;
#X connect 42 0 33 0;
#X connect 43 0 36 0;
#X connect 45 0 33 0;
#X connect 47 0 33 0;
#X connect 49 0 50 0;
