THE POPULAR DEMO
popular.dmt · 120 BPM · 48 s · 960×600
homagelongdemoscene
notes
An homage to fr-025 by Farbrausch (2003): a disco music video with a faceted mirror ball, beams, a reflective dance floor, a dancer, spinning vinyl and a neon city. All music, text and visuals are original.
| file | popular.dmt |
|---|---|
| duration | 0:48 |
| video | 960×600 · 30 fps · h264 + audio · 19 MB |
| song | 120 BPM · speed 6 · rpb 4 · 8 channels |
| loop | 0 |
| render | scale 2 · dither on · master 0.5 |
| uniforms | kickE clpE hatE stbE ldE glow scn cut tA hA hB hC zc |
| tags | homagelongdemoscene |
| source | 960 lines · 31 KB · download |
anatomy
22VM programs
9patterns
1palettes
41timeline events
6text / sample / texture
960source lines
10inst
2chan
1master
1frame
7pixel
1post
7fn
line composition
pixel 54%pattern 15%fn 14%inst 7%timeline 2%frame 2%post 2%chan 1%palette 1%text 1%master 0%title 0%song 0%order 0%pan 0%uniform 0%
play order
001122334455675234523488
order list · 24 entries
palettes
disco7 keys · lines 19–27
timeline
| at | event | value | source | |
|---|---|---|---|---|
| 0:00 | scEL | 0 | L31 | |
| 0:00 | glEL | 0.0 | L31 | |
| 0:00 | tAEL | 1.0 | L31 | |
| 0:00 | hAEL | 0.0 | L31 | |
| 0:00 | hBEL | 0.0 | L31 | |
| 0:00 | hCEL | 0.0 | L31 | |
| 0:02 | glEL | 0.25 | L32 | |
| 0:04 | glEL | 0.45 | L33 | |
| 0:04 | scEL | 3 | L34 | |
| 0:04 | glEL | 0.45 | L34 | |
| 0:08 | scEL | 1 | L35 | |
| 0:08 | glEL | 0.35 | L35 | |
| 0:08 | hAEL | 0.0 | L35 | |
| 0:09 | hAEL | 1.0 | L36 | |
| 0:14 | scEL | 2 | L37 | |
| 0:14 | glEL | 0.55 | L37 | |
| 0:14 | hAEL | 0.0 | L37 | |
| 0:18 | scEL | 5 | L38 | |
| 0:18 | glEL | 0.75 | L38 | |
| 0:18 | hAEL | 0.0 | L38 | |
| 0:18 | hCEL | 1.0 | L38 | |
| 0:22 | scEL | 1 | L39 | |
| 0:22 | glEL | 0.55 | L39 | |
| 0:22 | hCEL | 0.0 | L39 | |
| 0:23 | hAEL | 1.0 | L40 | |
| 0:26 | scEL | 4 | L41 | |
| 0:26 | glEL | 0.85 | L41 | |
| 0:26 | hAEL | 1.0 | L41 | |
| 0:30 | scEL | 6 | L42 | |
| 0:30 | glEL | 1.00 | L42 | |
| 0:30 | hAEL | 0.0 | L42 | |
| 0:31 | hBEL | 1.0 | L43 | |
| 0:34 | scEL | 6 | L44 | |
| 0:34 | glEL | 1.00 | L44 | |
| 0:38 | scEL | 6 | L45 | |
| 0:38 | hBEL | 0.0 | L45 | |
| 0:39 | hCEL | 1.0 | L46 | |
| 0:44 | scEL | 6 | L47 | |
| 0:44 | glEL | 1.00 | L47 | |
| 0:44 | tAEL | 1.0 | L47 | |
| 0:44 | hCEL | 0.0 | L47 |
Event times are derived from the order list, pattern lengths, BPM and RPB.
resources
| kind | name | info | value |
|---|---|---|---|
| text | ttl | 16 | THE POPULAR DEMO |
| text | crd | 48 | AFTER FR-025: THE POPULAR DEMO / FARBRAUSCH 2003 |
| text | capA | 15 | EVERYBODY SHINE |
| text | capB | 18 | DANCE TILL SUNRISE |
| text | capC | 22 | THE CITY MOVES WITH US |
| text | scl | 239 | MOVE YOUR FEET THE BEAT IS CALLING ... SHINE LIKE A MIRROR BALL ... RIDE THE RHYTHM THROUGH THE CITY LIGHTS ... KEEP ON DANCING TILL THE SUN COMES UP ... ONE VM SIX PROGRAMS NO WAITING ROOMS ... THE MIRROR NEVER STOPS… |
source
1# @description An homage to fr-025 by Farbrausch (2003): a disco music video with a faceted mirror ball, beams, a reflective dance floor, a dancer, spinning vinyl and a neon city. All music, text and visuals are original.
2# @tags homage, demoscene
3# popular.dmt - THE POPULAR DEMO: a study/homage of fr-025 by Farbrausch (2003).
4# Disco music video: faceted mirror ball, beams, reflective dance floor, dancer,
5# spinning vinyl, neon city, scroller. 120 BPM filtered-house/disco, 48 s.
6# All music, text and visuals are original.
7title THE POPULAR DEMO
8song bpm=120 speed=6 rpb=4 channels=8 loop=0 volume=0.5 scale=2 dither=1
9order 0 0 1 1 2 2 3 3 4 4 5 5 6 7 5 2 3 4 5 2 3 4 8 8
10pan 0.5 0.55 0.42 0.46 0.5 0.38 0.6 0.55
12text ttl "THE POPULAR DEMO"
13text crd "AFTER FR-025: THE POPULAR DEMO / FARBRAUSCH 2003"
14text capA "EVERYBODY SHINE"
15text capB "DANCE TILL SUNRISE"
16text capC "THE CITY MOVES WITH US"
17text scl " MOVE YOUR FEET THE BEAT IS CALLING ... SHINE LIKE A MIRROR BALL ... RIDE THE RHYTHM THROUGH THE CITY LIGHTS ... KEEP ON DANCING TILL THE SUN COMES UP ... ONE VM SIX PROGRAMS NO WAITING ROOMS ... THE MIRROR NEVER STOPS SPINNING ... "
19palette disco {
20 0.00 0.02 0.01 0.07
21 0.22 0.18 0.05 0.36
22 0.42 0.62 0.10 0.66
23 0.58 1.00 0.16 0.74
24 0.72 0.12 0.80 1.00
25 0.86 1.00 0.76 0.28
26 1.00 1.00 0.96 0.88
27}
29# ---------------------------------------------------------------- timeline
30timeline {
31 0:00 scEL=0 glEL=0.0 tAEL=1.0 hAEL=0.0 hBEL=0.0 hCEL=0.0
32 1:00 glEL=0.25
33 2:00 glEL=0.45
34 2:00 scEL=3 glEL=0.45
35 4:00 scEL=1 glEL=0.35 hAEL=0.0
36 4:04 hAEL=1.0
37 7:00 scEL=2 glEL=0.55 hAEL=0.0
38 9:00 scEL=5 glEL=0.75 hAEL=0.0 hCEL=1.0
39 11:00 scEL=1 glEL=0.55 hCEL=0.0
40 11:04 hAEL=1.0
41 13:00 scEL=4 glEL=0.85 hAEL=1.0
42 15:00 scEL=6 glEL=1.00 hAEL=0.0
43 15:04 hBEL=1.0
44 17:00 scEL=6 glEL=1.00
45 19:00 scEL=6 hBEL=0.0
46 19:04 hCEL=1.0
47 22:00 scEL=6 glEL=1.00 tAEL=1.0 hCEL=0.0
48}
49# ---------------------------------------------------------------- instruments
50# ch0 kick ch1 clap ch2 hat ch3 bass ch4 stab ch5 choir ch6 lead ch7 fx
51inst kick {
52 f = 46 + 540 * exp(-t * 40)
53 $kp = $kp + f / sr
54 body = sin($kp * tau) * exp(-t * 7.5)
55 punch = hp(noise(), 3200) * exp(-t * 110) * 0.45
56 out(dist(body * 1.75 + punch, 1.3) * exp(-t * 2.2) * 0.84)
57}
58inst clap {
59 g = exp(-t * 38) + (1 - step(0.004, t)) * 0.85
60 g = g + 0.7 * exp(-pow((t - 0.012) / 0.0018, 2)) + 0.5 * exp(-pow((t - 0.023) / 0.0018, 2))
61 s = svf(noise(), 1250, 0.5)
62 bp = r2
63 out(hp(bp, 700) * g * 0.6 + hp(noise(), 3600) * exp(-t * 30) * 0.16)
64}
65inst hat {
66 out(hp(noise(), 7600) * exp(-t * (46 + 300 * (1 - vel))) * 0.3)
67}
68inst ohat {
69 s = hp(noise(), 6800) + sin(ph * tau * 2.4) * exp(-t * 30) * 0.10
70 out(s * exp(-t * (11 + 20 * (1 - vel))) * 0.24)
71}
72inst bas {
73 e = env(0.004, 0.10, 0.55, 0.05)
74 s = bsqr(ph, 0.5, freq) * 0.75 + bsaw(ph, freq) * 0.4
75 s = lp(s, 340 + 2300 * e * e)
76 out(dist(s, 1.2) * e * 0.56)
77}
78inst stab nna=continue {
79 e = env(0.006, 0.075, 0.40, 0.11)
80 g = 0
81 repeat k 3 {
82 fk = 1.0
83 if (k == 1) { fk = pow(2, (3 + p0) / 12) }
84 if (k == 2) { fk = 1.4983 }
85 g = g + bsaw(ph * fk + 0.02 * k, freq * fk) + bsaw(ph * 1.004 * fk, freq * 0.997 * fk) * 0.45
86 }
87 s = svf(g * 0.72, 470 + 5400 * e, 0.34)
88 out(dist(s, 1.24) * e * 0.33)
89}
90inst choir nna=continue {
91 vc = 1 + 0.005 * sin(t * 4.7) * min(1, t * 1.6)
92 $cp = $cp + freq * vc / sr
93 s = saw($cp) + saw($cp * 1.007) * 0.7 + saw($cp * 0.501) * 0.45
94 a1 = svf(s, 610 + 150 * sin(t * 0.43), 0.55)
95 a1 = r2
96 a2 = svf(s, 1180 + 210 * sin(t * 0.31), 0.55)
97 a2 = r2
98 a3 = svf(s, 2450, 0.62)
99 a3 = r2
100 e = env(0.25, 0.45, 0.85, 0.65)
101 out((a1 + a2 * 0.6 + a3 * 0.22) * e * 0.42)
102}
103inst lead nna=continue {
104 vc = 1 + 0.006 * sin(t * 6.4) * min(1, t * 4)
105 $ld = $ld + freq * vc / sr
106 e = env(0.008, 0.20, 0.66, 0.26)
107 s = bsqr($ld, 0.42, freq) + bsaw($ld * 1.002, freq) * 0.6 + sin($ld * tau * 2.001) * 0.13
108 s = svf(s, 850 + 5200 * e, 0.28)
109 out(dist(s, 1.15) * e * 0.31)
110}
111inst crash {
112 out(hp(noise(), 4200) * exp(-t * 2.3) * vel * 0.3 + hp(noise(), 1600) * exp(-t * 1.5) * vel * 0.12)
113}
114inst riser {
115 ris = min(t / 1.85, 1)
116 out(hp(noise(), 350 + 5300 * ris * ris) * ris * ris * 0.26)
117}
119chan 5 {
120 w = verb(x, 0.88, 0.4)
121 out(x * 0.7 + w * 0.55)
122}
123chan 6 {
124 d = dly(x, 0.375, 0.42)
125 w = verb(x, 0.8, 0.5)
126 out(x * 0.85 + d * 0.3 + w * 0.12)
127}
128master {
129 w = verb(l * 0.55 + r * 0.55, 0.8, 0.5)
130 out(dist(l + w * 0.16, 1.12), dist(r + w * 0.16, 1.12))
131}
133# 1 kick 2 clap 3 hat 4 ohat 5 bas 6 stab 7 choir 8 lead 9 crash 10 riser
134# P0 intro Dm
135pattern 0 rows=16 {
136 . | . | . | . | D-4 6 20 S00 | D-3 7 2A S00 | . | C-4 9 30
137 . | . | C-3 3 18 | . | . | . | . | .
138 . | . | C-3 3 18 | . | . | . | . | .
139 . | . | C-3 3 18 | . | . | . | . | .
140 . | . | C-3 3 18 | . | D-4 6 16 S00 | . | . | .
141 . | . | C-3 3 18 | . | . | . | . | .
142 . | . | C-3 3 18 | . | . | . | . | .
143 . | . | C-3 3 18 | . | D-4 6 18 S00 | . | . | .
144 . | . | C-3 3 18 | . | . | . | . | .
145 . | . | C-3 3 1C | . | . | . | . | .
146 . | . | C-3 3 18 | . | . | . | . | .
147 . | . | C-3 3 1C | . | . | . | . | .
148 . | . | C-3 3 18 | . | D-4 6 18 S00 | . | . | .
149 . | . | C-3 3 18 | . | . | . | . | .
150 . | . | C-3 3 28 | . | . | . | . | .
151 . | . | C-3 3 24 | . | . | . | . | .
152}
153# P1 groove Dm
154pattern 1 rows=16 {
155 C-2 1 3A | . | . | D-2 5 34 | D-4 6 24 S00 | . | . | .
156 . | . | C-3 3 24 | D-3 5 2E | . | . | . | .
157 C-2 1 38 | C-3 2 30 | C-3 3 20 | D-2 5 34 | . | . | . | .
158 . | . | C-3 3 24 | D-3 5 2E | D-4 6 1C S00 | . | . | .
159 C-2 1 38 | . | C-3 3 20 | D-2 5 34 | . | . | . | .
160 . | . | C-3 3 28 | D-3 5 2E | . | . | . | .
161 C-2 1 36 | C-3 2 30 | C-3 3 20 | D-2 5 34 | . | . | . | .
162 . | . | C-3 3 28 | D-3 5 2E | . | . | . | .
163}
164# P2 groove Bb (choir + stabs full)
165pattern 2 rows=16 {
166 C-2 1 3A | . | . | A#0 5 34 | A#3 6 2A SFF | A#2 7 2A SFF | . | .
167 . | . | C-3 3 24 | A#2 5 2E | . | . | . | .
168 C-2 1 38 | C-3 2 30 | C-3 3 20 | A#0 5 34 | . | . | . | .
169 . | . | C-3 3 24 | A#2 5 2E | A#3 6 1C SFF | . | . | .
170 C-2 1 38 | . | C-3 3 20 | A#0 5 34 | . | . | . | .
171 . | . | C-3 3 28 | A#2 5 2E | . | . | . | .
172 C-2 1 36 | C-3 2 30 | C-3 3 20 | A#0 5 34 | . | . | . | .
173 . | . | C-3 3 28 | F-2 5 2E | . | . | . | .
174}
175# P3 chorus F (lead hook 1)
176pattern 3 rows=16 {
177 C-2 1 3A | . | . | F-2 5 34 | F-4 6 2A SFF | F-3 7 2A SFF | D-5 8 30 | .
178 . | . | C-3 3 24 | F-3 5 2E | . | . | F-5 8 2C | .
179 C-2 1 38 | C-3 2 30 | C-3 3 20 | F-2 5 34 | . | . | A-5 8 2C | .
180 . | . | C-3 3 24 | F-3 5 2E | F-4 6 1C SFF | . | G-5 8 2C | .
181 C-2 1 38 | . | C-3 3 20 | F-2 5 34 | . | . | F-5 8 2C | .
182 . | . | C-3 3 28 | F-3 5 2E | . | . | D-5 8 2C | .
183 C-2 1 36 | C-3 2 30 | C-3 3 20 | F-2 5 34 | . | . | C-5 8 2C | .
184 . | . | C-3 3 28 | F-3 5 2E | F-4 6 22 SFF | . | D-5 8 2C | .
185 . | . | C-3 3 18 | . | . | . | . | .
186 . | . | C-3 3 1C | . | . | . | . | .
187 . | . | C-3 3 18 | . | . | . | . | .
188 . | . | C-3 3 1C | . | . | . | . | .
189 . | . | C-3 3 18 | . | . | . | . | .
190 . | . | C-3 3 18 | . | . | . | . | .
191 . | . | C-3 3 28 | . | . | . | . | .
192 . | . | C-3 3 24 | . | . | . | . | .
193}
194# P4 chorus C (lead hook 2)
195pattern 4 rows=16 {
196 C-2 1 3A | . | . | C-2 5 34 | C-4 6 2A SFF | C-3 7 2A SFF | A-5 8 30 | .
197 . | . | C-3 3 24 | C-3 5 2E | . | . | F-5 8 2C | .
198 C-2 1 38 | C-3 2 30 | C-3 3 20 | C-2 5 34 | . | . | D-5 8 2C | .
199 . | . | C-3 3 24 | C-3 5 2E | C-4 6 1C SFF | . | C-5 8 2C | .
200 C-2 1 38 | . | C-3 3 20 | C-2 5 34 | . | . | A-4 8 2C | .
201 . | . | C-3 3 28 | C-3 5 2E | . | . | C-5 8 2C | .
202 C-2 1 36 | C-3 2 30 | C-3 3 20 | C-2 5 34 | . | . | D-5 8 2C | .
203 . | . | A-3 4 28 | C-3 5 2E | C-4 6 22 SFF | . | F-5 8 2C | .
204 . | . | C-3 3 18 | . | . | . | . | .
205 . | . | C-3 3 1C | . | . | . | . | .
206 . | . | C-3 3 18 | . | . | . | . | .
207 . | . | C-3 3 1C | . | . | . | . | .
208 . | . | C-3 3 18 | . | . | . | . | .
209 . | . | C-3 3 18 | . | . | . | . | .
210 . | . | C-3 3 28 | . | . | . | . | .
211 . | . | C-3 3 24 | . | . | . | . | .
212}
213# P5 Dm full (reprise + finale bar)
214pattern 5 rows=16 {
215 C-2 1 3C | . | . | D-2 5 36 | D-4 6 2E S00 | D-3 7 2C S00 | D-6 8 28 | .
216 . | . | C-3 3 24 | D-3 5 30 | . | . | A-5 8 2A | .
217 C-2 1 3C | C-3 2 32 | C-3 3 20 | D-2 5 36 | . | . | F-5 8 2A | .
218 . | . | C-3 3 24 | D-3 5 30 | D-4 6 1A S00 | . | D-5 8 2A | .
219 C-2 1 3C | . | C-3 3 20 | D-2 5 36 | . | . | A-5 8 2A | .
220 . | . | C-3 3 28 | D-3 5 30 | D-4 6 20 S00 | . | F-5 8 2A | .
221 C-2 1 3A | C-3 2 32 | C-3 3 20 | D-2 5 36 | . | . | D-5 8 2A | .
222 . | . | A-3 4 28 | D-3 5 30 | D-4 6 2A S00 | . | A-5 8 2A | .
223 . | . | C-3 3 18 | . | . | . | . | .
224 . | . | C-3 3 1C | . | . | . | . | .
225 . | . | C-3 3 18 | . | . | . | . | .
226 . | . | C-3 3 1C | . | . | . | . | .
227 . | . | C-3 3 18 | . | . | . | . | .
228 . | . | C-3 3 18 | . | . | . | . | .
229 . | . | C-3 3 28 | . | . | . | . | .
230 . | . | C-3 3 24 | . | . | . | . | .
231}
232# P6 break Dm (calm)
233pattern 6 rows=16 {
234 C-2 1 35 | . | . | D-2 5 28 | D-4 6 2C S00 | D-3 7 28 S00 | . | C-4 9 24
235 . | . | C-3 3 18 | . | . | . | . | .
236 . | . | C-3 3 18 | . | . | . | . | .
237 . | . | C-3 3 18 | . | . | . | . | .
238 . | C-3 2 1A | C-3 3 1C | D-2 5 20 | . | . | . | .
239 . | . | C-3 3 18 | . | . | . | . | .
240 . | . | C-3 3 18 | . | D-4 6 22 S00 | . | . | .
241 . | . | C-3 3 1E | . | . | . | . | .
242}
243# P7 break Dm (kick + riser + clap roll)
244pattern 7 rows=16 {
245 . | . | . | D-2 5 24 | D-4 6 28 S00 | D-3 7 24 S00 | . | C-4 10 30
246 . | . | . | . | . | . | . | .
247 C-2 1 34 | . | . | . | . | . | . | .
248 . | . | . | . | . | . | . | .
249 C-2 1 34 | . | . | . | . | . | . | .
250 . | . | . | . | . | . | . | .
251 C-2 1 34 | . | . | . | . | . | . | .
252 . | C-3 2 0A | . | . | . | . | . | .
253 C-2 1 32 | C-3 2 0E | . | D-2 5 20 | . | . | . | .
254 . | C-3 2 12 | . | . | . | . | . | .
255 . | C-3 2 16 | . | . | . | . | . | .
256 . | C-3 2 1C | . | . | . | . | . | .
257 C-2 1 30 | C-3 2 22 | . | . | . | . | . | .
258 . | C-3 2 26 | . | . | . | . | . | .
259 . | C-3 2 2C | . | . | . | . | . | .
260 . | C-3 2 32 | . | off 5 20 | . | . | . | .
261}
262# P8 outro Dm (final chord rings)
263pattern 8 rows=16 {
264 C-2 1 3A | . | . | D-2 5 30 | D-4 6 30 S00 | D-3 7 30 S00 | . | C-4 9 2C
265 . | . | C-3 3 20 | D-3 5 2C | . | . | . | .
266 C-2 1 30 | C-3 2 26 | C-3 3 18 | D-2 5 2C | . | . | . | .
267 . | . | C-3 3 18 | D-3 5 2A | . | . | . | .
268 . | . | C-3 3 18 | . | . | . | . | .
269 . | . | C-3 3 18 | D-3 5 24 | . | . | . | .
270 . | . | C-3 3 18 | . | . | . | . | .
271 . | . | C-3 3 18 | . | . | . | . | .
272 . | . | C-3 3 18 | . | . | . | . | .
273 . | . | C-3 3 14 | . | . | . | . | .
274 . | . | C-3 3 14 | . | . | . | . | .
275 . | . | C-3 3 10 | . | . | . | . | .
276 . | . | C-3 3 0C | . | . | . | . | .
277 . | . | C-3 3 0C | . | . | . | . | .
278 . | . | C-3 3 08 | . | off 6 20 | off 7 20 | . | .
279 . | . | . | off 5 14 | off 6 14 | off 7 14 | . | .
280}
282# ------------------------------------------------------------------ visuals
283uniform kickE clpE hatE stbE ldE glow scn cut tA hA hB hC zc
285fn textline(px, s, pp, py, sz) {
286 n = strlen(s)
287 cx = (px - pp) / sz
288 cy = (py - v) / sz
289 aq = floor(cx)
290 gm = glyph(str(s, aq), fract(cx), fract(cy))
291 return gm * step(0, cx) * step(cx, n) * step(0, cy) * step(cy, 1)
292}
294fn scroller(px, s, py, sz, speed) {
295 per = (strlen(s) + 14) * sz
296 p0 = 1.7 * aspect - fract(time * speed / per) * per
297 a1 = textline(px, s, p0, py, sz)
298 b1 = textline(px, s, p0 + per, py, sz)
299 return max(a1, b1)
300}
302fn segd(px, py, ax, ay, bx, by) {
303 gx = bx - ax
304 gy = by - ay
305 dd = gx * gx + gy * gy + 0.000001
306 tq = clamp(((px - ax) * gx + (py - ay) * gy) / dd, 0, 1)
307 return len(px - (ax + gx * tq), py - (ay + gy * tq))
308}
310fn figure(px, py, cxx, cyy, sk, pha) {
311 qx = (px - cxx) / sk
312 qy = (py - cyy) / sk
313 d1 = len(qx, qy - 0.62) - 0.09
314 d2 = segd(qx, qy, 0, 0.26, 0, 0.50) - 0.075
315 d3 = segd(qx, qy, -0.06, 0.47, -0.27, 0.58 + 0.20 * sin(pha)) - 0.045
316 d4 = segd(qx, qy, 0.06, 0.47, 0.27, 0.58 - 0.20 * sin(pha)) - 0.045
317 d5 = segd(qx, qy, -0.035, 0.24, -0.085 + 0.07 * sin(pha), 0.0) - 0.05
318 d6 = segd(qx, qy, 0.035, 0.24, 0.085 - 0.07 * sin(pha), 0.0) - 0.05
319 m1 = min(d1, d2)
320 m1 = min(m1, d3)
321 m1 = min(m1, d4)
322 m1 = min(m1, d5)
323 m1 = min(m1, d6)
324 return m1 * sk
325}
327fn drawDancer(px, py, cxx, cyy, sk, pha, intens) {
328 qx = (px - cxx) / sk
329 qy = (py - cyy) / sk
330 d1 = len(qx, qy - 0.62) - 0.09
331 d2 = segd(qx, qy, 0, 0.26, 0, 0.50) - 0.075
332 d3 = segd(qx, qy, -0.06, 0.47, -0.27, 0.58 + 0.20 * sin(pha)) - 0.045
333 d4 = segd(qx, qy, 0.06, 0.47, 0.27, 0.58 - 0.20 * sin(pha)) - 0.045
334 d5 = segd(qx, qy, -0.035, 0.24, -0.085 + 0.07 * sin(pha), 0.0) - 0.05
335 d6 = segd(qx, qy, 0.035, 0.24, 0.085 - 0.07 * sin(pha), 0.0) - 0.05
336 m1 = min(d1, d2)
337 m1 = min(m1, d3)
338 m1 = min(m1, d4)
339 m1 = min(m1, d5)
340 m1 = min(m1, d6)
341 m1 = m1 * sk
342 fillr = smooth(0.006, -0.006, m1)
343 cxg = floor(qx * 8)
344 cyg = floor(qy * 12)
345 chk = fract((cxg + cyg) * 0.5)
346 chk = step(0.5, chk)
347 hot = 0.55 + 0.45 * glow
348 colr = mix(0.98, 0.05, chk) * hot
349 colg = mix(0.10, 0.88, chk) * hot
350 colb = mix(0.60, 0.95, chk) * hot
351 cmul(1 - 0.90 * fillr * intens)
352 cadd(fillr * colr * intens, fillr * colg * intens, fillr * colb * intens)
353 rim = fillr * (1 - fillr) * 4
354 cadd(rim * 0.20 * intens, rim * 0.85 * intens, rim * 0.40 * intens)
355 rw = rim * step(0, px - cxx) * intens
356 cadd(rw * 0.95, rw * 0.55, rw * 0.15)
357}
359fn beams(px, py, bxx, byy, ity) {
360 pa = atan2(px - bxx, byy - py)
361 dw = step(0.0, byy - py)
362 repeat k 8 {
363 aM = (k - 3.5) * 0.36 + 0.25 * sin(time * 0.31 + k * 1.97)
364 wd = 0.045 + 0.020 * hash(k * 13.3)
365 dp2 = abs(pa - aM)
366 wdge = 1 - smooth(wd, wd * 1.6, dp2)
367 core = pow(max(0, 1 - dp2 / wd), 2)
368 fl = 0.35 + 0.65 * hash(k * 7.7 + floor(time * 5.5))
369 am = ity * dw * fl * 0.32 * (0.25 + 0.75 * min(1, kickE + 0.55 * clpE))
370 g1 = wdge * 0.20 + core * 0.80
371 cik = k % 4
372 r1c = 1.0
373 g1c = 1.0
374 b1c = 1.0
375 if (cik == 0) { r1c = 1.0; g1c = 0.15; b1c = 0.65 }
376 if (cik == 1) { r1c = 0.00; g1c = 0.85; b1c = 1.0 }
377 if (cik == 2) { r1c = 1.0; g1c = 0.85; b1c = 0.10 }
378 cadd(g1 * am * r1c, g1 * am * g1c, g1 * am * b1c)
379 }
380}
382fn orb(px, py, bxx, byy, rr, spin, uty) {
383 dx = (px - bxx) / rr
384 dy = (py - byy) / rr
385 rd = len(dx, dy)
386 insm = 1 - smooth(0.985, 1.005, rd)
387 if (insm > 0.01) {
388 nz = sqrt(max(1 - min(rd, 0.9995) ^ 2, 0.0004))
389 theta = atan2(nz, dx) / tau + spin
390 phi = atan2(dy, nz) / pi + 0.5
391 f1 = fract(theta * 20)
392 f2 = fract(phi * 14)
393 fi = floor(theta * 20)
394 fj = floor(phi * 14)
395 cost = cos(theta * tau)
396 sint = sin(theta * tau)
397 sinp = sin(phi * pi)
398 nx = cost * sinp
399 ny = sinp
400 nz2 = sint * sinp
401 l1 = max(0, nx * 0.45 + ny * 0.75 + nz2 * 0.25)
402 l2 = max(0, -nx * 0.40 + ny * 0.60 + nz2 * 0.30)
403 l3 = max(0, nx * 0.20 - ny * 0.50 + nz2 * 0.70)
404 spec = pow(l1, 7) * 0.18 + pow(l2, 12) * 0.09 + pow(l3, 18) * 0.05
405 edge = smooth(0.05, 0.12, min(f1, 1 - f1)) * smooth(0.05, 0.12, min(f2, 1 - f2))
406 base = 0.018 + 0.22 * l1
407 panel = base * mix(0.35, 1.0, edge)
408 fh = hash(fi * 37.0 + fj * 11.0)
409 pr = panel
410 pg = panel
411 pb = panel
412 if (fh > 0.80) { pr = panel * 1.0; pg = panel * 0.25; pb = panel * 0.70 }
413 if (fh < 0.18) { pr = panel * 0.10; pg = panel * 0.75; pb = panel * 1.0 }
414 if (fh > 0.35 && fh < 0.50) { pr = panel * 1.0; pg = panel * 0.85; pb = panel * 0.15 }
415 kk = insm * uty
416 cadd(kk * pr + spec * kk, kk * pg + spec * kk * 0.9, kk * pb + spec * kk * 0.8)
417 }
418 halo = exp(-(rd - 1) * 12) * step(1, rd) * 0.06 * uty
419 cadd(halo, halo * 0.95, halo * 1.0)
420}
422frame {
423 kickE = exp(-trig(0) * 11) * step(0.3, vel(0))
424 clpE = exp(-trig(1) * 14)
425 hatE = exp(-trig(2) * 42)
426 stbE = exp(-trig(4) * 7)
427 ldE = exp(-trig(6) * 4)
428 glow = evtl(glEL)
429 scn = evt(scEL)
430 pv = $scns
431 $scns = scn
432 cut = step(0.5, abs(scn - pv))
433 tA = evtl(tAEL)
434 hA = evtl(hAEL)
435 hB = evtl(hBEL)
436 hC = evtl(hCEL)
437 zc = 1.0
438 select(scn)
439}
441# scene 0: title + mirror ball
442pixel open {
443 rgb(0, 0, 0)
444 beams(u, v, 0, 0.42, 0.55)
445 orb(u, v, 0, 0.42, 0.42, time * 0.3, 0.70)
446 ttc = textline(u, ttl, -1.42, 0.28, 0.18) * tA
447 cadd(ttc * 1.1, ttc * 0.95, ttc * 0.55)
448 n2 = strlen(crd)
449 crc = textline(u, crd, -n2 * 0.0275, -0.18, 0.055)
450 cadd(crc * 0.7, crc * 0.75, crc * 0.8)
451 sc = scroller(u, scl, -0.72, 0.070, 1.2)
452 cadd(sc * 0.70, sc * 0.92, sc * 0.82)
453}
455# scene 1: perspective disco hall
456pixel hall {
457 rgb(0, 0, 0)
458 camY = 0.55
459 ceilY = 1.45
460 roomW = 3.6
461 farZ = 6.0
462 tf = 1000
463 if (v < 0) { tf = camY / (-v + 0.0001) }
464 tc = 1000
465 if (v > 0) { tc = (ceilY - camY) / (v + 0.0001) }
466 tb = farZ
467 ts = 1000
468 au = abs(u)
469 if (au > 0.0001) { ts = (roomW * 0.5) / au }
470 # floor
471 if (tf < tc && tf < tb && tf < ts) {
472 xw = u * tf
473 zw = tf
474 tile = 1.0
475 ix = floor(xw / tile)
476 iz = floor(zw / tile)
477 ck = step(0.5, fract((ix + iz) * 0.5))
478 fx = fract(xw)
479 fz = fract(zw)
480 gr = min(min(fx, 1 - fx), min(fz, 1 - fz))
481 grout = smooth(0.0, 0.10, gr)
482 c1r = 0.48
483 c1g = 0.03
484 c1b = 0.32
485 c2r = 0.00
486 c2g = 0.42
487 c2b = 0.50
488 tr = mix(c1r, c2r, ck) * grout
489 tg = mix(c1g, c2g, ck) * grout
490 tb2 = mix(c1b, c2b, ck) * grout
491 pulse = step(0.90, hash(ix * 13.1 + iz * 7.7)) * (0.5 + 0.5 * sin(beat * 3.14 + ix + iz)) * 0.18
492 tr = tr + pulse
493 tg = tg + pulse * 0.2
494 tb2 = tb2 + pulse * 0.4
495 rgb(tr, tg, tb2)
496 }
497 # ceiling grid
498 if (tc < tf && tc < tb && tc < ts) {
499 xw = u * tc
500 zw = tc
501 tile = 0.9
502 ix = floor(xw / tile)
503 iz = floor(zw / tile)
504 fx = fract(xw)
505 fz = fract(zw)
506 gr = min(min(fx, 1 - fx), min(fz, 1 - fz))
507 grid = exp(-pow(gr * 22, 2))
508 lit = 0.35 + 0.65 * (0.5 + 0.5 * sin(beat * 3.14 + ix * 2.0 + iz * 1.5))
509 rgb(grid * 0.14 * lit, grid * 0.11 * lit, grid * 0.18 * lit)
510 }
511 # back wall
512 if (tb < tf && tb < tc && tb < ts) {
513 xw = u * tb
514 yw = camY - v * tb
515 sx = floor(xw * 0.7)
516 sy = floor(yw * 2.5)
517 fh = hash(sx * 13.1 + sy * 7.7 + floor(beat) * 3.1)
518 lit = (0.35 + 0.65 * (0.5 + 0.5 * sin(beat * 3.14 + sx * 2.1 + sy))) * step(0.45, fh)
519 ci = floor(fh * 3)
520 if (ci == 0) { rgb(lit * 0.95, lit * 0.08, lit * 0.55) }
521 if (ci == 1) { rgb(lit * 0.05, lit * 0.78, lit * 0.95) }
522 if (ci == 2) { rgb(lit * 0.95, lit * 0.85, lit * 0.10) }
523 }
524 # side walls
525 if (ts < tf && ts < tc && ts < tb) {
526 zw = ts
527 yw = camY - v * ts
528 sx = floor(ts * 0.8)
529 sy = floor(yw * 3.0)
530 fh = hash(sx * 17.3 + sy * 11.7 + floor(beat) * 2.3)
531 lit = (0.30 + 0.70 * (0.5 + 0.5 * sin(beat * 3.14 + sx * 1.5 + sy))) * step(0.50, fh)
532 ci = floor(fh * 3)
533 if (ci == 0) { rgb(lit * 0.90, lit * 0.10, lit * 0.50) }
534 if (ci == 1) { rgb(lit * 0.05, lit * 0.70, lit * 0.95) }
535 if (ci == 2) { rgb(lit * 0.95, lit * 0.78, lit * 0.10) }
536 }
537 # perspective columns
538 repeat k 5 {
539 zc = 1.2 + k * 1.0 - fract(time * 0.25) * 1.0
540 if (zc > 0.2) {
541 vt = (ceilY - camY) / zc
542 vb = -camY / zc
543 rw = 0.17 / zc
544 uc = (-roomW * 0.5 + 0.28) / zc
545 ds = segd(u, v, uc, vt, uc, vb) - rw
546 if (ds < 0.01) {
547 hh = (v - vt) / (vb - vt + 0.0001)
548 qx = (u - uc) / rw
549 qy = hh
550 ck = step(0.5, fract((floor(qx * 3) + floor(qy * 8)) * 0.5))
551 band = 1 - smooth(0.10, 0.25, abs(fract(qy * 8) - 0.5))
552 lit = (0.08 + 0.45 * band) * (0.5 + 0.5 * sin(beat * 3.14 + k)) * exp(-zc * 0.10)
553 tr = mix(0.95, 0.00, ck)
554 tg = mix(0.05, 0.85, ck)
555 tb2 = mix(0.65, 0.95, ck)
556 cadd(lit * tr, lit * tg, lit * tb2)
557 }
558 uc = (roomW * 0.5 - 0.28) / zc
559 ds = segd(u, v, uc, vt, uc, vb) - rw
560 if (ds < 0.01) {
561 hh = (v - vt) / (vb - vt + 0.0001)
562 qx = (u - uc) / rw
563 qy = hh
564 ck = step(0.5, fract((floor(qx * 3) + floor(qy * 8)) * 0.5))
565 band = 1 - smooth(0.10, 0.25, abs(fract(qy * 8) - 0.5))
566 lit = (0.15 + 0.85 * band) * (0.5 + 0.5 * sin(beat * 3.14 + k + 1.0)) * exp(-zc * 0.08)
567 tr = mix(0.95, 0.00, ck)
568 tg = mix(0.05, 0.85, ck)
569 tb2 = mix(0.65, 0.95, ck)
570 cadd(lit * tr, lit * tg, lit * tb2)
571 }
572 }
573 }
574 # mirror ball and beams
575 orb(u, v, 0, 0.55, 0.22, time * 0.4, 0.55)
576 beams(u, v, 0, 0.55, 0.55)
577 # dancer reflection
578 dx0 = 0.25 * sin(time * 0.8)
579 pha = fract(beat) * tau
580 if (v < 0) {
581 rf = exp(v * 5.0)
582 drawDancer(u, -v, dx0, -0.52, 0.85, pha, 0.35 * rf)
583 }
584 drawDancer(u, v, dx0, -0.52, 0.85, pha, 0.85)
585 # scroller
586 sc = scroller(u, scl, -0.85, 0.070, 1.2)
587 cadd(sc * 0.70, sc * 0.92, sc * 0.82)
588 # caption
589 n1 = strlen(capA)
590 cpa = textline(u, capA, -n1 * 0.070, 0.38, 0.14) * hA
591 cadd(cpa * (0.9 + 0.35 * stbE), cpa * 0.55, cpa * 0.75)
592}
594# scene 2: chrome ring / vinyl with dancer inside
595pixel ring {
596 rgb(0, 0, 0)
597 camY = 0.6
598 if (v < 0) {
599 td = camY / (-v + 0.0001)
600 xw = u * td
601 zw = td
602 tile = 0.8
603 ix = floor(xw / tile)
604 iz = floor(zw / tile)
605 ck = step(0.5, fract((ix + iz) * 0.5))
606 fx = fract(xw)
607 fz = fract(zw)
608 gr = min(min(fx, 1 - fx), min(fz, 1 - fz))
609 grout = smooth(0.0, 0.10, gr)
610 c1r = 0.48
611 c1g = 0.03
612 c1b = 0.32
613 c2r = 0.00
614 c2g = 0.42
615 c2b = 0.50
616 tr = mix(c1r, c2r, ck) * grout
617 tg = mix(c1g, c2g, ck) * grout
618 tb2 = mix(c1b, c2b, ck) * grout
619 pulse = step(0.90, hash(ix * 13.1 + iz * 7.7)) * (0.5 + 0.5 * sin(beat * 3.14 + ix + iz)) * 0.12
620 rgb(tr + pulse, tg + pulse * 0.2, tb2 + pulse * 0.4)
621 }
622 cy = -0.05
623 R = 0.55
624 th = 0.06
625 dx = u
626 dy = v - cy
627 r = len(dx, dy)
628 dr = abs(r - R) - th
629 a = atan2(dy, dx)
630 if (dr < 0.02) {
631 env = 0.14 + 0.32 * pow(0.5 + 0.5 * sin(a * 16 - time * 0.8), 2)
632 grv = 0.5 + 0.5 * sin(r * 120 + a * 3)
633 spec = pow(max(0, cos(a - 0.6) * 0.5 + 0.5), 4) * 0.35
634 metal = env + grv * 0.06 + spec
635 cadd(metal * 0.75, metal * 0.68, metal * 0.76)
636 }
637 if (r < R - th) {
638 rgb(0.006, 0.003, 0.010)
639 }
640 beams(u, v, 0, cy + 0.55, 0.7)
641 fl = exp(-pow((v - cy - 0.55) * 10, 2)) * exp(-abs(u) * 2.5) * 0.2 * (0.5 + 0.7 * clpE)
642 cadd(fl, fl * 0.9, fl * 0.6)
643 dx0 = 0.03 * sin(time * 1.0)
644 pha = fract(beat) * tau
645 if (v < 0) {
646 rf = exp(v * 5.0)
647 drawDancer(u, -v, dx0, -0.45, 0.55, pha, 0.4 * rf)
648 }
649 drawDancer(u, v, dx0, -0.45, 0.55, pha, 1.0)
650 sc = scroller(u, scl, -0.78, 0.075, 1.3)
651 cadd(sc * 0.70, sc * 0.92, sc * 0.82)
652}
654# scene 3: close-up mirror ball
655pixel ball {
656 rgb(0, 0, 0)
657 beams(u, v, 0, 0.50, 0.55)
658 orb(u, v, 0, 0.50, 0.55, time * 0.35, 0.70)
659 if (v < -0.50) {
660 dep = -0.50 - v
661 wx = u * (2.5 + 8.0 * dep)
662 fx = fract(wx)
663 line = exp(-pow(min(fx, 1 - fx) * 14, 2)) * exp(-dep * 1.2)
664 lpus = 0.5 + 0.5 * sin(beat * 3.14 + floor(wx))
665 rgb(line * 0.35 * (0.4 + 0.6 * lpus), line * 0.08, line * 0.12)
666 }
667 beams(u, -v, 0, 0.50, 0.25 * exp(v * 2.0) * step(-0.5, v))
668}
670# scene 4: chrome stage + scrolling text
671pixel text {
672 rgb(0, 0, 0)
673 if (v < 0) {
674 td = 0.5 / (-v + 0.0001)
675 xw = u * td
676 zw = td
677 tile = 0.8
678 ix = floor(xw / tile)
679 iz = floor(zw / tile)
680 ck = step(0.5, fract((ix + iz) * 0.5))
681 fx = fract(xw)
682 fz = fract(zw)
683 gr = min(min(fx, 1 - fx), min(fz, 1 - fz))
684 grout = smooth(0.0, 0.10, gr)
685 tr = mix(0.95, 0.00, ck) * grout
686 tg = mix(0.05, 0.85, ck) * grout
687 tb2 = mix(0.65, 0.95, ck) * grout
688 rgb(tr, tg, tb2)
689 }
690 cy = 0.20
691 R = 0.70
692 th = 0.04
693 dx = u
694 dy = v - cy
695 r = len(dx, dy)
696 dr = abs(r - R) - th
697 a = atan2(dy, dx)
698 if (dr < 0.015 && v > cy - R) {
699 env = 0.14 + 0.32 * pow(0.5 + 0.5 * sin(a * 16 - time * 0.4), 2)
700 spec = pow(max(0, cos(a - 0.5) * 0.5 + 0.5), 4) * 0.35
701 metal = env + spec
702 cadd(metal * 0.72, metal * 0.64, metal * 0.74)
703 }
704 sc = scroller(u, scl, -0.50, 0.11, 1.6)
705 cadd(sc * 0.9, sc * 0.95, sc)
706 n1 = strlen(capA)
707 cpa = textline(u, capA, -n1 * 0.075, 0.25, 0.15) * hA
708 cadd(cpa * (1.0 + 0.5 * stbE), cpa * 0.70, cpa * 0.90)
709 fl = exp(-pow((v - 0.55) * 10, 2)) * exp(-abs(u - 0.35) * 3.0) * 0.18
710 cadd(fl, fl * 0.8, fl * 0.5)
711 fl = exp(-pow((v - 0.55) * 10, 2)) * exp(-abs(u + 0.35) * 3.0) * 0.18
712 cadd(fl, fl * 0.8, fl * 0.5)
713}
715# scene 5: neon city skyline
716pixel city {
717 rgb(0, 0, 0)
718 # sky gradient
719 sky = (v + 1) * 0.08
720 rr0 = mix(0.001, 0.012, sky)
721 gg0 = mix(0.000, 0.005, sky)
722 bb0 = mix(0.004, 0.018, sky)
723 rgb(rr0, gg0, bb0)
724 # street grid
725 hz = -0.05
726 if (v < hz) {
727 dep = hz - v
728 wx = u * (2.0 + 7.0 * dep)
729 fx = fract(wx)
730 line = exp(-pow(min(fx, 1 - fx) * 20, 2)) * exp(-dep * 1.6)
731 rgb(line * 0.35, line * 0.05, line * 0.20)
732 }
733 # buildings across the width
734 cw = 0.32
735 un = (u + aspect + 0.5) / cw
736 ui = floor(un)
737 uu = fract(un)
738 hgt = 0.05 + 0.60 * pow(hash(ui * 13.71 + 3.1), 1.3)
739 insd = step(v, hgt - 0.02) * step(0.03, uu) * step(uu, 0.97) * step(-0.12, v)
740 if (insd > 0.5) {
741 rgb(0.01, 0.005, 0.015)
742 wy = hgt - v
743 wr = floor(wy * 22)
744 wq = fract(wy * 22)
745 wcol = floor(un * 5.5)
746 if (wr > 0 && wr < 20 && wq > 0.35 && wq < 0.75) {
747 widy = ui * 97.3 + wcol * 13.1 + wr * 7.9
748 lq = hash(widy + floor(beat * 0.5) * 11.3)
749 if (lq > 0.55) {
750 lt = (0.12 + 0.35 * (0.5 + 0.5 * sin(beat * 3.14 + widy * 0.31))) * (0.20 + 0.80 * step(0.78, lq))
751 cw2 = hash(widy * 3.77)
752 if (cw2 > 0.66) {
753 cadd(lt * 1.0, lt * 0.25, lt * 0.55)
754 }
755 else {
756 if (cw2 > 0.33) {
757 cadd(lt * 0.10, lt * 0.65, lt * 1.0)
758 }
759 else {
760 cadd(lt * 0.95, lt * 0.75, lt * 0.15)
761 }
762 }
763 }
764 }
765 }
766 # rooftop neon
767 if (abs(v - hgt) < 0.005 && uu > 0.05 && uu < 0.95 && v > -0.1) {
768 nse = 0.5 + 0.5 * sin(beat * 6.28 + ui * 1.7)
769 cik = ui % 3
770 if (cik == 0) { cadd(0.9 * nse, 0.15 * nse, 0.55 * nse) }
771 if (cik == 1) { cadd(0.10 * nse, 0.70 * nse, 0.95 * nse) }
772 if (cik == 2) { cadd(0.95 * nse, 0.80 * nse, 0.15 * nse) }
773 }
774 # street reflections of neon
775 if (v < hz) {
776 dep = hz - v
777 fd = exp(-dep * 2.0)
778 cxx = (ui + 0.5) * cw - aspect - 0.5
779 dx2 = abs(u - cxx)
780 ww = 0.04 + dep * 0.12
781 sb = exp(-pow(dx2 / ww, 2)) * step(0.4, hash(ui * 9.17 + 2.2)) * (0.5 + 0.5 * sin(beat * 3.14 + ui * 1.3)) * fd * 0.20
782 cik2 = ui % 3
783 if (cik2 == 0) { cadd(sb * 0.9, sb * 0.25, sb * 0.55) }
784 if (cik2 == 1) { cadd(sb * 0.10, sb * 0.60, sb * 0.95) }
785 if (cik2 == 2) { cadd(sb * 0.95, sb * 0.68, sb * 0.15) }
786 }
787 # moon glow
788 fz = exp(-pow((u + 0.6) * 3.0, 2) - pow((v - 0.55) * 4.0, 2)) * 0.30
789 cadd(fz * 0.9, fz * 0.7, fz * 0.85)
790 # caption
791 n3 = strlen(capC)
792 cpc = textline(u, capC, -n3 * 0.070, 0.30, 0.14) * hC
793 cadd(cpc * (0.85 + 0.50 * clpE), cpc * 0.65, cpc * 0.85)
794}
796# scene 6: bright finale wide
797pixel finale {
798 u2 = u / zc
799 v2 = v / zc
800 rgb(0, 0, 0)
801 camY = 0.55
802 ceilY = 1.45
803 roomW = 3.6
804 farZ = 6.0
805 tf = 1000
806 if (v2 < 0) { tf = camY / (-v2 + 0.0001) }
807 tc = 1000
808 if (v2 > 0) { tc = (ceilY - camY) / (v2 + 0.0001) }
809 tb = farZ
810 ts = 1000
811 au = abs(u2)
812 if (au > 0.0001) { ts = (roomW * 0.5) / au }
813 if (tf < tc && tf < tb && tf < ts) {
814 xw = u2 * tf
815 zw = tf
816 tile = 1.0
817 ix = floor(xw / tile)
818 iz = floor(zw / tile)
819 ck = step(0.5, fract((ix + iz) * 0.5))
820 fx = fract(xw)
821 fz = fract(zw)
822 gr = min(min(fx, 1 - fx), min(fz, 1 - fz))
823 grout = smooth(0.0, 0.10, gr)
824 c1r = 0.48
825 c1g = 0.03
826 c1b = 0.32
827 c2r = 0.00
828 c2g = 0.42
829 c2b = 0.50
830 tr = mix(c1r, c2r, ck) * grout
831 tg = mix(c1g, c2g, ck) * grout
832 tb2 = mix(c1b, c2b, ck) * grout
833 pulse = step(0.88, hash(ix * 13.1 + iz * 7.7)) * (0.5 + 0.5 * sin(beat * 3.14 + ix + iz)) * 0.30
834 rgb(tr + pulse, tg + pulse * 0.2, tb2 + pulse * 0.4)
835 }
836 if (tc < tf && tc < tb && tc < ts) {
837 xw = u2 * tc
838 zw = tc
839 tile = 0.9
840 ix = floor(xw / tile)
841 iz = floor(zw / tile)
842 fx = fract(xw)
843 fz = fract(zw)
844 gr = min(min(fx, 1 - fx), min(fz, 1 - fz))
845 grid = exp(-pow(gr * 22, 2))
846 lit = 0.40 + 0.60 * (0.5 + 0.5 * sin(beat * 3.14 + ix * 2.0 + iz * 1.5))
847 rgb(grid * 0.22 * lit, grid * 0.18 * lit, grid * 0.28 * lit)
848 }
849 if (tb < tf && tb < tc && tb < ts) {
850 xw = u2 * tb
851 yw = camY - v2 * tb
852 sx = floor(xw * 0.7)
853 sy = floor(yw * 2.5)
854 fh = hash(sx * 13.1 + sy * 7.7 + floor(beat) * 3.1)
855 lit = (0.40 + 0.60 * (0.5 + 0.5 * sin(beat * 3.14 + sx * 2.1 + sy))) * step(0.40, fh)
856 ci = floor(fh * 3)
857 if (ci == 0) { rgb(lit * 0.95, lit * 0.08, lit * 0.55) }
858 if (ci == 1) { rgb(lit * 0.05, lit * 0.78, lit * 0.95) }
859 if (ci == 2) { rgb(lit * 0.95, lit * 0.85, lit * 0.10) }
860 }
861 if (ts < tf && ts < tc && ts < tb) {
862 zw = ts
863 yw = camY - v2 * ts
864 sx = floor(ts * 0.8)
865 sy = floor(yw * 3.0)
866 fh = hash(sx * 17.3 + sy * 11.7 + floor(beat) * 2.3)
867 lit = (0.35 + 0.65 * (0.5 + 0.5 * sin(beat * 3.14 + sx * 1.5 + sy))) * step(0.45, fh)
868 ci = floor(fh * 3)
869 if (ci == 0) { rgb(lit * 0.90, lit * 0.10, lit * 0.50) }
870 if (ci == 1) { rgb(lit * 0.05, lit * 0.70, lit * 0.95) }
871 if (ci == 2) { rgb(lit * 0.95, lit * 0.78, lit * 0.10) }
872 }
873 repeat k 5 {
874 zc = 1.2 + k * 1.0 - fract(time * 0.25) * 1.0
875 if (zc > 0.2) {
876 vt = (ceilY - camY) / zc
877 vb = -camY / zc
878 rw = 0.17 / zc
879 uc = (-roomW * 0.5 + 0.28) / zc
880 ds = segd(u2, v2, uc, vt, uc, vb) - rw
881 if (ds < 0.01) {
882 hh = (v2 - vt) / (vb - vt + 0.0001)
883 qx = (u2 - uc) / rw
884 qy = hh
885 ck = step(0.5, fract((floor(qx * 3) + floor(qy * 8)) * 0.5))
886 band = 1 - smooth(0.10, 0.25, abs(fract(qy * 8) - 0.5))
887 lit = (0.10 + 0.50 * band) * (0.5 + 0.5 * sin(beat * 3.14 + k)) * exp(-zc * 0.10)
888 tr = mix(0.95, 0.00, ck)
889 tg = mix(0.05, 0.85, ck)
890 tb2 = mix(0.65, 0.95, ck)
891 cadd(lit * tr, lit * tg, lit * tb2)
892 }
893 uc = (roomW * 0.5 - 0.28) / zc
894 ds = segd(u2, v2, uc, vt, uc, vb) - rw
895 if (ds < 0.01) {
896 hh = (v2 - vt) / (vb - vt + 0.0001)
897 qx = (u2 - uc) / rw
898 qy = hh
899 ck = step(0.5, fract((floor(qx * 3) + floor(qy * 8)) * 0.5))
900 band = 1 - smooth(0.10, 0.25, abs(fract(qy * 8) - 0.5))
901 lit = (0.10 + 0.50 * band) * (0.5 + 0.5 * sin(beat * 3.14 + k + 1.0)) * exp(-zc * 0.10)
902 tr = mix(0.95, 0.00, ck)
903 tg = mix(0.05, 0.85, ck)
904 tb2 = mix(0.65, 0.95, ck)
905 cadd(lit * tr, lit * tg, lit * tb2)
906 }
907 }
908 }
909 orb(u2, v2, 0, 0.60, 0.28, time * 0.45, 0.70)
910 beams(u2, v2, 0, 0.60, 0.50)
911 dx0 = 0.35 * sin(time * 0.9)
912 pha = fract(beat) * tau
913 if (v2 < 0) {
914 rf = exp(v2 * 5.0)
915 drawDancer(u2, -v2, dx0, -0.50, 0.75, pha, 0.35 * rf)
916 }
917 drawDancer(u2, v2, dx0, -0.50, 0.75, pha, 0.85)
918 repeat k 16 {
919 cxx = -1.1 * aspect + hash(k * 3.1) * 2.2 * aspect + 0.08 * sin(time + k)
920 cyy = 1.2 - fract(hash(k * 7.7) + time * (0.05 + 0.035 * hash(k * 1.3))) * 2.4
921 szz = 0.014 + 0.012 * hash(k * 5.3)
922 dx3 = abs(u2 - cxx)
923 dy3 = abs(v2 - cyy)
924 sq = (1 - smooth(szz * 0.6, szz, dx3)) * (1 - smooth(szz * 0.7, szz * 1.15, dy3))
925 kk2 = sq * 0.25
926 cik3 = k % 3
927 if (cik3 == 0) { cadd(kk2, kk2 * 0.3, kk2 * 0.7) }
928 if (cik3 == 1) { cadd(kk2 * 0.25, kk2 * 0.7, kk2) }
929 if (cik3 == 2) { cadd(kk2, kk2 * 0.75, kk2 * 0.25) }
930 }
931 ttf = textline(u2, ttl, -1.65, 0.32, 0.22) * tA
932 cadd(ttf * 1.25, ttf * 1.05, ttf * 0.65)
933 nA = strlen(capA)
934 ta1 = textline(u2, capA, -nA * 0.080, 0.40, 0.16) * hA
935 cadd(ta1, ta1 * 0.8, ta1 * 0.4)
936 nB = strlen(capB)
937 tb1 = textline(u2, capB, -nB * 0.080, 0.40, 0.16) * hB
938 cadd(tb1, tb1 * 0.8, tb1 * 0.4)
939 nC2 = strlen(capC)
940 tc2 = textline(u2, capC, -nC2 * 0.080, 0.40, 0.16) * hC
941 cadd(tc2, tc2 * 0.8, tc2 * 0.4)
942 sc = scroller(u2, scl, -0.90, 0.070, 1.6)
943 cadd(sc * 0.70, sc * 0.92, sc * 0.82)
944}
946post {
947 g1 = tap(0, 0)
948 ga = r1
949 gb = r2
950 # bloom off
951 rsh = tap(-1 - floor(kickE), 0)
952 rr = mix(g1, rsh, 0.08)
953 rgb(rr, ga, gb)
954 du = (hash(x * w * 0.37 + y * h * 0.71 + frame * 7.3) - 0.5) * 0.03
955 cadd(du, du * 0.85, du * 0.7)
956 d2 = len(u, v)
957 cmul(max(0.65, 1 - 0.30 * d2 * d2))
958 cmul(1 - 0.04 * step(0.5, fract(y * h * 0.5)))
959 cadd(cut * 0.04, cut * 0.03, cut * 0.03)
960}
Click a line number to link to that line.