dmscene Demos & source

NOCTURNE

nocturne.dmt · 80 BPM · 36 s · 960×600

model-madecinematic

notes

A room at 3am: Venetian blinds, rain on the glass, a figure waiting under a streetlight, one cigarette burning down. Twelve bars, no cuts.

music3 a.m. noir: felt kick, brushed snare, laid-back sampled ride, upright bass, FM Rhodes, muted trumpet through dotted delay and reverb, rain room-tone, vinyl ticks and tape hiss
visualone continuous interior shot: venetian-blind bars crawl across the wall and wet floor, a rain-streaked window onto a neon skyline, a fedora silhouette under the streetlight from ~16 s, smoke lit only where it crosses the light; gate weave, bloom, chromatic fringing and grain in post
filenocturne.dmt
duration0:36
video960×600 · 30 fps · h264 + audio · 8.4 MB
song80 BPM · speed 6 · rpb 4 · 7 channels
loop0
renderscale 1 · master 0.68
uniformsbarShift lit sweepX sweepA figF figX neonA openA smokeA ember kickE brushE trumE glow
modelDeepSeek V4.1 Flash
collectionWritten by the models
tagsmodel-madecinematic
source763 lines · 40 KB · download

anatomy

13VM programs
12patterns
0palettes
0timeline events
1text / sample / texture
763source lines
7inst
2chan
1master
1frame
1pixel
1post
5fn

line composition

pixel 40%pattern 30%post 9%inst 8%frame 4%fn 4%master 2%chan 2%title 0%song 0%order 0%pan 0%uniform 0%sample 0%

play order

01234567891011

order list · 12 entries

timeline

This demo has no timeline events; it is driven by the tracker clock and per-frame programs.

resources

kindnameinfovalue
samplerideassets/ride.wav

source

download .dmt
1# @description A room at 3am: Venetian blinds, rain on the glass, a figure waiting under a streetlight, one cigarette burning down. Twelve bars, no cuts.
2# @tags cinematic
3# @model DeepSeek V4.1 Flash
4# @collection Written by the models
5# @music 3 a.m. noir: felt kick, brushed snare, laid-back sampled ride, upright bass, FM Rhodes, muted trumpet through dotted delay and reverb, rain room-tone, vinyl ticks and tape hiss
6# @visual one continuous interior shot: venetian-blind bars crawl across the wall and wet floor, a rain-streaked window onto a neon skyline, a fedora silhouette under the streetlight from ~16 s, smoke lit only where it crosses the light; gate weave, bloom, chromatic fringing and grain in post
7# @duration 36
8# nocturne.dmt - a room at 3am. Venetian blinds, rain on the glass, a figure waiting
9# under a streetlight, one cigarette burning down. 80 bpm, twelve bars, no cuts.
10title NOCTURNE
11song bpm=80 speed=6 rpb=4 channels=7 loop=0 volume=0.68
12order 0 1 2 3 4 5 6 7 8 9 10 11
13pan 0.50 0.42 0.58 0.50 0.36 0.64 0.50
15# ------------------------------------------------------------------ samples
16sample ride "assets/ride.wav"
18# ------------------------------------------------------------------ instruments
19inst kick {
20 f = 44 + 200 * exp(-t * 20)
21 $p = $p + f / sr
22 body = sin($p * tau) * exp(-t * 4.4)
23 sub = sin($p * tau * 0.5) * exp(-t * 3.0) * 0.45
24 tap = lp(noise(), 1100) * exp(-t * 110) * 0.30
25 out(dist((body + sub) * 1.5 + tap, 1.15) * 0.54)
28inst brush {
29 # brushed snare: soft noise swish with a little skin tone
30 e = env(0.028, 0.20, 0.0, 0.30)
31 n = svf(noise(), 1700 + 1400 * vel, 0.35)
32 s = n * 0.7 + r2 * 0.6
33 body = sin(tau * 196 * t) * exp(-t * 26) * 0.25
34 out((s + body) * e * 0.78)
37inst ride {
38 e = env(0.002, 0.55, 0.0, 0.30)
39 s = lp(smp(ride, t * (1.0 - 0.05 * (1 - vel))), 6500)
40 out(s * e * (0.35 + 0.65 * vel) * 0.52)
43inst bass {
44 # upright: plucked sine body, woody click, a little finger noise
45 e = env(0.006, 0.42, 0.52, 0.28)
46 b = sin(ph * tau) + sin(ph * tau * 2.004) * 0.30 + sin(ph * tau * 3.01) * 0.09
47 click = lp(noise(), 640) * exp(-t * 75) * 0.55
48 s = svf(b * 0.8, 150 + 620 * e + 260 * p0, 0.28)
49 out(dist((s + click * 0.30) * e, 1.12) * 0.50)
52inst rhodes nna=continue {
53 e = env(0.005, 1.30, 0.28, 1.10)
54 idx = 1.5 * exp(-t * 2.4) + 0.20
55 m = sin(ph * tau * 2.0) * idx
56 s = sin(ph * tau + m) + sin(ph * tau * 3.005) * 0.10
57 trem = 0.86 + 0.14 * sin(t * 5.1 + 0.4)
58 out(s * e * trem * 0.23)
61inst trumpet nna=continue {
62 # harmon-muted: narrow buzzy source through a resonant peak, breath on top
63 e = env(0.055, 0.30, 0.74, 0.55)
64 vib = 1 + 0.0055 * sin(t * 5.4 + 0.7) * smooth(0.10, 0.55, t)
65 f = freq * vib
66 buzz = bsaw(ph, freq) * 0.55 + bsqr(ph, 0.42, freq) * 0.22
67 breath = lp(noise(), 2300) * 0.055
68 s = svf(buzz + breath, 620 + 1500 * e + 500 * p0, 0.58)
69 s = s + r2 * 0.55
70 out(hp(s, 210) * e * 0.60)
73inst rain {
74 # the room tone: rain on glass, gusts, a wet hiss that never leaves
75 e = env(2.2, 3.0, 0.86, 7.0)
76 n = noise()
77 hi = hp(n, 1900) * 0.55
78 lo = lp(n, 420) * 0.55
79 g = 0.68 + 0.24 * sin(t * 0.21) + 0.12 * sin(t * 0.57 + 1.3)
80 out((hi + lo) * e * g * 0.28)
83# ------------------------------------------------------------------ channel fx
84chan 3 {
85 # rhodes: short room
86 v = verb(x, 0.80, 0.55)
87 out(x + v * 0.42)
90chan 4 {
91 # trumpet: dotted-eighth echo into a long hall
92 d = dly(x, 0.5625, 0.30)
93 v = verb(x, 0.86, 0.42)
94 out(x + d * 0.30 + v * 0.55)
97# ------------------------------------------------------------------ master
98master {
99 dl = dly(l, 0.8438, 0.28)
100 dr = dly(r, 0.8438, 0.28)
101 vl = verb(l + dr * 0.14, 0.84, 0.48)
102 vr = verb(r + dl * 0.14, 0.84, 0.48)
103 # vinyl ticks and a little tape hiss
104 tks = step(0.99935, hash(floor(t * 9000))) * (hash(floor(t * 9000) + 3.1) - 0.2) * 0.55
105 hiss = hp(noise(), 5200) * 0.012
106 ol = hp(l + dl * 0.16 + vl * 0.20 + tks + hiss, 32)
107 or = hp(r + dr * 0.16 + vr * 0.20 + tks * 0.8 + hiss, 32)
108 out(dist(ol * 1.10, 1.25), dist(or * 1.10, 1.25))
111# ------------------------------------------------------------------ patterns
112# 16 rows = one bar = 3 s at 80 bpm. Seven channels:
113# 0 kick | 1 brush/ride | 2 bass | 3 rhodes | 4 trumpet | 5 rain | 6 spare
114# bars: 0 Dm 1 Dm 2 Bb 3 Gm 4 A7 5 Dm 6 Dm 7 Bb 8 Gm 9 A7 10 Dm 11 Dm
116pattern 0 rows=16 {
117 ... . .. ... | ... . .. ... | D-2 4 22 ... | D-3 5 14 ... | ... . .. ... | F-2 7 34 ... | ... . .. ...
118 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
119 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
120 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
121 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
122 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
123 ... . .. ... | ... . .. ... | ... . .. ... | A-3 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
124 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
125 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
126 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
127 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
128 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
129 ... . .. ... | C-4 2 10 ... | ... . .. ... | ... . .. ... | A-4 6 0E ... | ... . .. ... | ... . .. ...
130 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
131 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
132 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
135pattern 1 rows=16 {
136 ... . .. ... | ... . .. ... | D-2 4 20 ... | D-4 5 14 ... | ... . .. ... | ... . .. ... | ... . .. ...
137 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
138 ... . .. ... | C-4 3 0A ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
139 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
140 ... . .. ... | C-4 2 14 ... | ... . .. ... | F-4 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
141 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
142 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
143 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
144 ... . .. ... | ... . .. ... | F-2 4 1C ... | A-4 5 10 ... | ... . .. ... | ... . .. ... | ... . .. ...
145 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
146 ... . .. ... | C-4 3 0A ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
147 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
148 ... . .. ... | C-4 2 18 ... | A-1 4 18 ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
149 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
150 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
151 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
154pattern 2 rows=16 {
155 C-4 1 1E ... | ... . .. ... | Bb1 4 22 ... | Bb3 5 14 ... | ... . .. ... | ... . .. ... | ... . .. ...
156 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
157 ... . .. ... | C-4 3 0C ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
158 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
159 ... . .. ... | C-4 2 18 ... | ... . .. ... | D-4 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
160 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
161 ... . .. ... | C-4 3 0A ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
162 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
163 C-4 1 1A ... | ... . .. ... | F-2 4 1C ... | F-4 5 10 ... | ... . .. ... | ... . .. ... | ... . .. ...
164 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
165 ... . .. ... | C-4 3 0C ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
166 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
167 ... . .. ... | C-4 2 1C ... | D-2 4 1A ... | ... . .. ... | F-4 6 14 ... | ... . .. ... | ... . .. ...
168 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
169 ... . .. ... | C-4 3 0A ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
170 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
173pattern 3 rows=16 {
174 C-4 1 20 ... | ... . .. ... | G-1 4 22 ... | G-3 5 14 ... | D-5 6 18 ... | ... . .. ... | ... . .. ...
175 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
176 ... . .. ... | C-4 3 0D ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
177 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
178 C-4 1 14 ... | C-4 2 1A ... | ... . .. ... | Bb3 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
179 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
180 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
181 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
182 C-4 1 1C ... | ... . .. ... | D-2 4 1C ... | D-4 5 10 ... | ... . .. ... | ... . .. ... | ... . .. ...
183 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
184 ... . .. ... | C-4 3 0D ED1 | ... . .. ... | ... . .. ... | off 6 00 ... | ... . .. ... | ... . .. ...
185 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
186 C-4 1 14 ... | C-4 2 1E ... | Bb1 4 18 ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
187 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
188 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
189 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
192pattern 4 rows=16 {
193 C-4 1 22 ... | ... . .. ... | A-1 4 24 ... | A-3 5 14 ... | C#5 6 1A ... | ... . .. ... | ... . .. ...
194 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
195 ... . .. ... | C-4 3 0E ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
196 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
197 C-4 1 14 ... | C-4 2 1C ... | ... . .. ... | C#4 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
198 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
199 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
200 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
201 C-4 1 1E ... | ... . .. ... | C#2 4 1E ... | E-4 5 10 ... | ... . .. ... | ... . .. ... | ... . .. ...
202 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
203 ... . .. ... | C-4 3 0E ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
204 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
205 C-4 1 14 ... | C-4 2 1E ... | E-2 4 1A ... | G-4 5 0E ... | off 6 00 ... | ... . .. ... | ... . .. ...
206 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
207 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
208 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
211pattern 5 rows=16 {
212 C-4 1 22 ... | ... . .. ... | D-2 4 22 ... | D-4 5 14 ... | A-4 6 16 ... | ... . .. ... | ... . .. ...
213 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
214 ... . .. ... | C-4 3 0D ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
215 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
216 C-4 1 14 ... | C-4 2 1A ... | ... . .. ... | F-4 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
217 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
218 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
219 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
220 C-4 1 1E ... | ... . .. ... | A-1 4 1A ... | A-4 5 10 ... | D-5 6 1A ... | ... . .. ... | ... . .. ...
221 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
222 ... . .. ... | C-4 3 0D ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
223 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
224 C-4 1 14 ... | C-4 2 1E ... | D-2 4 1C ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
225 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
226 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | off 6 00 ... | ... . .. ... | ... . .. ...
227 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
230pattern 6 rows=16 {
231 C-4 1 22 ... | ... . .. ... | D-2 4 22 ... | D-4 5 14 ... | D-5 6 1A ... | ... . .. ... | ... . .. ...
232 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
233 ... . .. ... | C-4 3 0D ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
234 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
235 C-4 1 14 ... | C-4 2 1A ... | ... . .. ... | F-4 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
236 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
237 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
238 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
239 C-4 1 1E ... | ... . .. ... | F-2 4 1C ... | A-4 5 10 ... | C-5 6 16 ... | ... . .. ... | ... . .. ...
240 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
241 ... . .. ... | C-4 3 0D ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
242 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
243 C-4 1 14 ... | C-4 2 1E ... | A-1 4 18 ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
244 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
245 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | off 6 00 ... | ... . .. ... | ... . .. ...
246 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
249pattern 7 rows=16 {
250 C-4 1 22 ... | ... . .. ... | Bb1 4 22 ... | Bb3 5 14 ... | Bb4 6 18 ... | ... . .. ... | ... . .. ...
251 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
252 ... . .. ... | C-4 3 0D ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
253 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
254 C-4 1 14 ... | C-4 2 1A ... | ... . .. ... | D-4 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
255 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
256 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
257 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
258 C-4 1 1E ... | ... . .. ... | F-2 4 1C ... | F-4 5 10 ... | D-5 6 1A ... | ... . .. ... | ... . .. ...
259 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
260 ... . .. ... | C-4 3 0D ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
261 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
262 C-4 1 16 ... | C-4 2 20 ... | D-2 4 1A ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
263 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
264 ... . .. ... | C-4 3 0B ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
265 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
268pattern 8 rows=16 {
269 C-4 1 24 ... | ... . .. ... | G-1 4 22 ... | G-3 5 14 ... | F-5 6 1C ... | ... . .. ... | ... . .. ...
270 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
271 ... . .. ... | C-4 3 0E ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
272 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
273 C-4 1 1A ... | C-4 2 1E ... | ... . .. ... | Bb3 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
274 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
275 ... . .. ... | C-4 3 0C ED1 | D-2 4 1A ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
276 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
277 C-4 1 20 ... | ... . .. ... | Bb1 4 1C ... | D-4 5 10 ... | off 6 00 ... | ... . .. ... | ... . .. ...
278 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
279 ... . .. ... | C-4 3 0E ED1 | ... . .. ... | ... . .. ... | D-5 6 18 ... | ... . .. ... | ... . .. ...
280 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
281 C-4 1 1A ... | C-4 2 20 ... | D-2 4 1A ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
282 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
283 ... . .. ... | C-4 3 0C ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
284 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
287pattern 9 rows=16 {
288 C-4 1 26 ... | ... . .. ... | A-1 4 24 ... | A-3 5 14 ... | E-5 6 1E ... | ... . .. ... | ... . .. ...
289 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
290 ... . .. ... | C-4 3 0F ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
291 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
292 C-4 1 1E ... | C-4 2 22 ... | ... . .. ... | C#4 5 0F ... | ... . .. ... | ... . .. ... | ... . .. ...
293 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
294 C-4 1 16 ... | C-4 3 0C ED1 | C#2 4 1C ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
295 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
296 C-4 1 22 ... | ... . .. ... | E-2 4 1E ... | E-4 5 10 ... | C#5 6 1C ... | ... . .. ... | ... . .. ...
297 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
298 ... . .. ... | C-4 3 0F ED1 | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
299 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
300 C-4 1 1C ... | C-4 2 24 ... | G-2 4 1A ... | G-4 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
301 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
302 ... . .. ... | C-4 3 0C ED1 | ... . .. ... | ... . .. ... | off 6 00 ... | ... . .. ... | ... . .. ...
303 ... . .. ... | C-4 2 14 ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
306pattern 10 rows=16 {
307 C-4 1 20 ... | ... . .. ... | D-2 4 20 ... | D-4 5 12 ... | D-5 6 1A ... | ... . .. ... | ... . .. ...
308 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
309 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
310 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
311 ... . .. ... | C-4 2 16 ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
312 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
313 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
314 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
315 C-4 1 1A ... | ... . .. ... | A-1 4 18 ... | F-4 5 0E ... | off 6 00 ... | ... . .. ... | ... . .. ...
316 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
317 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
318 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
319 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
320 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
321 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
322 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
325pattern 11 rows=16 {
326 ... . .. ... | ... . .. ... | D-2 4 1E ... | D-3 5 12 ... | ... . .. ... | ... . .. ... | ... . .. ...
327 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
328 ... . .. ... | ... . .. ... | ... . .. ... | F-3 5 0D ... | ... . .. ... | ... . .. ... | ... . .. ...
329 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
330 ... . .. ... | ... . .. ... | ... . .. ... | A-3 5 0E ... | ... . .. ... | ... . .. ... | ... . .. ...
331 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
332 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
333 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
334 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
335 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
336 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
337 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
338 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
339 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
340 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
341 ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ... | ... . .. ...
344# ------------------------------------------------------------------ visuals
345# Everything is one pixel program: a wall, a rain-streaked window, a floor,
346# blind shadows and a plume of smoke, lit by whatever the song is doing.
348uniform barShift lit sweepX sweepA figF figX neonA openA smokeA ember kickE brushE trumE glow
350fn sdbox(px, py, bx, by) {
351 dx = abs(px) - bx
352 dy = abs(py) - by
353 return len(max(dx, 0), max(dy, 0)) + min(max(dx, dy), 0)
356fn slit(coord, soft) {
357 f = fract(coord)
358 a = smooth(0.36 - soft, 0.36 + soft, f)
359 b = 1 - smooth(0.90 - soft, 0.90 + soft, f)
360 return a * b
363fn ellip(px, py, rx, ry) {
364 return (len(px / rx, py / ry) - 1) * min(rx, ry)
367fn sdseg(px, py, ax, ay, bx, by) {
368 pax = px - ax
369 pay = py - ay
370 bax = bx - ax
371 bay = by - ay
372 kk = clamp((pax * bax + pay * bay) / (bax * bax + bay * bay + 0.000001), 0, 1)
373 return len(pax - bax * kk, pay - bay * kk)
376fn smin(a, b, k) {
377 hh = clamp(0.5 + 0.5 * (b - a) / k, 0, 1)
378 return mix(b, a, hh) - k * hh * (1 - hh)
381frame {
382 tt = time
383 # the room comes up slowly, then dies at the end
384 lit = 0.30 + 0.80 * smooth(1.5, 12.0, tt)
385 lit = lit * (1 - 0.80 * smooth(31.4, 35.8, tt))
386 # blinds: open through the middle, closing on the last bar
387 openA = 0.52 + 0.48 * smooth(2.5, 12.5, tt)
388 openA = openA * (1 - 0.86 * smooth(30.8, 35.2, tt))
389 # slow crawl of the shadow bars, plus a car passing once
390 barShift = tt * 0.085 + 0.34 * sin(tt * 0.105) + 0.02 * sin(tt * 1.3)
391 sweepP = clamp((tt - 12.2) / 2.4, 0, 1)
392 sweepX = mix(-2.4, 3.4, sweepP)
393 sweepA = exp(-0.5 * pow((tt - 13.4) * 0.95, 2)) * 0.85
394 # the waiting figure: arrives 16s, gone by 32s
395 figF = smooth(15.4, 18.6, tt) * (1 - smooth(29.6, 32.2, tt))
396 figX = 0.618 + 0.010 * sin(tt * 0.33) - 0.06 * smooth(30.0, 32.0, tt)
397 # neon outside: flickers, surges at the climax
398 neonA = 0.72 + 0.28 * hash(floor(tt * 9.0))
399 neonA = neonA * (1 - 0.75 * step(0.93, hash(floor(tt * 1.63) + 4.0)))
400 neonA = neonA * (0.85 + 0.45 * smooth(22.0, 27.0, tt))
401 smokeA = 0.55 + 0.55 * smooth(3.0, 10.0, tt)
402 kickE = exp(-trig(0) * 7.0)
403 brushE = exp(-trig(1) * 8.0) * step(0.30, vel(1))
404 trumE = exp(-trig(4) * 1.6)
405 ember = 0.40 + 0.60 * (0.5 + 0.5 * sin(tt * 1.55)) + 0.35 * kickE
406 glow = 0.9 + 0.1 * brushE
409pixel {
410 # ---------------- room geometry (straight-on camera, a little 2.5D)
411 wx0 = -1.44
412 wx1 = -0.14
413 wy0 = -0.34
414 wy1 = 0.94
415 vh = -0.36
416 wcx = (wx0 + wx1) * 0.5
417 wcy = (wy0 + wy1) * 0.5
418 whw = (wx1 - wx0) * 0.5
419 whh = (wy1 - wy0) * 0.5
420 dxw = sdbox(u - wcx, v - wcy, whw, whh)
421 inwin = 1 - smooth(-0.003, 0.003, dxw)
423 # ---------------- blind shadows bending away from the window
424 qx = u + 0.40
425 bcoord = (v - 0.155 * qx - 0.048 * sin(u * 1.5) - 0.020 * qx * qx) * 6.8 + barShift
426 ddist = len((u - wcx) * 0.78, (v - 0.24) * 1.00)
427 bsoft = 0.0035 + 0.011 * ddist
428 bm = slit(bcoord, bsoft)
429 bmw = slit(bcoord + 0.02, 0.045 + 0.05 * ddist)
430 hot = exp(-ddist * 1.30)
431 decay = exp(-max(0.0, u - wx1) * 1.14 - max(0.0, wy0 - v) * 0.55)
432 bgate = smooth(0.06, 0.44, openA)
433 barl = bm * decay * lit * bgate * (0.42 + 0.92 * hot)
434 bglow = bmw * decay * lit * bgate * 0.10
436 # ---------------- wall
437 wn = fbm(u * 3.0 + 11.0, v * 3.0 + 3.0, 2)
438 wf = hash(floor(u * 190.0) + floor(v * 190.0) * 17.0)
439 wallv = 0.006 + 0.015 * wn + 0.004 * wf
440 wallv = wallv * (0.80 + 0.30 * smooth(-0.6, 1.0, v))
441 wr = wallv * 1.16 + barl * 0.96 + bglow * 0.55
442 wg = wallv * 1.00 + barl * 0.62 + bglow * 0.25
443 wb = wallv * 0.92 + barl * 0.20 + bglow * 0.07
445 # a bruise of neon bleeding around the glass
446 wgl = exp(-max(0.0, dxw) * 6.5) * (0.10 + 0.13 * neonA)
447 wr = wr + wgl * 0.55
448 wg = wg + wgl * 0.16
449 wb = wb + wgl * 0.42
451 # a car's headlights sweep the room, cut by the same slats
452 sw = exp(-pow((u - sweepX) * 2.3, 2)) * sweepA * (0.18 + 0.82 * bm)
453 wr = wr + sw * 0.72
454 wg = wg + sw * 0.44
455 wb = wb + sw * 0.18
457 # a coat on a hook, waiting by the door
458 cx0 = 1.14
459 cdd = sdbox(u - cx0, v - 0.00, 0.112 + 0.030 * smooth(0.16, -0.28, v), 0.280)
460 cdd = smin(cdd, ellip(u - cx0, (v - 0.292) * 2.6, 0.150, 0.085), 0.035)
461 cdd = smin(cdd, sdbox(u - cx0, v - 0.352, 0.062, 0.038), 0.025)
462 cdd = min(cdd, sdbox(u - cx0 + 0.044, v - 0.448, 0.008, 0.052))
463 cmask = 1 - smooth(-0.004, 0.004, cdd)
464 cedge = 1 / (1 + abs(cdd) * 115.0)
465 fold = exp(-abs(u - cx0 - 0.012) * 80.0) * cmask
466 wr = mix(wr, 0.004 + 0.012 * wn, cmask * 0.92)
467 wg = mix(wg, 0.005 + 0.010 * wn, cmask * 0.92)
468 wb = mix(wb, 0.008 + 0.012 * wn, cmask * 0.92)
469 wr = wr + cedge * 0.40 * (0.20 + barl)
470 wg = wg + cedge * 0.22 * (0.18 + barl)
471 wb = wb + cedge * 0.09 * (0.18 + barl)
472 wr = wr - fold * 0.010
474 # ---------------- floor: boards, wet sheen, light lying across it
475 fd = vh - v + 0.020
476 fl = 1 - smooth(vh - 0.002, vh + 0.002, v)
477 zz = 0.52 / fd
478 fx = u * zz * 1.10
479 fz = zz
480 seam1 = exp(-abs(fract(fx * 0.62) - 0.5) * 26.0) * exp(-fd * 3.2)
481 seam2 = exp(-abs(fract(fz * 0.34) - 0.5) * 30.0) * exp(-fd * 2.6)
482 grain = fbm(fx * 3.2, fz * 4.0, 1)
483 fbase = 0.006 + 0.020 * grain + 0.014 * seam1 + 0.010 * seam2
484 refl = exp(-fd * 4.6)
485 # wet reflection of the signs: three coloured columns with vertical streaks
486 rfx = exp(-abs(u + 1.02) * 3.2)
487 rfy = exp(-abs(u + 0.34) * 3.6)
488 rfz = exp(-abs(u + 0.02) * 3.0)
489 strk = 0.5 + 0.5 * sin(u * 41.0 + sin(v * 8.0 + time * 0.37) * 2.2)
490 wsm = refl * (0.22 + 0.48 * strk)
491 fbc = fz * 0.62 + fx * 0.10 + barShift * 0.30
492 fbar = slit(fbc, 0.020 + 0.030 * fd) * exp(-fd * 2.2) * lit * smooth(0.02, 0.18, fd) * (0.30 + 0.70 * exp(-max(0.0, u - wx1) * 0.9))
493 fr = fbase * 1.20 + fbar * 0.52 + wsm * (rfx * 1.15 + rfy * 0.08 + rfz * 0.14) * neonA
494 fg = fbase * 1.00 + fbar * 0.30 + wsm * (rfx * 0.20 + rfy * 0.42 + rfz * 0.21) * neonA
495 fb = fbase * 1.15 + fbar * 0.12 + wsm * (rfx * 0.62 + rfy * 1.05 + rfz * 0.26) * neonA
496 fr = fr + refl * 0.010 + exp(-abs(u + 0.72) * 1.1) * refl * 0.16 * neonA
497 fg = fg + refl * 0.008 + exp(-abs(u + 0.72) * 1.1) * refl * 0.05 * neonA
498 fb = fb + refl * 0.016 + exp(-abs(u + 0.72) * 1.1) * refl * 0.14 * neonA
500 r = mix(wr, fr, fl)
501 g = mix(wg, fg, fl)
502 b = mix(wb, fb, fl)
504 # ---------------- outside the glass
505 ox = (u - wx0) / (wx1 - wx0)
506 oy = (v - wy0) / (wy1 - wy0)
507 gw = fbm(ox * 4.0 + time * 0.055, oy * 4.0 - time * 0.030, 2)
508 oxd = ox + (gw - 0.5) * 0.030 + 0.0035 * sin(oy * 47.0 + time * 2.3)
509 oyd = oy + (gw - 0.5) * 0.010
511 # far buildings, lit windows, hard roof lines
512 bs = floor(oxd * 5.0)
513 bh = 0.36 + 0.34 * hash(bs * 3.17 + 5.0)
514 sky = 1 - step(oyd, bh)
515 bgu = fract(oxd * 48.0)
516 bgv = fract(oyd * 24.0)
517 bw = step(0.30, bgu) * step(bgu, 0.66) * step(0.26, bgv) * step(bgv, 0.62)
518 blit = step(0.70, hash(floor(oxd * 48.0) * 1.7 + floor(oyd * 24.0) * 3.1 + bs * 7.0))
519 bwin = bw * blit * (1 - sky)
521 # sky: deep indigo, a hot magenta bruise at the roofline
522 hz = exp(-abs(oyd - 0.36) * 8.0)
523 skyr = 0.028 + 0.055 * oyd + 0.12 * hz * neonA
524 skyg = 0.034 + 0.050 * oyd + 0.035 * hz * neonA
525 skyb = 0.090 + 0.100 * oyd + 0.10 * hz
526 bldr = 0.010 + 0.005 * hash(bs)
527 orr = mix(skyr, bldr, 1 - sky) + bwin * 0.95 * (0.55 + 0.45 * neonA)
528 org = mix(skyg, bldr * 1.1, 1 - sky) + bwin * 0.58 * (0.55 + 0.45 * neonA)
529 orb = mix(skyb, bldr * 1.5, 1 - sky) + bwin * 0.30 * (0.55 + 0.45 * neonA)
531 # magenta sign, tall and left of the lamp
532 s1 = sdbox(oxd - 0.205, oyd - 0.705, 0.056, 0.120)
533 s1r = 1 / (1 + abs(s1) * 42.0)
534 s1f = (1 - smooth(-0.004, 0.004, s1)) * 0.16
535 s1g = 0.55 / (1 + max(0.0, s1) * 5.0)
536 # cyan sign, low and right
537 s2 = sdbox(oxd - 0.855, oyd - 0.560, 0.036, 0.145)
538 s2r = 1 / (1 + abs(s2) * 42.0)
539 s2f = (1 - smooth(-0.004, 0.004, s2)) * 0.14
540 s2g = 0.50 / (1 + max(0.0, s2) * 6.0)
541 orr = orr + (s1r * 1.55 + s1f + s1g) * neonA + (s2r * 0.16 + s2f * 0.10 + s2g * 0.55) * neonA
542 org = org + (s1r * 0.34 + s1f * 0.12 + s1g * 0.16) * neonA + (s2r * 1.20 + s2f * 0.70 + s2g * 0.85) * neonA
543 orb = orb + (s1r * 1.20 + s1f * 0.55 + s1g * 0.75) * neonA + (s2r * 1.55 + s2f * 0.90 + s2g * 1.00) * neonA
545 # streetlight, the thing they are standing under
546 lampx = oxd - 0.628
547 lampy = oyd - 0.452
548 lampd = len(lampx, lampy * 0.8)
549 lampc = exp(-lampd * lampd * 5200.0)
550 lampg = exp(-lampd * 3.2) * 1.25
551 pole = (1 - smooth(0.0025, 0.0045, abs(lampx))) * step(oyd, 0.420)
552 orr = orr + lampc * 2.30 + lampg * 1.05 + pole * 0.020
553 org = org + lampc * 1.60 + lampg * 0.62 + pole * 0.016
554 orb = orb + lampc * 0.85 + lampg * 0.24 + pole * 0.012
556 # street below the roofline: wet asphalt catching everything
557 str = 1 - step(oyd, 0.190)
558 srf = exp(-abs(oyd - 0.190) * 20.0)
559 orr = mix(orr, 0.020 + srf * 0.55 * neonA, str * 0.82)
560 org = mix(org, 0.022 + srf * 0.18 * neonA, str * 0.82)
561 orb = mix(orb, 0.034 + srf * 0.45, str * 0.82)
563 # rain outside: fast diagonal streaks
564 orr = orr + exp(-abs(oxd - 0.628) * 3.0) * exp(-abs(oyd - 0.190) * 12.0) * 0.25
565 org = org + exp(-abs(oxd - 0.628) * 3.0) * exp(-abs(oyd - 0.190) * 12.0) * 0.13
566 orb = orb + exp(-abs(oxd - 0.628) * 3.0) * exp(-abs(oyd - 0.190) * 12.0) * 0.05
567 rr1 = fract((oyd + oxd * 0.30) * 24.0 - time * 1.5)
568 rstr = exp(-rr1 * 16.0) * step(0.84, hash(floor(oxd * 190.0) + floor(oy * 3.0) * 3.0))
569 orr = orr + rstr * 0.16
570 org = org + rstr * 0.18
571 orb = orb + rstr * 0.26
573 # ---------------- the figure behind the blinds
574 fpx = ox - figX
575 fpy = oy - 0.055
576 dh = len(fpx, fpy - 0.398) - 0.045
577 brx = rot(fpx, fpy - 0.452, 0.10)
578 bry = r1
579 dbr = ellip(brx, bry * 5.2, 0.112, 0.076)
580 dcr = sdbox(fpx, fpy - 0.505, 0.053, 0.036)
581 dnk = sdbox(fpx, fpy - 0.344, 0.024, 0.050)
582 dshl = sdseg(fpx, fpy, 0.0, 0.310, -0.104, 0.248)
583 dshr = sdseg(fpx, fpy, 0.0, 0.310, 0.104, 0.248)
584 dsh = min(dshl, dshr) - 0.030
585 dtr = sdseg(fpx + 0.016 * (fpy - 0.17) * 2.0, fpy, 0.0, 0.286, 0.0, 0.020) - 0.082
586 dco = sdbox(fpx + 0.026 * (fpy + 0.05) * 1.4, fpy + 0.010, 0.106, 0.092)
587 dfg = smin(dh, dcr, 0.012)
588 dfg = min(dfg, dbr)
589 dfg = smin(dfg, dnk, 0.020)
590 dfg = smin(dfg, dsh, 0.038)
591 dfg = smin(dfg, dtr, 0.040)
592 dfg = smin(dfg, dco, 0.050)
593 figm = (1 - smooth(-0.005, 0.010, dfg)) * figF
594 rim = exp(-abs(dfg) * 150.0) * figF
595 orr = orr * (1 - 0.965 * figm) + rim * 0.34
596 org = org * (1 - 0.965 * figm) + rim * 0.20
597 orb = orb * (1 - 0.965 * figm) + rim * 0.10
599 # ---------------- blinds in front of everything outside
600 bsc = oy * 9.0 + 0.018 * sin(ox * 6.0) + time * 0.016
601 bf = fract(bsc)
602 g0 = 0.50 - 0.44 * openA
603 g1 = 0.50 + 0.44 * openA
604 ga = smooth(g0 - 0.004, g0 + 0.004, bf)
605 gb = 1 - smooth(g1 - 0.004, g1 + 0.004, bf)
606 gapm = ga * gb
607 slatlit = exp(-abs(bf - g0) * 85.0) * 0.9 + exp(-abs(bf - g1) * 85.0) * 0.30
608 slr = 0.007 + slatlit * (0.20 + 0.34 * neonA)
609 slg = 0.008 + slatlit * (0.09 + 0.20 * neonA)
610 slb = 0.012 + slatlit * (0.14 + 0.40 * neonA)
612 # wet glass: beads and a haze that slides down
613 bqx = fract(ox * 36.0 + 0.015 * sin(time * 0.31))
614 bqy = fract(oy * 46.0 - time * 0.11)
615 bq = len(bqx - 0.5, bqy - 0.5)
616 bead = exp(-bq * bq * 30.0) * step(0.66, hash(floor(ox * 36.0) * 3.1 + floor(oy * 46.0) * 7.3))
617 glz = 0.92 + bead * 0.34
619 wr2 = mix(slr, orr * glz * gapm, 1.0)
620 wg2 = mix(slg, org * glz * gapm, 1.0)
621 wb2 = mix(slb, orb * glz * gapm, 1.0)
622 # mullion
623 mul = 1 - smooth(0.013, 0.019, abs(ox - 0.505))
624 wr2 = mix(wr2, 0.006, mul)
625 wg2 = mix(wg2, 0.007, mul)
626 wb2 = mix(wb2, 0.010, mul)
627 # faint reflection of the room on the glass
628 wgl2 = exp(-len(ox - 0.34, oy - 0.56) * 3.0) * 0.035
629 wr2 = wr2 + wgl2
630 wg2 = wg2 + wgl2 * 0.8
631 wb2 = wb2 + wgl2 * 0.7
633 r = mix(r, wr2, inwin)
634 g = mix(g, wg2, inwin)
635 b = mix(b, wb2, inwin)
637 # window frame: dark timber with a lit edge
638 band = step(0.0, dxw) * (1 - smooth(0.046, 0.054, dxw))
639 fedge = 1 / (1 + abs(dxw - 0.048) * 85.0)
640 frr = 0.010 + 0.014 * wn + fedge * (0.09 + 0.45 * barl)
641 frg = 0.008 + 0.011 * wn + fedge * (0.05 + 0.22 * barl)
642 frb = 0.010 + 0.012 * wn + fedge * (0.04 + 0.09 * barl)
643 r = mix(r, frr, band)
644 g = mix(g, frg, band)
645 b = mix(b, frb, band)
647 # skirting board where the wall meets the floor
648 sk = step(vh + 0.006, v) * (1 - smooth(vh + 0.040, vh + 0.046, v))
649 sklit = 1 / (1 + abs(v - (vh + 0.045)) * 220.0)
650 r = mix(r, 0.008 + sklit * 0.16 * (0.4 + barl) + barl * 0.10, sk)
651 g = mix(g, 0.007 + sklit * 0.09 * (0.4 + barl) + barl * 0.05, sk)
652 b = mix(b, 0.009 + sklit * 0.03 * (0.4 + barl) + barl * 0.02, sk)
654 # sill under the window, catching the bar light
655 sil = (1 - smooth(whw + 0.008, whw + 0.030, abs(u - wcx))) * step(wy0 - 0.075, v) * step(v, wy0 - 0.022)
656 r = mix(r, 0.016 + barl * 0.75, sil)
657 g = mix(g, 0.012 + barl * 0.40, sil)
658 b = mix(b, 0.011 + barl * 0.14, sil)
660 # ---------------- smoke off a cigarette in the dark corner
661 rise = max(0.0, v + 0.80)
662 spine = 1.16 + 0.075 * sin(rise * 2.2 + time * 0.28) + 0.045 * sin(rise * 5.3 - time * 0.44)
663 spx = (u - spine) / (0.030 + 0.52 * rise)
664 sm1 = fbm(spx * 1.9 + time * 0.10, rise * 2.3 - time * 0.22, 2)
665 sm2 = 0.5 + 0.5 * sin(spx * 9.0 - time * 1.1 + rise * 7.0)
666 dens = smooth(0.40, 0.74, sm1 * 0.80 + sm2 * 0.20)
667 dens = dens * exp(-spx * spx * 1.15) * smooth(0.0, 0.10, rise) * smokeA
668 dens = dens * (1 - smooth(0.75, 1.35, rise))
669 smlit = 0.05 + barl * 2.6 + bglow * 0.35
670 r = r + dens * smlit * 1.35
671 g = g + dens * smlit * 0.82
672 b = b + dens * smlit * 0.38
674 # dust hanging in the shafts
675 mfn = hash(floor(u * 130.0) + floor(v * 130.0) * 31.0)
676 mote = step(0.9972, mfn) * (0.45 + 0.55 * sin(time * 1.7 + u * 37.0 + v * 21.0))
677 mglow = mote * (0.02 + barl * 1.7 + bglow * 0.3)
678 r = r + mglow * 0.95
679 g = g + mglow * 0.60
680 b = b + mglow * 0.30
682 # the ember itself
683 ed = len(u - 1.16, v + 0.80)
684 ec = exp(-ed * ed * 2600.0)
685 eg = exp(-ed * 20.0) * 0.30
686 r = r + ec * ember * 2.0 + eg * ember * 0.55
687 g = g + ec * ember * 0.66 + eg * ember * 0.16
688 b = b + ec * ember * 0.20 + eg * ember * 0.05
690 # ---------------- grade
691 vg = len(u * 0.86, v * 0.92)
692 cm = (1 - 0.40 * vg * vg) * glow
693 rgb(r * cm, g * cm, b * cm)
694 cadd(0.0012, 0.0010, 0.0032)
697post {
698 # film: gate weave, bloom, halation, chromatic fringing, grain
699 wx = floor(0.7 * sin(time * 0.83) + 0.5)
700 wy = floor(0.5 * sin(time * 0.61 + 2.0) + 0.5)
701 cr = tap(wx, wy)
702 cg = r1
703 cb = r2
704 br = 0
705 bg = 0
706 bb = 0
707 s0 = tap(wx - 2, wy)
708 br = br + s0
709 bg = bg + r1
710 bb = bb + r2
711 s0 = tap(wx + 2, wy)
712 br = br + s0
713 bg = bg + r1
714 bb = bb + r2
715 s0 = tap(wx, wy - 2)
716 br = br + s0
717 bg = bg + r1
718 bb = bb + r2
719 s0 = tap(wx, wy + 2)
720 br = br + s0
721 bg = bg + r1
722 bb = bb + r2
723 s0 = tap(wx - 4, wy - 4)
724 br = br + s0 * 0.6
725 bg = bg + r1 * 0.6
726 bb = bb + r2 * 0.6
727 s0 = tap(wx + 4, wy + 4)
728 br = br + s0 * 0.6
729 bg = bg + r1 * 0.6
730 bb = bb + r2 * 0.6
731 s0 = tap(wx + 7, wy)
732 br = br + s0 * 0.5
733 bg = bg + r1 * 0.5
734 bb = bb + r2 * 0.5
735 s0 = tap(wx, wy - 7)
736 br = br + s0 * 0.5
737 bg = bg + r1 * 0.5
738 bb = bb + r2 * 0.5
739 br = br * 0.0875
740 bg = bg * 0.0875
741 bb = bb * 0.0875
742 # chromatic fringing, only on the snare/brush hits
743 fg = 0.55 * brushE
744 ar = tap(wx - 1 - floor(3.0 * brushE), wy)
745 ab = tap(wx + 1 + floor(3.0 * brushE), wy + 1)
746 r = cr + br * 0.46 + (ar - cr) * fg
747 g = cg + bg * 0.44
748 b = cb + bb * 0.46 + (ab - cb) * fg
749 # warm highlights, cool shadows
750 r = r * 1.035 + 0.0035
751 g = g * 1.000 + 0.0030
752 b = b * 0.955 + 0.0085
753 d = len(u, v)
754 r = r * (1 - 0.32 * d * d)
755 g = g * (1 - 0.32 * d * d)
756 b = b * (1 - 0.28 * d * d)
757 # grain and gate flicker
758 gr = (hash(x * w * 0.41 + y * h * 0.73 + frame * 13.7) - 0.5) * 0.028
759 r = r + gr
760 g = g + gr * 0.85
761 b = b + gr * 0.75 + (hash(x * w * 0.19 + y * h * 0.37 + frame * 5.3) - 0.5) * 0.012
762 rgb(max(r, 0.0), max(g, 0.0), max(b, 0.0))

Click a line number to link to that line.