forked from mxa/Bewegungsmelder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
10-pixel.pd
80 lines (80 loc) · 2.27 KB
/
10-pixel.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#N canvas 543 80 627 657 10;
#X declare -lib Gem;
#X obj 28 7 cnv 15 400 50 empty empty 10 14 24 0 24 -175655 -66577
0;
#X msg 29 106 create \, 1;
#X msg 37 132 0 \, destroy;
#X obj 136 178 pix_video;
#X text 28 539 Challenge:;
#X obj 29 162 gemwin 12;
#X floatatom 164 356 5 0 0 0 - - -;
#X obj 119 323 pix_data;
#X obj 134 238 pix_separator;
#X obj 119 134 t b a b b;
#X msg 170 266 0.5;
#X msg 153 293 0.5;
#X text 81 29 check one Pixel for it's value;
#X text 29 67 We can check one pixel for it's color and luminance like
this:;
#X obj 141 386 unpack f f f;
#X floatatom 141 415 5 0 0 0 - - -;
#X floatatom 175 415 5 0 0 0 - - -;
#X floatatom 210 415 5 0 0 0 - - -;
#X text 27 555 1 Use the values to output some sound;
#X text 27 569 2 Use the color values and visualize them with colored
dots;
#X text 201 356 alpha value;
#X text 140 437 red;
#X text 174 437 green;
#X text 211 437 blue;
#X obj 136 201 mn-flip;
#X obj 119 112 gemhead;
#X text 214 128 here we use the gemhead to trigger;
#X text 213 142 on each render cycle;
#X obj 241 230 cnv 15 100 80 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 245 260 pix_texture;
#X obj 245 238 pix_separator;
#X obj 245 284 rectangle 4 3;
#X text 239 210 displays the image;
#X obj 342 343 cnv 15 140 160 empty empty empty 20 12 0 14 -228856
-66577 0;
#X obj 346 478 square 0.04;
#X obj 346 455 translateXYZ 1 1 0.01;
#X obj 346 352 gemhead;
#X text 341 311 the small square to indicate;
#X text 342 323 where the color is detected;
#X obj 98 600 pix_mean_color;
#X text 27 584 3 compare the pixels color to the average color in the
image using;
#X obj 387 432 mn-coor_map;
#X obj 324 13 declare -lib Gem;
#X text 27 633 Max Neupert \, GMU - Bauhaus Universität Weimar 2008-2012
;
#X text 81 16 Pure Data + Gem;
#X connect 1 0 5 0;
#X connect 2 0 5 0;
#X connect 3 0 24 0;
#X connect 7 1 14 0;
#X connect 7 2 6 0;
#X connect 8 0 7 1;
#X connect 9 0 7 0;
#X connect 9 1 3 0;
#X connect 9 2 11 0;
#X connect 9 3 10 0;
#X connect 10 0 7 3;
#X connect 10 0 41 1;
#X connect 11 0 7 2;
#X connect 11 0 41 0;
#X connect 14 0 15 0;
#X connect 14 1 16 0;
#X connect 14 2 17 0;
#X connect 24 0 8 0;
#X connect 24 0 30 0;
#X connect 25 0 9 0;
#X connect 29 0 31 0;
#X connect 30 0 29 0;
#X connect 35 0 34 0;
#X connect 36 0 35 0;
#X connect 41 0 35 1;
#X connect 41 1 35 2;