-
Notifications
You must be signed in to change notification settings - Fork 22
/
vs-ilda-gui.pd
315 lines (315 loc) · 10.7 KB
/
vs-ilda-gui.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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
#N canvas 363 23 851 719 10;
#X obj 101 128 cnv 15 300 220 empty empty empty 20 12 0 14 -233017
-66577 0;
#X obj 34 422 vs-ilda, f 55;
#X obj 106 143 nbx 5 14 -100 100 0 0 \$2/scalex \$2/scalex Scale_X
0 -8 0 10 -4034 -1 -1 25 256;
#X obj 107 174 nbx 5 14 -100 100 0 0 \$2/scaley \$2/scaley Scale_Y
0 -8 0 10 -4034 -1 -1 25 256;
#X obj 177 143 nbx 5 14 -100 100 0 0 \$2/offsetx \$2/offsetx Offset_X
0 -8 0 10 -4034 -1 -1 0 256;
#X obj 179 174 nbx 5 14 -100 100 0 0 \$2/offsety \$2/offsety Offset_Y
0 -8 0 10 -4034 -1 -1 -2 256;
#X obj 249 143 nbx 5 14 -100 100 0 0 \$2/clipx \$2/clipx Clip_X 0 -8
0 10 -4034 -1 -1 50 256;
#X obj 249 173 nbx 5 14 -100 100 0 0 2/clipy 2/clipy Clip_Y 0 -8 0
10 -4034 -1 -1 20 256;
#X obj 321 143 nbx 5 14 -360 360 0 0 \$2/xrot \$2/xrot Rot_X 0 -8 0
10 -4034 -1 -1 0 256;
#X obj 321 173 nbx 5 14 -360 360 0 0 \$2/yrot \$2/yrot Rot_Y 0 -8 0
10 -4034 -1 -1 0 256;
#X obj 321 205 nbx 5 14 -360 360 0 0 \$2/zrot \$2/zrot Rot_Z 0 -8 0
10 -4034 -1 -1 1 256;
#X obj 110 326 hsl 128 15 0 127 0 0 \$2/cutoff \$2/cutoff Cutoff_Frq
-2 -6 0 8 -4034 -1 -1 11900 1;
#X obj 239 367 mtof;
#X obj 107 205 nbx 5 14 0 160 0 0 \$2/audiovol \$2/audiovol Vol.dB
0 -8 0 10 -4034 -1 -1 100 256;
#X obj 247 326 nbx 8 14 -1e+37 1e+37 0 0 empty empty Hz 0 -8 0 10 -228856
-1 -1 7902.13 256;
#X text 639 649 Derek Holzer;
#X text 639 687 macumbista@gmail.com;
#X obj 107 259 nbx 5 14 0 100 0 0 \$2/greenmin \$2/greenmin GREENmin
60 8 0 10 -4034 -1 -1 0 256;
#X obj 107 290 nbx 5 14 0 100 0 0 \$2/bluemin \$2/bluemin BLUEmin 60
8 0 10 -4032 -1 -1 0 256;
#X obj 107 230 nbx 5 14 0 100 0 0 \$2/redmin \$2/redmin REDmin 60 8
0 10 -250961 -1 -1 0 256;
#X obj 223 235 hsl 128 15 0.01 1 1 0 \$2/redcurve \$2/redcurve Red_Curve
-2 -6 0 8 -254346 -1 -1 7400 0;
#X obj 223 263 hsl 128 15 0.01 1 1 0 \$2/greencurve \$2/greencurve
Green_Curve -2 -6 0 8 -4034 -1 -1 7900 0;
#X obj 223 291 hsl 128 15 0.01 1 1 0 \$2/bluecurve \$2/bluecurve Blue_Curve
-2 -6 0 8 -4032 -1 -1 8600 0;
#X floatatom 357 235 5 0 0 0 - - -;
#X floatatom 358 263 5 0 0 0 - - -;
#X floatatom 358 291 5 0 0 0 - - -;
#X text 639 668 Helsinki May 2019;
#X obj 326 384 switch~;
#X obj 527 188 savestate;
#X obj 578 241 f;
#X obj 601 261 f;
#X obj 624 281 f;
#X obj 637 301 f;
#X obj 618 241 f;
#X obj 641 261 f;
#X obj 664 281 f;
#X obj 687 301 f;
#X obj 678 241 f;
#X obj 693 262 f;
#X obj 708 281 f;
#X obj 721 301 f;
#X obj 718 241 f;
#X obj 731 261 f;
#X obj 748 281 f;
#X obj 661 341 f;
#X obj 748 241 f;
#X obj 661 301 f;
#X obj 32 570 kollabs/ds_reg \$1 \$2/xrot;
#X obj 32 590 kollabs/ds_reg \$1 \$2/yrot;
#X obj 32 610 kollabs/ds_reg \$1 \$2/zrot;
#X obj 32 450 kollabs/ds_reg \$1 \$2/scalex;
#X obj 32 470 kollabs/ds_reg \$1 \$2/scaley;
#X obj 32 490 kollabs/ds_reg \$1 \$2/offsetx;
#X obj 32 510 kollabs/ds_reg \$1 \$2/offsety;
#X obj 32 530 kollabs/ds_reg \$1 \$2/clipx;
#X obj 32 550 kollabs/ds_reg \$1 \$2/clipy;
#X obj 212 450 kollabs/ds_reg \$1 \$2/audiovol;
#X obj 212 470 kollabs/ds_reg \$1 \$2/onoff;
#X obj 212 490 kollabs/ds_reg \$1 \$2/redmin;
#X obj 212 510 kollabs/ds_reg \$1 \$2/redcurve;
#X obj 212 530 kollabs/ds_reg \$1 \$2/greenmin;
#X obj 212 550 kollabs/ds_reg \$1 \$2/greencurve;
#X obj 212 570 kollabs/ds_reg \$1 \$2/bluemin;
#X obj 212 590 kollabs/ds_reg \$1 \$2/bluecurve;
#X obj 212 610 kollabs/ds_reg \$1 \$2/cutoff;
#X obj 180 205 hradio 15 1 0 2 \$2/onoff \$2/onoff Off.On -5 -8 0 10
-258113 -1 -1 1;
#X obj 92 50 loadbang;
#X obj 378 141 bng 15 250 50 0 empty empty ? 17 7 0 10 -4032 -1 -1
;
#X obj 423 217 s pd-\$2-help;
#X msg 423 195 vis 1;
#N canvas 331 81 774 693 \$2-help 0;
#X obj 36 18 cnv 15 300 140 empty empty HELP:vs-ilda-gui 20 12 0 14
-4034 -66577 0;
#N canvas 0 23 450 300 HARDWARE 0;
#X text 19 26 Requires DC coupled \, 8 channel \, balanced audio interface
such as MOTU. For channel converter info see:;
#X text 18 60 https://github.com/ffd8/dac_ilda/raw/master/dac_ilda_adaptor.pdf
;
#X text 20 97 Or see "ilda-connections.png" in this library;
#X restore 158 515 pd HARDWARE REQUIREMENTS;
#N canvas 0 23 450 300 RGB 0;
#X text 39 68 RGB minimums and curves help you calibrate the brightness
of your laser to adjust point where diode turns on as well as avoid
total "whiteout" saturation.;
#X text 40 24 NOTE: this set of patches was tested on a KVANT Clubmax
2000 \, the given RGB values may be different on your laser!;
#X text 38 126 You can adjust the phase of modulating signals where
the colors come in \, by looking at the [vs-ilda-rgb] object inside
[vs-ilda-throw].;
#X text 36 181 The [vs-ilda] abstraction conatains a "scan-fail" subpatch
\, which analyzes the combined level of the X and Y axes. If that level
falls under a certain threshold in dB \, within the window size in
samples (compare with current sample rate to find time in ms) \, then
the RGB chanels are all shut off to prevent an unmoving laser beam
from posing a safety hazard.;
#X restore 158 560 pd RGB CALIBRATION;
#N canvas 0 23 450 300 IMAGE 0;
#X text 41 151 Use Rotation X Y Z controls to keystone \, flip \, and
align the laser image. Numbers are 0-360 degrees.;
#X text 41 21 Use Scale X Y controls to adjust the horizontal and vertical
size of the laser image. Numbers are in percent.;
#X text 41 61 Use Offset X Y controls to adjust the horizontal and
vertical position of the laser image. Numbers are in percent.;
#X text 41 114 Use Clip X Y controls to adjust the horizontal and vertical
limits of the laser image. Numbers are in percent.;
#X text 41 191 Use Cutoff Frequency control to apply filter to the
X Y signals before they are sent to the laser. This can offer some
basic protection for your laser galvos against sudden changes. A good
starting value would be 2K to 4K Hz \, dependong on your galvo speed
(20-40 kpps). Numbers are in Herz.;
#X restore 158 585 pd IMAGE CALIBRATION;
#N canvas 0 23 450 300 AUDIO 0;
#X text 31 51 Channels 7 and 8 of your audio interface give a stereo
mixdown of the X and Y channels \, amplitude modulated by the brightness
signal \, with a lowpass filter on the speed of the amplitude modulation
set by the Cutoff Frequency. The Audio Volume control adjusts the level
of this signal \, with numbers given in dB.;
#X restore 158 609 pd AUDIO OUTPUT;
#X text 113 486 READ THESE FOR MORE INFO:;
#N canvas 0 23 450 300 [VS-ILDA] 0;
#X text 58 45 1) X;
#X text 58 65 2) Y;
#X text 58 105 4) Red;
#X text 58 125 5) Green;
#X text 58 145 6) Blue;
#X text 58 165 7) Left Audio;
#X text 58 185 8) Right Audio;
#X text 27 21 Vector Synthesis ILDA channels:;
#X text 58 85 3) Brightness (not normally used);
#X restore 158 536 pd [VS-ILDA] OUTPUT CHANNELS;
#X text 44 177 INSTRUCTIONS FOR USE:;
#X text 74 203 Put one [vs-ilda-throw-gui] inside any patch you want
to send to your ILDA RGB laser. It will send the X \, Y \, brightness
\, and RGB values to the [vs-ilda-gui] abstraction. You can then switch
on and off those patches as needed.;
#X text 73 262 A single [vs-ilda-gui] is required to communicate with
your audio interface and from there to your laser. Put it in your master
patch. Use the same first creation argument to match up the [vs-ilda-throw-gui]
objects and the [vs-ilda-gui].;
#X text 77 328 EXAMPLE:;
#X text 110 354 [vs-ilda-throw-gui \$0 \$0-laserone];
#X text 110 374 [vs-ilda-throw-gui \$0 \$0-lasertwo];
#X text 110 394 [vs-ilda-throw-gui \$0 \$0-laserthree];
#X text 110 424 [vs-ilda-gui \$0 \$0-lasermaster];
#X text 375 582 Derek Holzer;
#X text 375 631 macumbista@gmail.com;
#X text 375 606 Santa Cruz de Tenerife May 2019;
#X restore 423 327 pd \$2-help;
#X obj 447 494 outlet~ x;
#X obj 508 494 outlet~ y;
#X obj 339 325 nbx 5 14 0 100 0 0 \$2/bright \$2/bright Bright 0 -8
0 10 -4034 -1 -1 100 256;
#X obj 212 630 kollabs/ds_reg \$1 \$2/bright;
#X obj 409 531 outlet switch;
#X obj 578 209 t b b b b b b b b b b b b b b b b b b b;
#X obj 578 324 pack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#X obj 528 349 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#X obj 788 251 f;
#X obj 420 54 r \$2/onoff;
#X obj 421 80 r \$2/redcurve;
#X obj 421 107 r \$2/greencurve;
#X obj 422 135 r \$2/bluecurve;
#X obj 423 169 r \$2/cutoff;
#X obj 571 494 outlet~ b;
#X connect 1 0 71 0;
#X connect 1 1 72 0;
#X connect 1 2 85 0;
#X connect 2 0 1 1;
#X connect 2 0 29 1;
#X connect 3 0 1 2;
#X connect 3 0 33 1;
#X connect 4 0 1 3;
#X connect 4 0 30 1;
#X connect 5 0 1 4;
#X connect 5 0 34 1;
#X connect 6 0 1 5;
#X connect 6 0 31 1;
#X connect 7 0 1 6;
#X connect 7 0 35 1;
#X connect 8 0 1 7;
#X connect 8 0 32 1;
#X connect 9 0 1 8;
#X connect 9 0 36 1;
#X connect 10 0 1 9;
#X connect 10 0 39 1;
#X connect 12 0 1 10;
#X connect 12 0 14 0;
#X connect 13 0 1 0;
#X connect 13 0 37 1;
#X connect 17 0 1 12;
#X connect 17 0 42 1;
#X connect 18 0 1 13;
#X connect 18 0 44 1;
#X connect 19 0 1 11;
#X connect 19 0 40 1;
#X connect 28 0 78 0;
#X connect 28 1 76 0;
#X connect 29 0 77 0;
#X connect 30 0 77 1;
#X connect 31 0 77 2;
#X connect 32 0 77 3;
#X connect 33 0 77 4;
#X connect 34 0 77 5;
#X connect 35 0 77 6;
#X connect 36 0 77 7;
#X connect 37 0 77 8;
#X connect 38 0 77 9;
#X connect 39 0 77 10;
#X connect 40 0 77 11;
#X connect 41 0 77 12;
#X connect 42 0 77 13;
#X connect 43 0 77 14;
#X connect 44 0 77 15;
#X connect 45 0 77 16;
#X connect 46 0 77 17;
#X connect 66 0 4 0;
#X connect 66 0 10 0;
#X connect 66 0 9 0;
#X connect 66 0 8 0;
#X connect 66 0 65 0;
#X connect 66 0 22 0;
#X connect 66 0 21 0;
#X connect 66 0 20 0;
#X connect 66 0 19 0;
#X connect 66 0 18 0;
#X connect 66 0 17 0;
#X connect 66 0 13 0;
#X connect 66 0 11 0;
#X connect 66 0 7 0;
#X connect 66 0 6 0;
#X connect 66 0 5 0;
#X connect 66 0 3 0;
#X connect 66 0 2 0;
#X connect 66 0 73 0;
#X connect 67 0 69 0;
#X connect 69 0 68 0;
#X connect 73 0 1 17;
#X connect 73 0 79 1;
#X connect 76 0 29 0;
#X connect 76 1 30 0;
#X connect 76 2 31 0;
#X connect 76 3 32 0;
#X connect 76 4 33 0;
#X connect 76 5 34 0;
#X connect 76 6 35 0;
#X connect 76 7 36 0;
#X connect 76 8 37 0;
#X connect 76 9 38 0;
#X connect 76 10 39 0;
#X connect 76 11 40 0;
#X connect 76 12 41 0;
#X connect 76 13 42 0;
#X connect 76 14 43 0;
#X connect 76 15 44 0;
#X connect 76 16 45 0;
#X connect 76 17 46 0;
#X connect 76 18 79 0;
#X connect 77 0 28 0;
#X connect 78 0 2 0;
#X connect 78 1 4 0;
#X connect 78 2 6 0;
#X connect 78 3 8 0;
#X connect 78 4 3 0;
#X connect 78 5 5 0;
#X connect 78 6 7 0;
#X connect 78 7 9 0;
#X connect 78 8 13 0;
#X connect 78 9 65 0;
#X connect 78 10 10 0;
#X connect 78 11 19 0;
#X connect 78 12 20 0;
#X connect 78 13 17 0;
#X connect 78 14 21 0;
#X connect 78 15 18 0;
#X connect 78 16 22 0;
#X connect 78 17 11 0;
#X connect 78 18 73 0;
#X connect 79 0 77 18;
#X connect 80 0 27 0;
#X connect 80 0 75 0;
#X connect 80 0 38 1;
#X connect 81 0 1 14;
#X connect 81 0 41 1;
#X connect 81 0 23 0;
#X connect 82 0 1 15;
#X connect 82 0 43 1;
#X connect 82 0 24 0;
#X connect 83 0 1 16;
#X connect 83 0 25 0;
#X connect 83 0 45 1;
#X connect 84 0 12 0;
#X connect 84 0 46 1;
#X coords 0 -1 1 1 302 250 1 100 100;