bulbs.pd 3.46 KB
Newer Older
1
2
#N struct bulb float x float y float r float g float b float a float
s;
Jonathan Wilkes's avatar
Jonathan Wilkes committed
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
#N canvas 199 68 650 527 10;
#X obj 350 170 random 255;
#X obj 420 170 random 255;
#X obj 490 170 random 255;
#X obj 350 134 trigger bang bang bang anything;
#X obj 350 240 set bulb r g b a s;
#X scalar bulb 37 89 50 26 143 1 2 \;;
#X scalar bulb 207 89 141 98 156 1 2 \;;
#X scalar bulb 117 89 221 41 109 1 2 \;;
#X scalar bulb 37 189 147 213 194 1 2 \;;
#X scalar bulb 204 187 147 213 194 1 2 \;;
#X scalar bulb 117 189 162 230 120 1 2 \;;
#X scalar bulb 37 289 107 163 157 1 2 \;;
#X scalar bulb 207 289 2 197 206 1 2 \;;
#X scalar bulb 117 289 125 4 42 1 2 \;;
#X scalar bulb 287 289 22 49 33 1 2 \;;
#X scalar bulb 467 289 105 204 27 1 2 \;;
#X scalar bulb 377 289 224 181 45 1 2 \;;
#X scalar bulb 37 -11 36 28 222 1 2 \;;
#X scalar bulb 207 -11 122 187 225 1 2 \;;
#X scalar bulb 117 -11 103 152 169 1 2 \;;
#X obj 399 112 set bulb s a;
#X obj 350 211 pack f f f 0.3 5;
#X msg 399 91 2 1 \$1;
#X text 76 426 Light Bulbs;
#X text 76 426 ___________;
#X text 76 446 This is just a quick demo to show enter/leave functionality
for scalars.;
#X obj 350 66 route mouseover mouseout;
#X obj 564 168 unpack p;
#N canvas 231 69 538 264 bulb 0;
#X obj 87 77 loadbang;
35
36
#X obj 87 21 struct bulb float x float y float r float g float b float
a float s;
Ivica Bukvic's avatar
Ivica Bukvic committed
37
#N canvas 537 133 450 300 (subpatch) 0;
38
#X obj 34 79 loadbang;
Ivica Bukvic's avatar
Ivica Bukvic committed
39
#X obj 34 125 draw path M 100 100 m -43.3013 21.6987 a 50 50 0 1 1
40
41
86.6025 0 c -6 12 -23.3013 18.3013 -23.3013 33.3013 a 50 50 0 0 1 -40
0 c 0 -15 -17.3013 -21.3013 -23.3013 -33.3013 z;
Ivica Bukvic's avatar
Ivica Bukvic committed
42
#X obj 34 174 draw path M 100 100 m -20 82 a 50 50 0 0 0 40 -2 l 0
43
3 -10 8 -20 0 -10 -8 z;
Ivica Bukvic's avatar
Ivica Bukvic committed
44
#X obj 34 210 draw path M 100 100 m -20 55 a 50 50 0 0 0 40 -2 l 0
45
27 a -50 50 0 0 1 -40 2 z;
Ivica Bukvic's avatar
Ivica Bukvic committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#X obj 34 246 draw path M 100 100 m -20 53 a 50 50 0 0 0 40 0;
#X obj 34 269 draw path M 100 100 m -20 82 a 50 50 0 0 0 40 0;
#X obj 34 292 draw path M 100 100 m -20 61.75 a 50 50 0 0 0 40 -2;
#X obj 34 315 draw path M 100 100 m -20 70.75 a 50 50 0 0 0 40 -2;
#X obj 34 338 draw path M 100 100 m -20 79.75 a 50 50 0 0 0 40 -2;
#X obj 34 361 draw path M 100 100 m -20 55 a 50 50 0 0 0 40 -2;
#X obj 34 384 draw path M 100 100 m -20 64 a 50 50 0 0 0 40 -2;
#X obj 34 407 draw path M 100 100 m -20 73 a 50 50 0 0 0 40 -2;
#X obj 34 430 draw path M 100 100 m -20 82 a 50 50 0 0 0 40 -2;
#X obj 34 453 draw path M 100 100 m -20 57.25 a 50 50 0 0 0 40 -2;
#X obj 34 476 draw path M 100 100 m -20 66.25 a 50 50 0 0 0 40 -2;
#X obj 34 499 draw path M 100 100 m -20 75.25 a 50 50 0 0 0 40 -2;
#X obj 34 522 draw path M 100 100 m -20 59.5 a 50 50 0 0 0 40 -2;
#X obj 34 545 draw path M 100 100 m -20 68.5 a 50 50 0 0 0 40 -2;
#X obj 34 568 draw path M 100 100 m -20 77.5 a 50 50 0 0 0 40 -2;
#X obj 34 591 draw path M 100 100 m -43.3013 21.6987 a 50 50 0 1 1
62
63
86.6025 0 c -6 12 -23.3013 18.3013 -23.3013 33.3013 l 0 28 -10 8 -20
0 -10 -8 0 -28 c 0 -15 -17.3013 -21.3013 -23.3013 -33.3013 z;
Ivica Bukvic's avatar
Ivica Bukvic committed
64
65
66
#X msg 34 102 fill r g b a \, stroke-width s \, stroke r g b;
#X connect 0 0 20 0;
#X connect 20 0 1 0;
67
#X restore 88 133 draw group;
Jonathan Wilkes's avatar
Jonathan Wilkes committed
68
69
70
#X obj 88 154 outlet;
#X msg 88 98 transform scale 0.5 \, fill none \, stroke black \, mouseover
1 \, mouseout 1;
Ivica Bukvic's avatar
Ivica Bukvic committed
71
#X connect 0 0 4 0;
Jonathan Wilkes's avatar
Jonathan Wilkes committed
72
73
#X connect 2 0 3 0;
#X connect 4 0 2 0;
74
#X restore 350 42 pd bulb;
Jonathan Wilkes's avatar
Jonathan Wilkes committed
75
76
77
78
79
80
81
82
83
84
85
86
87
#X connect 0 0 21 0;
#X connect 1 0 21 1;
#X connect 2 0 21 2;
#X connect 3 0 0 0;
#X connect 3 1 1 0;
#X connect 3 2 2 0;
#X connect 3 3 27 0;
#X connect 21 0 4 0;
#X connect 22 0 20 0;
#X connect 26 0 3 0;
#X connect 26 1 22 0;
#X connect 27 0 4 5;
#X connect 28 0 26 0;