-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathof.pixnoise-help.pd
193 lines (193 loc) · 6.12 KB
/
of.pixnoise-help.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
#N canvas 573 50 707 681 12;
#X declare -lib ofelia;
#X obj 9 10 cnv 15 600 60 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 462 45 declare -lib ofelia;
#X text 36 588 Texture on a geo:;
#X floatatom 108 295 5 0 0 0 - - -;
#X floatatom 106 230 5 0 0 0 - - -;
#X text 149 229 noisescale;
#X text 28 32 A simple noise texture generaor (experimental);
#X text 150 293 noise Velocity;
#X floatatom 181 507 5 0 0 0 - - -;
#X floatatom 212 476 5 0 0 0 - - -;
#X floatatom 244 449 5 0 0 0 - - -;
#X obj 181 423 unpack 0 0 0 0;
#X text 181 527 width;
#X text 216 497 height;
#X text 290 474 1 = rgb;
#X text 290 464 0 = grayscale;
#X text 290 484 3 = rgba;
#X msg 266 231 get, f 4;
#X msg 101 200 filter \$1;
#X obj 101 179 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 30 83 of.draw;
#X msg 106 253 noisescale \$1;
#X msg 108 318 noisevel \$1;
#X text 122 176 filter;
#X msg 268 169 generate;
#X msg 268 132 auto 0;
#X text 292 449 Color_type:;
#X text 199 359 arguments: allocate width height color_type auto;
#X text 333 170 manual regenerate;
#X obj 105 391 print pix;
#X obj 518 19 of.window 1;
#X obj 497 21 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 266 204 getpixel 2 2;
#X text 366 204 pixel coordinate at middle outlet;
#X text 306 233 get width \, height \, color_type infos from right
outlet;
#X text 262 95 auto noise calculation (default 1), f 26;
#X msg 268 288 warp \$1;
#X obj 268 264 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X floatatom 75 529 5 0 0 0 - - -;
#X msg 75 554 texturemap 0 0 \$1 \$1;
#X text 293 259 0 = clamp to edge \, 1 = repeat texture, f 18;
#N canvas 629 114 589 566 Set_buffer_&_Pixels 0;
#X floatatom 119 147 5 0 0 0 - - -;
#X msg 135 207 update;
#X msg 183 356 clear;
#X text 203 54 (0= Grayscale \, 1 =rgb \, 2 = rgba);
#X msg 96 110 fill 0 0 0;
#X floatatom 157 252 5 0 0 0 - - -;
#X text 230 356 clear all pixels = careful \, need re-allocate!;
#X text 183 111 fill all black (rgb or rgba if colortype =2);
#N canvas 418 393 528 305 Work_with_alpha 0;
#X obj 56 207 outlet;
#X floatatom 85 116 5 0 0 0 - - -;
#X msg 56 54 allocate 10 10 2 \, fill 200 0 0 50 \, draw 1 -150 -150
10 300 300;
#X text 55 30 allocate colortype =2 \, fill rgba (alpha = 50) \, draw
300x300px, f 67;
#X text 131 116 need after \, and update (carefull of the values!)
;
#X msg 85 142 setpixel \$1 0 255 255 255 150 \, update;
#X text 357 139 alpha = 150;
#X connect 1 0 5 0;
#X connect 2 0 0 0;
#X connect 5 0 0 0;
#X restore 184 325 pd Work_with_alpha;
#X msg 71 44 allocate 10 10 1;
#X floatatom 205 395 5 0 0 0 - - -;
#X msg 205 419 grab \$1 100 100 100;
#X obj 22 452 outlet;
#X text 107 88 2/ fill it (clear) al pixels to black;
#X msg 119 172 setpixel \$1 0 255 255 255 255;
#X text 163 144 Set pixels X \, Y \, r \, g \, b \, a;
#X msg 157 278 setpixel \$1 0 255 0 0 \, update;
#X text 203 252 set \, and update (carefull of the values!);
#X text 205 39 Width \, Height \, colortype;
#X text 68 10 1/ allocate pixel buffer size;
#X text 192 206 need after set pixel;
#X connect 0 0 14 0;
#X connect 1 0 12 0;
#X connect 2 0 12 0;
#X connect 4 0 12 0;
#X connect 5 0 16 0;
#X connect 8 0 12 0;
#X connect 9 0 12 0;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 14 0 12 0;
#X connect 16 0 12 0;
#X restore 465 323 pd Set_buffer_&_Pixels;
#N canvas 525 153 667 368 draw_on_screen 0;
#X floatatom 41 9 5 0 0 0 - - -;
#X msg 70 94 drawsubsection 1 100 0 100 100 120 200;
#X obj 74 135 of.mouse;
#X text 242 30 active \, X \, Y \, Z \, width \, height;
#X text 349 92 active \, posX \, posY \, witdh \, height \, cropfromX
\, cropfromY \, posCropX \, posCropY, f 42;
#X msg 76 291 anchorpoint \$1 \$1;
#X floatatom 76 263 5 0 0 0 - - -;
#X text 82 7 pos Z;
#X text 117 263 change anchor point;
#X text 361 186 active \, posX \, posY \, witdh \, height \, cropfromX
\, cropfromY \, posCropX \, posCropY, f 42;
#X text 288 227 Desactivate drawsubsection;
#X text 149 63 Desactivate draw;
#X obj 20 319 outlet;
#X obj 74 162 spigot;
#X obj 149 147 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 74 190 drawsubsection 1 -100 110 200 100 \$1 \$2;
#X msg 41 34 draw 1 \$1 0 0 100 100;
#X msg 59 63 draw 0 0;
#X msg 73 227 drawsubsection 0 0;
#X text 175 144 -> activate this to scroll in image with mouse;
#X connect 0 0 16 0;
#X connect 1 0 12 0;
#X connect 2 0 13 0;
#X connect 5 0 12 0;
#X connect 6 0 5 0;
#X connect 13 0 15 0;
#X connect 14 0 13 1;
#X connect 15 0 12 0;
#X connect 16 0 12 0;
#X connect 17 0 12 0;
#X connect 18 0 12 0;
#X restore 465 270 pd draw_on_screen;
#N canvas 816 141 464 290 pixels_process 0;
#X msg 39 168 crop 100 100 100 100;
#X msg 39 194 cropfrom img 100 100 300 300;
#X msg 40 90 mirror 1 0;
#X text 124 90 vertical \, horizontal;
#X msg 40 115 rotate 1;
#X msg 40 141 resize 10 10;
#X text 124 115 rotate by 90°;
#X text 144 141 resize width \, height;
#X text 152 65 0= Grayscale \, 1 =rgb \, 2 = rgba;
#X obj 8 241 outlet;
#X text 245 193 to do...;
#X text 190 168 width \, height \, posX \, posY (careful);
#X msg 40 65 setimagetype \$1;
#X obj 40 42 hradio 15 1 0 3 empty empty empty 0 -8 0 10 -262144 -1
-1 2;
#X text 35 12 Careful: Cannot be undone!;
#X connect 0 0 9 0;
#X connect 1 0 9 0;
#X connect 2 0 9 0;
#X connect 4 0 9 0;
#X connect 5 0 9 0;
#X connect 12 0 9 0;
#X connect 13 0 12 0;
#X restore 465 298 pd pixels_process;
#X msg 85 130 allocate 64 64 0;
#X msg 95 152 allocate 128 128 0;
#X obj 78 498 hsl 60 15 0.001 10 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 2200 1;
#X obj 30 608 of.plane 200 200;
#X obj 30 359 of.pixnoise 10 10 0, f 22;
#X msg 75 108 allocate 10 10 0;
#X connect 3 0 22 0;
#X connect 4 0 21 0;
#X connect 11 0 8 0;
#X connect 11 1 9 0;
#X connect 11 2 10 0;
#X connect 17 0 48 0;
#X connect 18 0 48 0;
#X connect 19 0 18 0;
#X connect 20 0 48 0;
#X connect 21 0 48 0;
#X connect 22 0 48 0;
#X connect 24 0 48 0;
#X connect 25 0 48 0;
#X connect 31 0 30 0;
#X connect 32 0 48 0;
#X connect 36 0 48 0;
#X connect 37 0 36 0;
#X connect 38 0 39 0;
#X connect 39 0 47 0;
#X connect 41 0 48 0;
#X connect 42 0 48 0;
#X connect 43 0 48 0;
#X connect 44 0 48 0;
#X connect 45 0 48 0;
#X connect 46 0 38 0;
#X connect 48 0 47 0;
#X connect 48 1 29 0;
#X connect 48 2 11 0;
#X connect 49 0 48 0;