dmscene Demos & source

WAITINGROOM

waitingroom.dmt · 120 BPM · 30 s · 960×600

model-madesame brief

notes

the most abstract: striped wall, a single light bar, a glowing vending machine, a near-triangular silhouette and a wet-floor reflection; almost no conventional perspective

filewaitingroom.dmt
duration0:30
video960×600 · 30 fps · h264 + audio · 2.1 MB
song120 BPM · speed 6 · rpb 4 · 6 channels
loop0
renderscale 1 · master 0.58
uniformsflicker humBreath rainAmt kickE
modelKimi K2.7 Code
collectionSame brief, six models
tagsmodel-madesame brief
source398 lines · 15 KB · download

anatomy

10VM programs
8patterns
2palettes
0timeline events
0text / sample / texture
398source lines
7inst
0chan
1master
1frame
1pixel
0post
3fn

line composition

pattern 37%pixel 36%inst 12%palette 4%fn 4%frame 3%master 2%title 0%song 0%order 0%pan 0%uniform 0%

play order

0011223344556677

order list · 16 entries

palettes

night7 keys · lines 13–21
amber5 keys · lines 23–29

timeline

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

resources

No external text, samples, textures or envelopes.

source

download .dmt
1# @model Kimi K2.7 Code
2# @collection Same brief, six models
3# @description the most abstract: striped wall, a single light bar, a glowing vending machine, a near-triangular silhouette and a wet-floor reflection; almost no conventional perspective
4# @tags brief
5# waitingroom.dmt - 4 a.m. platform, one person, late train
6# 120 BPM, 30 s, 960x600 @ 30 fps. Atmospheric ambient/industrial.
8title WAITINGROOM
9song bpm=120 speed=6 rpb=4 channels=6 loop=0 volume=0.58
10order 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7
11pan 0.5 0.5 0.5 0.4 0.6 0.5
13palette night {
14 0.00 0.050 0.070 0.110
15 0.18 0.090 0.120 0.170
16 0.35 0.160 0.180 0.220
17 0.52 0.280 0.270 0.290
18 0.68 0.520 0.420 0.320
19 0.82 0.800 0.600 0.260
20 1.00 0.950 0.910 0.840
23palette amber {
24 0.00 0.06 0.03 0.00
25 0.25 0.35 0.14 0.01
26 0.50 0.85 0.45 0.04
27 0.72 1.00 0.70 0.14
28 1.00 1.00 0.88 0.38
31fn sdSegment(px, py, ax, ay, bx, by) {
32 abx = bx - ax
33 aby = by - ay
34 tt = clamp(((px - ax) * abx + (py - ay) * aby) / (abx * abx + aby * aby + 0.0001), 0, 1)
35 return len(px - (ax + abx * tt), py - (ay + aby * tt))
38fn sdBox(px, py, cx, cy, sx, sy) {
39 dx = abs(px - cx) - sx
40 dy = abs(py - cy) - sy
41 return len(max(dx, 0), max(dy, 0)) + min(max(dx, dy), 0)
44fn sdCircle(px, py, cx, cy, r) {
45 return len(px - cx, py - cy) - r
48# ------------------------------------------------------------------ audio
49inst kick {
50 f = 42 + 360 * exp(-t * 28)
51 $p = $p + f / sr
52 body = sin($p * tau) * exp(-t * 7)
53 air = lp(noise(), 600) * exp(-t * 55)
54 out(dist(body * 1.8 + air * 0.2, 1.25) * 0.55)
57inst hat {
58 n = hp(noise(), 7000)
59 out(n * exp(-t * (28 + 60 * (1 - vel))) * 0.10 * vel)
62inst bass {
63 e = env(0.05, 0.35, 0.55, 0.45)
64 s = sin(ph * tau)
65 s = s + sin(ph * tau * 2 + 0.4) * 0.35
66 s = lp(s, 240 + 700 * e)
67 out(s * e * 0.38)
70inst pad {
71 e = env(0.35, 0.8, 0.72, 1.1)
72 a = saw(ph + t * 0.0009)
73 b = saw(ph - t * 0.0011)
74 s = svf(a * 0.5 + b * 0.5, 500 + 900 * e + 300 * sin(t * 0.19), 0.35)
75 out(s * e * 0.22)
78inst rain {
79 n = hp(noise(), 800)
80 n = lp(n, 2200)
81 g = 0.55 + 0.45 * sin(t * 0.13)
82 out(n * g * 0.055)
85inst hum {
86 e = env(0.6, 0.6, 1.0, 0.8)
87 s = sin(ph * tau) * 0.5 + sin(ph * tau * 2.01) * 0.25
88 s = s + lp(noise(), 140) * 0.3
89 out(s * e * 0.09)
92inst bell {
93 e = env(0.001, 0.6, 0.0, 0.55)
94 m = sin(ph * tau * 2.7) * exp(-t * 3.5) * 2.0
95 s = sin(ph * tau + m)
96 s = s + sin(ph * tau * 1.41) * 0.5
97 s = lp(s, 3000 + 5000 * e)
98 out(s * e * 0.18)
101master {
102 dl = dly(l, 0.50, 0.32)
103 dr = dly(r, 0.375, 0.32)
104 vl = verb(l + r, 0.78, 0.50)
105 out(dist(l + dr * 0.22 + vl * 0.12, 1.12), dist(r + dl * 0.22 + vl * 0.12, 1.12))
108# ------------------------------------------------------------------ patterns (15 rows = 3.75 beats, 8 patterns = 30 s)
109# channels: 0 kick 1 hats 2 bass 3 pad 4 rain 5 hum/bell
110pattern 0 rows=15 {
111 . | . .. ... | . | A-2 4 24 | A-4 6 22 | A-2 7 30
112 . | . .. ... | . | . | . | .
113 . | . .. ... | . | . | . | .
114 . | . .. ... | . | . | . | .
115 C-2 1 34 | . .. ... | . | E-2 4 22 | . | .
116 . | . .. ... | . | . | . | .
117 . | . .. ... | . | . | A-4 6 18 | .
118 . | . .. ... | . | . | . | .
119 . | . .. ... | . | . | . | .
120 . | . .. ... | . | . | . | .
121 . | C-6 2 12 | . | A-2 4 24 | . | .
122 . | . .. ... | . | . | . | .
123 . | . .. ... | . | . | . | .
124 . | . .. ... | . | . | A-4 6 16 | .
125 . | . .. ... | . | . | . | .
128pattern 1 rows=15 {
129 C-2 1 36 | . .. ... | A-1 3 30 | A-2 4 26 | A-4 6 24 | A-2 7 32
130 . | . .. ... | . | . | . | .
131 . | . .. ... | . | . | . | .
132 . | C-6 2 10 | . | . | . | .
133 . | . .. ... | . | E-2 4 22 | A-4 6 20 | .
134 . | . .. ... | . | . | . | .
135 . | . .. ... | . | . | . | .
136 . | . .. ... | . | . | . | .
137 C-2 1 34 | . .. ... | . | . | . | .
138 . | . .. ... | . | . | . | .
139 . | . .. ... | . | . | A-4 6 18 | .
140 . | C-6 2 10 | . | . | . | .
141 . | . .. ... | . | . | . | .
142 . | . .. ... | . | . | . | .
143 . | . .. ... | . | . | . | .
146pattern 2 rows=15 {
147 C-2 1 38 | . .. ... | A-1 3 32 | A-2 4 28 | A-4 6 26 | A-2 7 34
148 . | . .. ... | . | . | . | .
149 . | . .. ... | . | . | . | .
150 . | C-6 2 12 | . | . | . | .
151 . | . .. ... | . | E-2 4 24 | A-4 6 22 | .
152 . | . .. ... | . | . | . | .
153 . | . .. ... | . | . | . | .
154 . | . .. ... | . | . | . | .
155 C-2 1 36 | . .. ... | . | . | . | .
156 . | . .. ... | . | . | . | .
157 . | . .. ... | . | . | A-4 6 20 | .
158 . | C-6 2 12 | . | . | . | .
159 . | . .. ... | . | . | . | .
160 . | . .. ... | . | . | . | .
161 . | . .. ... | . | . | . | .
164pattern 3 rows=15 {
165 C-2 1 36 | . .. ... | F-1 3 30 | F-2 4 26 | A-4 6 24 | A-2 7 32
166 . | . .. ... | . | . | . | .
167 . | . .. ... | . | . | . | .
168 . | C-6 2 10 | . | . | . | .
169 . | . .. ... | . | C-3 4 24 | A-4 6 22 | .
170 . | . .. ... | . | . | . | .
171 . | . .. ... | . | . | . | .
172 . | . .. ... | . | . | . | .
173 C-2 1 34 | . .. ... | . | . | . | .
174 . | . .. ... | . | . | . | .
175 . | . .. ... | . | . | A-4 6 20 | .
176 . | C-6 2 10 | . | . | . | .
177 . | . .. ... | . | . | . | .
178 . | . .. ... | . | . | . | .
179 . | . .. ... | . | . | . | .
182pattern 4 rows=15 {
183 C-2 1 32 | . .. ... | D-1 3 28 | D-2 4 24 | A-4 6 22 | A-2 7 30
184 . | . .. ... | . | . | . | .
185 . | . .. ... | . | . | . | .
186 . | C-6 2 10 | . | . | . | .
187 . | . .. ... | . | F-2 4 22 | A-4 6 20 | .
188 . | . .. ... | . | . | . | .
189 . | . .. ... | . | . | . | .
190 . | . .. ... | . | . | . | .
191 C-2 1 30 | . .. ... | . | . | . | .
192 . | . .. ... | . | . | . | .
193 . | . .. ... | . | . | A-4 6 18 | .
194 . | C-6 2 10 | . | . | . | .
195 . | . .. ... | . | . | . | .
196 . | . .. ... | . | . | . | .
197 . | . .. ... | . | . | . | .
200pattern 5 rows=15 {
201 C-2 1 36 | . .. ... | A-1 3 32 | A-2 4 28 | A-4 6 26 | A-2 7 34
202 . | . .. ... | . | . | . | .
203 . | . .. ... | . | . | . | .
204 . | C-6 2 12 | . | . | . | .
205 . | . .. ... | . | E-2 4 24 | A-4 6 24 | .
206 . | . .. ... | . | . | . | .
207 . | . .. ... | . | . | . | .
208 . | . .. ... | . | . | . | .
209 C-2 1 38 | . .. ... | . | . | . | .
210 . | . .. ... | . | . | . | .
211 . | . .. ... | . | . | A-4 6 22 | .
212 . | C-6 2 12 | . | . | . | .
213 . | . .. ... | . | . | . | .
214 . | . .. ... | . | . | . | .
215 . | . .. ... | . | . | . | .
218pattern 6 rows=15 {
219 C-2 1 38 | . .. ... | A-1 3 34 | A-2 4 30 | A-4 6 28 | A-2 7 36
220 . | . .. ... | . | . | . | .
221 . | . .. ... | . | . | . | .
222 . | C-6 2 14 | . | . | . | .
223 . | . .. ... | . | E-2 4 26 | A-4 6 26 | .
224 . | . .. ... | . | . | . | .
225 . | . .. ... | . | . | . | .
226 . | . .. ... | . | . | . | .
227 C-2 1 40 | . .. ... | . | . | . | .
228 . | . .. ... | . | . | . | .
229 . | . .. ... | . | . | A-4 6 24 | .
230 . | C-6 2 14 | . | . | . | .
231 . | . .. ... | . | . | . | .
232 . | . .. ... | . | . | . | .
233 . | . .. ... | . | . | . | .
236pattern 7 rows=15 {
237 C-2 1 34 | . .. ... | A-1 3 30 | A-2 4 26 | A-4 6 24 | A-2 7 32
238 . | . .. ... | . | . | . | .
239 . | . .. ... | . | . | . | .
240 . | C-6 2 10 | . | . | . | .
241 . | . .. ... | . | E-2 4 22 | A-4 6 22 | .
242 . | . .. ... | . | . | . | .
243 . | . .. ... | . | . | . | .
244 . | . .. ... | . | . | . | .
245 C-2 1 32 | . .. ... | . | . | . | .
246 . | . .. ... | . | . | . | .
247 . | . .. ... | . | . | A-4 6 20 | .
248 . | C-6 2 10 | . | . | . | .
249 . | . .. ... | . | . | . | .
250 . | . .. ... | . | . | . | .
251 . | . .. ... | . | . | . | .
254# ------------------------------------------------------------------ visuals
255uniform flicker humBreath rainAmt kickE
257frame {
258 # fluorescent tube flicker: 60 Hz hum plus occasional dip
259 f = 0.85 + 0.13 * sin(t * 377) + 0.05 * sin(t * 120)
260 f = f * (1 - step(0.97, hash(floor(t * 30))) * 0.35)
261 flicker = clamp(f, 0.45, 1.15)
263 humBreath = 0.9 + 0.1 * sin(t * 0.9)
264 rainAmt = 0.35 + 0.25 * sin(t * 0.07) + 0.15 * cenv(4)
265 kickE = exp(-trig(0) * 6)
268pixel {
269 horizon = -0.08
270 isFloor = step(0, horizon - v)
271 isWall = 1 - isFloor
273 dz = max(0.001, horizon - v)
274 z = 0.28 / dz
275 wx = u * z
276 depthFade = exp(-z * 0.35)
278 wallZ = 3.5
279 wxWall = u * wallZ
281 toneWall = 0.22 + 0.08 * isWall + 0.05 * sin(wxWall * 0.4)
282 pal(night, toneWall)
283 cadd(0.10, 0.11, 0.13)
285 toneFloor = 0.20 + 0.05 * z + 0.04 * sin(wx * 0.5) + 0.10 * depthFade
286 pal(night, mix(toneWall, toneFloor, isFloor))
287 cadd(isFloor * 0.08, isFloor * 0.085, isFloor * 0.10)
289 # floor tiles
290 tileX = abs(fract(wx * 0.8 + 0.5) - 0.5)
291 tileZ = abs(fract(z * 0.6) - 0.5)
292 tile = exp(-tileX * tileX * 120 / (1 + z * 0.1)) * exp(-tileZ * tileZ * 80 / (1 + z * 0.1))
293 cadd(tile * 0.10 * isFloor, tile * 0.10 * isFloor, tile * 0.12 * isFloor)
295 # track edge line on the floor
296 trackD = abs(wx - 0.55) / (1 + z * 0.15)
297 track = exp(-trackD * trackD * 90)
298 cadd(track * 0.06 * isFloor, track * 0.06 * isFloor, track * 0.07 * isFloor)
300 # distant late-train headlight down the track
301 trainPhase = 0.5 + 0.5 * sin(t * 0.15)
302 trainX = 0.55
303 trainZ = 8.0 + 4.0 * sin(t * 0.08)
304 trainU = trainX / trainZ
305 trainV = horizon - 0.28 / trainZ
306 trainD = len(u - trainU, v - trainV)
307 trainGlow = exp(-trainD * trainD * 600 / trainZ) * trainPhase * isFloor
308 cadd(trainGlow * 0.35, trainGlow * 0.32, trainGlow * 0.22)
310 # atmospheric haze / fog on the floor
311 fog = fbm(wx * 0.5 + t * 0.02, z * 0.3, 3) * exp(-z * 0.4) * isFloor
312 cadd(fog * 0.04, fog * 0.045, fog * 0.055)
314 # receding pillars on the left
315 pillarX = fract(wx * 0.22 + 0.5) - 0.5
316 pillarZ = fract(z * 0.22) - 0.5
317 pillarD = sdBox(pillarX * 2.2, pillarZ * 0.18 + 0.25, 0, 0.35, 0.12, 0.08)
318 pillar = exp(-pillarD * pillarD * 110)
319 cadd(pillar * 0.22, pillar * 0.23, pillar * 0.28)
321 # ceiling fluorescent tubes
322 tubeY = 0.22 + 0.04 * sin(wxWall * 0.3)
323 tubeD = sdSegment(u, v, -0.8, tubeY, 0.8, tubeY)
324 tube = exp(-tubeD * tubeD * 2600) * flicker
325 cadd(tube * 1.2, tube * 1.25, tube * 1.3)
327 # vending machine on the right wall
328 vmZ = 3.2
329 vmX = 0.55
330 vmY = -0.06
331 vmScale = wallZ / vmZ
332 vmPx = (u - vmX) * vmScale
333 vmPy = (v - vmY) * vmScale
334 vmBody = sdBox(vmPx, vmPy, 0, 0, 0.18, 0.32)
335 vmFill = step(vmBody, 0) * isWall
336 vmGlow = exp(-vmBody * vmBody * 400) * vmFill
338 # replace wall colour with amber inside the vending machine
339 oldR = cget(0)
340 oldG = cget(1)
341 oldB = cget(2)
342 pal(amber, 0.45 + 0.25 * sin(t * 0.4) + 0.15 * hash(floor(t * 8) * 0.1))
343 cmul(humBreath)
344 newR = cget(0)
345 newG = cget(1)
346 newB = cget(2)
347 rgb(mix(oldR, newR, vmFill), mix(oldG, newG, vmFill), mix(oldB, newB, vmFill))
348 cadd(vmGlow * 0.70, vmGlow * 0.35, 0)
350 # internal vending lights
351 liteY = vmPy + 0.20
352 liteRow = abs(fract(liteY * 6) - 0.5)
353 lite = vmFill * exp(-liteRow * liteRow * 100) * (0.6 + 0.4 * sin(t * 2 + liteY * 10))
354 cadd(lite * 0.70, lite * 0.24, 0)
356 # lone figure silhouette on the floor, centre-left
357 figZ = 1.7
358 figScale = z / figZ
359 fx = (u + 0.12) * figScale
360 fy = (v - horizon) * figScale + 0.30
361 head = sdCircle(fx, fy - 0.50, 0, 0, 0.032)
362 torso = sdBox(fx, fy - 0.21, 0, 0, 0.035, 0.18)
363 leg1 = sdSegment(fx, fy, -0.018, 0.02, -0.025, -0.18)
364 leg2 = sdSegment(fx, fy, 0.018, 0.02, 0.03, -0.18)
365 figD = min(min(head, torso), min(leg1, leg2))
366 fig = step(figD, 0) * isFloor * step(0.25, figScale) * (1 - step(2.2, figScale))
367 cmul(1 - fig * 0.92)
368 cadd(fig * 0.02, fig * 0.02, fig * 0.03)
370 # rain on the glass: bright vertical streaks
371 rx = x * 50 + fbm(t * 0.07, x * 4, 2) * 1.2
372 ry = y * 80 - t * 6
373 streak = fbm(rx, ry, 3)
374 drop = pow(streak, 5) * rainAmt
375 # water refraction shift
376 refractU = u + drop * 0.02 * sin(ry * 4)
377 refractV = v + drop * 0.015 * cos(rx * 3)
378 refr = prev(refractU + 0.5, refractV + 0.5)
379 cmul(1 - drop * 0.20)
380 cadd(refr * 0.18 * drop, refr * 0.22 * drop, refr * 0.28 * drop)
381 # extra bright streak highlights
382 highlight = pow(streak, 18) * rainAmt
383 cadd(highlight * 0.25, highlight * 0.28, highlight * 0.32)
385 # wet floor reflection (only below horizon)
386 reflU = u
387 reflV = horizon + (horizon - v) * 0.65
388 refl = prev(reflU + 0.5, reflV + 0.5)
389 floorMask = step(0, horizon - v)
390 cadd(refl * 0.20 * floorMask * (1 - v * 1.2), refl * 0.14 * floorMask * (1 - v * 1.2), refl * 0.08 * floorMask * (1 - v * 1.2))
392 # subtle kick pulse in overall exposure
393 cmul(0.92 + 0.08 * kickE)
395 # vignette
396 d = len(u, v * 0.8)
397 cmul(1 - 0.25 * d * d)

Click a line number to link to that line.

← VOWELS