# elevated.dmt — a study/homage of "elevated" by Rgba & TBC (2009). # One continuous camera flight over a procedural mountain range: valley dawn, # ridge crossings, two lake skims, then the pull-up into the light. The terrain is # a raymarched ridged-fbm heightfield with a carved valley corridor and a lake # basin; water is the same field clamped to sea level with ripple reflections. # Original music: a two-minute taiko/strings/brass/choir build, climax at 90 s. # @duration 120 # @description A continuous two-minute mountain flight, from misty valleys through two lakes to a sunlit summit. title ELEVATED song bpm=96 speed=6 rpb=4 channels=8 loop=0 volume=0.46 scale=2 dither=1 order 0 0 1 1 2 2 3 2 4 5 6 7 4 5 6 7 8 8 9 10 8 9 10 7 2 2 3 2 4 5 6 7 11 11 11 12 13 14 13 14 15 16 15 16 17 17 18 18 pan 0.5 0.55 0.45 0.5 0.42 0.58 0.5 0.5 text ttl1 "ELEVATED" text cred "AFTER ELEVATED BY RGBA & TBC, 2009" # 48 bars at 96 BPM: dawn, ridge traverse, first lake, second valley, # second lake and crescendo, then a twenty-second release into the light. timeline { 0:00 alt=1.5 pitch=-0.06 shake=0.5 mist=1.0 fog=1.2 mbK=0.15 2:00 alt=1.6 4:00 alt=2.2 pitch=0.00 mist=0.8 6:00 alt=3.2 pitch=0.10 mist=0.5 8:00 alt=4.4 pitch=0.20 fog=0.9 mbK=0.22 10:00 alt=5.8 pitch=0.14 mbK=0.28 12:00 alt=4.2 pitch=0.08 mist=0.4 14:00 alt=2.6 pitch=0.10 mist=0.3 mbK=0.38 16:00 alt=1.1 pitch=0.05 mbK=0.52 18:00 alt=1.0 pitch=0.03 shake=0.8 mbK=0.58 20:00 alt=1.4 pitch=-0.02 mbK=0.52 22:00 alt=3.0 pitch=0.06 shake=0.5 mbK=0.30 24:00 alt=4.8 pitch=0.12 mist=0.6 fog=1.1 mbK=0.22 26:00 alt=3.6 pitch=0.08 mist=0.5 28:00 alt=1.8 pitch=0.04 mist=0.35 mbK=0.40 30:00 alt=1.1 pitch=0.03 fog=0.9 mbK=0.52 32:00 alt=1.0 pitch=-0.02 shake=0.8 mbK=0.58 34:00 alt=2.2 pitch=-0.05 shake=0.6 mbK=0.45 36:00 alt=6.5 pitch=0.12 shake=1.0 mist=0.15 mbK=0.32 38:00 alt=8.5 pitch=0.10 mbK=0.25 40:00 alt=9.5 pitch=0.02 shake=0.5 mbK=0.20 42:00 alt=10.0 pitch=-0.04 44:00 alt=10.0 pitch=-0.07 fog=0.7 mbK=0.15 47:00 alt=10.0 pitch=-0.10 } # ------------------------------------------------------------------ instruments # ch0 taiko | ch1 rim | ch2 timpani | ch3 bass | ch4 strings | ch5 brass | ch6 choir | ch7 wind/cymbal inst taiko { f = 52 + 260 * exp(-t * 12) $p = $p + f / sr body = sin($p * tau) * exp(-t * 3.2) sl = lp(noise(), 900) * exp(-t * 22) * 0.5 out(dist(body * 2.0 + sl, 1.4) * 0.9) } inst rim { e = exp(-t * 38) n = hp(noise(), 2500) * 0.5 p = sin(tau * 1740 * t) * exp(-t * 60) out((n * exp(-t * 30) + p) * e * 0.30) } inst timp { f = freq * (1 + 0.5 * exp(-t * 9)) $p = $p + f / sr m = sin($p * tau) mem = lp(noise(), 1200) * exp(-t * 18) * 0.4 out(dist(m * exp(-t * 2.6) * 1.8 + mem, 1.3) * 0.7) } inst bass { e = env(0.02, 0.35, 0.85, 0.5) s = sin(ph * tau) * 0.9 + bsaw(ph, freq) * 0.25 s = svf(s, 160 + 300 * e + 200 * p0, 0.3) out(dist(s * e, 1.2) * 0.55) } inst strings nna=continue { e = env(0.6, 1.1, 0.9, 1.8) s = usaw(freq, 0.14) + usaw(freq * 0.5, 0.09) * 0.7 s = svf(s, 240 + 900 * e + 500 * p0, 0.35) s = s + r2 * 0.4 out(dist(s * 0.5, 1.15) * e * 0.38) } inst brass nna=continue { e = env(0.30, 1.0, 0.85, 1.5) f = freq * (1 + 0.004 * sin(t * 4.8) * min(t, 1)) s = usaw(f, 0.18) + usaw(f * 1.5, 0.1) * 0.35 s = svf(s, 350 + 2400 * e + 900 * p0, 0.4) s = s + r2 * 0.6 out(dist(s * 0.45, 1.25) * e * 0.32) } inst choir nna=continue { e = env(0.5, 1.3, 0.85, 2.2) vib = 0.006 * sin(t * 5.2) * min(t * 1.5, 1) s = usaw(freq * (1 + vib), 0.12) f1 = 480 + 340 * p0 f2v = 880 + 420 * p0 s1 = svf(s, f1, 0.75) bp1 = r2 s2 = svf(s, f2v, 0.78) bp2 = r2 v = bp1 * 1.2 + bp2 * 0.9 + lp(s, 400) * 0.35 br = svf(noise(), 3200, 0.7) v = v + r2 * 0.10 out(v * e * 0.38) } inst wind nna=continue { e = env(1.8, 2.5, 0.7, 3.0) n = svf(noise(), 320 + 260 * sin(t * 0.23) + 700 * p0, 0.55) out((r2 * 0.8 + n * 0.2) * e * 0.10) } inst cym { e = exp(-t * 1.1) n = hp(noise(), 6000) out(n * e * 0.13) } chan 0 { w = verb(x, 0.5, 0.5) out(x * 0.9 + w * 0.18) } chan 4 { w = verb(x, 0.85, 0.4) out(x * 0.78 + w * 0.40) } chan 5 { w = verb(x, 0.88, 0.35) out(x * 0.76 + w * 0.45) } chan 6 { w = verb(x, 0.92, 0.5) d = dly(x, 0.3125, 0.25) out(x * 0.72 + w * 0.55 + d * 0.15) } master { dl = dly(l, 0.2344, 0.16) dr = dly(r, 0.3125, 0.16) w = verb((l + r) * 0.45, 0.80, 0.45) out(dist(l * 0.62 + dr * 0.07 + w * 0.08, 1.05), dist(r * 0.62 + dl * 0.07 + w * 0.08, 1.05)) } # ------------------------------------------------------------------ score # Phrase: dawn mist, drone only pattern 0 rows=16 { 0: . | . | . | D-1 4 30 | D-2 5 1E | . | . | C-3 8 1E S30 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: . | . | . | . | . | . | . | . 4: . | . | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: . | . | . | . | . | . | . | . 7: . | . | . | . | . | . | . | . 8: . | . | . | . | . | . | . | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: . | . | . | . | . | . | . | . 12: . | . | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: . | . | . | . | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: taiko heartbeat pattern 1 rows=16 { 0: C-2 1 2C | . | D-1 3 28 | D-1 4 30 | D-2 5 20 | . | . | C-3 8 20 S30 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: . | . | . | . | . | . | . | . 4: . | . | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: . | . | . | . | . | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 1E | . | . | . | . | . | . | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: . | . | . | . | . | . | . | . 12: . | . | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: . | . | . | . | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: strings gather in the valley pattern 2 rows=16 { 0: C-2 1 30 | . | D-1 3 2C | D-1 4 32 | D-2 5 24 | . | . | C-3 8 20 S38 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: . | . | . | . | . | . | . | . 4: . | . | . | . | F-3 5 20 | . | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 22 | . | . | . | . | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 2A | C-5 2 16 | D-1 3 22 | . | A-3 5 20 | . | . | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: . | . | . | . | . | . | . | . 12: . | . | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: C-2 1 22 | . | . | . | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: fuller Dm pattern 3 rows=16 { 0: C-2 1 34 | . | D-1 3 2C | D-1 4 34 | D-2 5 26 | . | . | C-3 8 22 S40 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: C-2 1 24 | . | . | . | F-3 5 22 | . | . | . 4: . | C-5 2 1C | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 28 | . | . | . | A-3 5 22 | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 2E | . | D-1 3 24 | D-1 4 2E | . | . | . | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: C-2 1 24 | . | . | . | . | . | . | . 12: . | C-5 2 18 | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: C-2 1 26 | . | A-1 3 22 | A-1 4 2A | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: Dm, brass enters — the climb pattern 4 rows=16 { 0: C-2 1 34 | . | D-1 3 30 | D-1 4 36 | D-2 5 28 | D-3 6 1C | . | C-3 8 22 S40 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: C-2 1 24 | . | . | . | F-3 5 24 | . | . | . 4: . | C-5 2 20 | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 28 | . | . | . | A-3 5 24 | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 30 | . | D-1 3 26 | D-1 4 30 | . | A-3 6 1A | . | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: C-2 1 24 | . | . | . | . | . | . | . 12: . | C-5 2 1C | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: C-2 1 26 | . | A-1 3 24 | A-1 4 2C | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: Bb pattern 5 rows=16 { 0: C-2 1 34 | . | A#1 3 30 | A#1 4 36 | A#2 5 28 | A#2 6 1C | . | C-3 8 22 S40 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: C-2 1 24 | . | . | . | D-4 5 22 | . | . | . 4: . | C-5 2 20 | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 28 | . | . | . | F-4 5 22 | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 30 | . | A#1 3 26 | A#1 4 30 | . | F-3 6 1A | . | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: C-2 1 24 | . | . | . | . | . | . | . 12: . | C-5 2 1C | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: C-2 1 26 | . | F-2 3 24 | F-2 4 2C | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: F pattern 6 rows=16 { 0: C-2 1 34 | . | F-1 3 30 | F-1 4 36 | F-2 5 28 | F-3 6 1C | . | C-3 8 22 S40 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: C-2 1 24 | . | . | . | A-3 5 22 | . | . | . 4: . | C-5 2 20 | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 28 | . | . | . | C-4 5 22 | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 30 | . | F-1 3 26 | F-1 4 30 | . | C-4 6 1A | . | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: C-2 1 24 | . | . | . | . | . | . | . 12: . | C-5 2 1C | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: C-2 1 26 | . | C-2 3 24 | C-2 4 2C | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: C pattern 7 rows=16 { 0: C-2 1 34 | . | C-2 3 30 | C-2 4 36 | C-3 5 28 | C-3 6 1C | . | C-3 8 22 S40 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: C-2 1 24 | . | . | . | E-3 5 22 | . | . | . 4: . | C-5 2 20 | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 28 | . | . | . | G-3 5 22 | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 30 | . | C-2 3 26 | C-2 4 30 | . | G-3 6 1A | . | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: C-2 1 24 | . | . | . | . | . | . | . 12: . | C-5 2 1C | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: C-2 1 26 | . | G-1 3 24 | G-1 4 2C | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: Dm high — over the ridge, choir enters pattern 8 rows=16 { 0: C-2 1 38 | . | D-1 3 32 | D-1 4 38 | D-2 5 2A | D-3 6 24 | . | C-3 8 24 S50 1: . | . | . | . | . | . | . | . 2: C-2 1 24 | . | . | . | . | . | . | . 3: . | . | . | . | F-3 5 26 | . | . | . 4: . | C-5 2 24 | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 2A | . | . | . | A-3 5 26 | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 32 | . | D-1 3 28 | D-1 4 32 | . | A-3 6 20 | A-4 7 1C S30 | . 9: . | . | . | . | . | . | . | . 10: C-2 1 24 | . | . | . | . | . | . | . 11: . | . | . | . | . | . | . | . 12: . | C-5 2 20 | . | . | . | . | D-5 7 1C S30 | . 13: C-2 1 26 | . | . | . | . | . | . | . 14: C-2 1 28 | . | A-1 3 26 | A-1 4 2E | . | . | . | . 15: . | C-5 2 18 | . | . | . | . | . | . } # Phrase: Bb high pattern 9 rows=16 { 0: C-2 1 38 | . | A#1 3 32 | A#1 4 38 | A#2 5 2A | A#2 6 24 | F-4 7 1E S30 | C-3 8 24 S50 1: . | . | . | . | . | . | . | . 2: C-2 1 24 | . | . | . | . | . | . | . 3: . | . | . | . | D-4 5 24 | . | . | . 4: . | C-5 2 24 | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 2A | . | . | . | F-4 5 24 | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 32 | . | A#1 3 28 | A#1 4 32 | . | F-3 6 20 | D-5 7 1E S30 | . 9: . | . | . | . | . | . | . | . 10: C-2 1 24 | . | . | . | . | . | . | . 11: . | . | . | . | . | . | . | . 12: . | C-5 2 20 | . | . | . | . | . | . 13: C-2 1 26 | . | . | . | . | . | . | . 14: C-2 1 28 | . | F-2 3 26 | F-2 4 2E | . | . | . | . 15: . | C-5 2 18 | . | . | . | . | . | . } # Phrase: C high pattern 10 rows=16 { 0: C-2 1 38 | . | C-2 3 32 | C-2 4 38 | C-3 5 2A | C-3 6 24 | G-4 7 1E S30 | C-3 8 24 S50 1: . | . | . | . | . | . | . | . 2: C-2 1 24 | . | . | . | . | . | . | . 3: . | . | . | . | E-3 5 24 | . | . | . 4: . | C-5 2 24 | . | . | . | . | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 2A | . | . | . | G-3 5 24 | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 32 | . | C-2 3 28 | C-2 4 32 | . | G-3 6 20 | E-5 7 1E S30 | . 9: . | . | . | . | . | . | . | . 10: C-2 1 24 | . | . | . | . | . | . | . 11: . | . | . | . | . | . | . | . 12: . | C-5 2 20 | . | . | . | . | . | . 13: C-2 1 26 | . | . | . | . | . | . | . 14: C-2 1 28 | . | G-1 3 26 | G-1 4 2E | . | . | . | . 15: . | C-5 2 18 | . | . | . | . | . | . } # Phrase: Gm — the lift begins pattern 11 rows=16 { 0: C-2 1 38 | . | G-1 3 32 | G-1 4 38 | G-2 5 28 | G-3 6 24 | A#4 7 20 S40 | C-3 8 26 S80 1: . | . | . | . | . | . | . | . 2: C-2 1 24 | . | . | G-1 4 30 | . | . | . | . 3: . | . | . | . | A#3 5 24 | . | . | . 4: C-2 1 2C | C-5 2 22 | G-1 3 2C | G-1 4 32 | . | D-4 6 22 | . | . 5: . | . | . | . | . | . | . | . 6: C-2 1 26 | . | . | G-1 4 30 | D-4 5 24 | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 32 | . | G-1 3 2E | G-1 4 34 | G-2 5 26 | G-3 6 22 | D-5 7 22 S40 | . 9: . | . | . | . | . | . | . | . 10: C-2 1 24 | . | . | G-1 4 30 | . | . | . | . 11: . | . | . | . | . | . | . | . 12: C-2 1 2A | C-5 2 20 | G-1 3 2A | G-1 4 32 | A#3 5 24 | D-4 6 22 | . | . 13: . | . | . | . | . | . | . | . 14: C-2 1 28 | . | G-1 3 26 E92 | G-1 4 30 | . | . | . | . 15: . | C-5 2 1C | . | . | . | . | . | . } # Phrase: A — dominant tension, riser, timpani rolls pattern 12 rows=16 { 0: C-2 1 38 | . | A-1 3 32 | A-1 4 38 | A-2 5 28 | A-3 6 26 | E-5 7 22 S60 | C-4 8 28 SFF 1: . | . | . | . | . | . | . | . 2: C-2 1 26 | . | . | A-1 4 30 | . | . | . | . 3: . | C-5 2 1E | . | . | C#4 5 24 | . | . | . 4: C-2 1 2E | . | A-1 3 2E | A-1 4 32 | . | E-4 6 24 | . | . 5: . | C-5 2 1C | . | . | . | . | . | . 6: C-2 1 28 | . | . | A-1 4 30 | E-4 5 24 | . | . | . 7: . | C-5 2 1C | . | . | . | . | . | . 8: C-2 1 32 | C-5 2 20 | A-1 3 30 | A-1 4 34 | A-2 5 26 | A-3 6 26 | A-5 7 24 S70 | . 9: . | C-5 2 1C | . | . | . | . | . | . 10: C-2 1 28 | C-5 2 1E | . | A-1 4 30 | . | . | . | . 11: . | C-5 2 1C | off | off . . C04 | off . . C04 | off . . C04 | off . . C04 | . . . G2A 12: . | C-5 2 20 | A-1 3 2C E92 | . | . | . | . | . . . G22 13: . | C-5 2 1C | . | . | . | . | . | . 14: . | C-5 2 24 | A-1 3 2C E92 | . | . | . | . | . . . G1C 15: C-2 1 30 | C-5 2 2A | . | . | . | . | . | . } # Phrase: Dm — CLIMAX, the wooaa (first hit at 90 s): full hit, choir opens to AAH, crash pattern 13 rows=16 { 0: C-2 1 40 | . | D-1 3 3C | D-1 4 40 | D-3 5 30 | D-4 6 2E | A-4 7 30 SFF | C-4 9 2E G1E 1: . | . | . | . | . | . | . | . 2: C-2 1 2C | C-5 2 22 | . | D-2 4 38 | F-3 5 2C | F-4 6 2C | D-5 7 30 SFF | . 3: . | . | . | . | . | . | F-5 7 2C SFF | . 4: C-2 1 38 | C-5 2 26 | D-1 3 34 | D-1 4 3C | A-3 5 2C | A-4 6 2C | . | C-3 8 20 S50 5: . | . | . | . | . | . | . | . 6: C-2 1 2A | C-5 2 20 | . | D-2 4 38 | . | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 38 | . | D-1 3 34 | D-1 4 3C | D-3 5 2C | D-4 6 2A | A-4 7 28 SFF | . 9: . | . | . | . | . | . | . | . 10: C-2 1 28 | C-5 2 22 | . | D-2 4 36 | F-3 5 28 | F-4 6 28 | . | . 11: . | . | . | . | . | . | . | . 12: C-2 1 38 | C-5 2 24 | D-1 3 32 | D-1 4 3A | A-3 5 28 | A-4 6 28 | D-5 7 28 SFF | . 13: . | . | . | . | . | . | . | . 14: C-2 1 2C | . | A-1 3 30 | A-1 4 34 | . | . | . | . 15: . | C-5 2 1E | . | . | . | . | . | . } # Phrase: Bb max — soaring over the far shore pattern 14 rows=16 { 0: C-2 1 3C | . | A#1 3 38 | A#1 4 3C | A#2 5 2C | A#3 6 2C | F-4 7 2C SFF | . 1: . | . | . | . | . | . | . | . 2: C-2 1 2A | C-5 2 22 | . | A#2 4 36 | D-4 5 28 | F-4 6 2A | A#4 7 2C SFF | . 3: . | . | . | . | . | . | D-5 7 28 SFF | . 4: C-2 1 36 | C-5 2 24 | A#1 3 32 | A#1 4 38 | F-4 5 28 | D-4 6 2A | . | C-3 8 1E S50 5: . | . | . | . | . | . | . | . 6: C-2 1 28 | C-5 2 20 | . | A#2 4 34 | . | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 36 | . | A#1 3 32 | A#1 4 38 | A#2 5 28 | A#3 6 28 | F-4 7 26 SFF | . 9: . | . | . | . | . | . | . | . 10: C-2 1 26 | C-5 2 20 | . | A#2 4 34 | D-4 5 26 | F-4 6 26 | . | . 11: . | . | . | . | . | . | . | . 12: C-2 1 36 | C-5 2 22 | A#1 3 30 | A#1 4 36 | F-4 5 26 | D-4 6 26 | A#4 7 26 SFF | . 13: . | . | . | . | . | . | . | . 14: C-2 1 2A | . | F-2 3 2E | F-2 4 32 | . | . | . | . 15: . | C-5 2 1C | . | . | . | . | . | . } # Phrase: F max, starting to breathe pattern 15 rows=16 { 0: C-2 1 3C | . | F-1 3 38 | F-1 4 3C | F-3 5 2C | F-4 6 2A | A-4 7 2A SFF | . 1: . | . | . | . | . | . | . | . 2: C-2 1 28 | C-5 2 20 | . | F-2 4 36 | A-3 5 28 | A-4 6 28 | C-5 7 28 SFF | . 3: . | . | . | . | . | . | F-5 7 26 SFF | . 4: C-2 1 34 | C-5 2 22 | F-1 3 30 | F-1 4 38 | C-4 5 28 | C-5 6 28 | . | C-3 8 1C S40 5: . | . | . | . | . | . | . | . 6: C-2 1 26 | . | . | F-2 4 32 | . | . | . | . 7: . | . | . | . | . | . | . | . 8: C-2 1 34 | . | F-1 3 30 | F-1 4 36 | F-3 5 28 | F-4 6 26 | A-4 7 24 SFF | . 9: . | . | . | . | . | . | . | . 10: . | C-5 2 1E | . | F-2 4 32 | A-3 5 26 | A-4 6 24 | . | . 11: . | . | . | . | . | . | . | . 12: C-2 1 32 | C-5 2 20 | F-1 3 2E | F-1 4 34 | C-4 5 26 | C-5 6 24 | C-5 7 24 SFF | . 13: . | . | . | . | . | . | . | . 14: C-2 1 26 | . | C-2 3 2C | C-2 4 30 | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: C — release begins pattern 16 rows=16 { 0: C-2 1 30 | . | C-2 3 2E | C-2 4 34 | C-3 5 26 | C-4 6 22 | G-4 7 22 SA0 | C-3 8 18 S40 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | E-4 6 24 | E-5 7 24 SA0 | . 3: . | . | . | . | . | . | . | . 4: . | . | . | . | E-3 5 26 | G-4 6 24 | . | . 5: . | . | . | . | . | . | . | . 6: . | . | . | . | . | . | . | . 7: . | . | . | . | . | . | . | . 8: . | . | C-2 3 2C | C-2 4 32 | G-3 5 26 | . | . | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: . | . | . | . | . | . | . | . 12: . | C-5 2 1A | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: . | . | G-1 3 28 | G-1 4 2C | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: Dm — drums let go, pads ring pattern 17 rows=16 { 0: C-2 1 22 | . | D-1 3 20 | D-1 4 2C | D-3 5 20 | D-4 6 16 | A-4 7 1A S50 | . 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: . | . | . | . | . | . | . | . 4: . | . | . | . | F-3 5 20 | . | . | C-3 8 20 S40 5: . | . | . | . | . | . | . | . 6: . | . | . | . | . | . | . | . 7: . | . | . | . | . | . | . | . 8: . | . | . | . | A-3 5 20 | A-4 6 16 | D-5 7 1A S50 | . 9: . | . | . | . | . | . | . | . 10: . | . | . | . | . | . | . | . 11: . | . | . | . | . | . | . | . 12: . | . | . | . | . | . | . | . 13: . | . | . | . | . | . | . | . 14: . | . | . | . | . | . | . | . 15: . | . | . | . | . | . | . | . } # Phrase: outro — everything releases into the light pattern 18 rows=16 { 0: C-2 1 14 | . | D-2 3 14 | D-1 4 1C | D-3 5 18 | D-4 6 0E | A-4 7 14 S40 | C-3 8 1C S60 1: . | . | . | . | . | . | . | . 2: . | . | . | . | . | . | . | . 3: . | . | . | . | . | . | . | . 4: . | . | . | . | F-3 5 18 | . | D-5 7 16 S40 | . 5: . | . | . | . | . | . | . | . 6: . | . | . | . | . | . | . | . 7: . | . | . | . | . | . | . | . 8: . | . | . | . | A-3 5 18 | F-4 6 10 | . | . 9: . | . | . | . | . | . | . | off 10: . | . | . | off | . | . | . | . 11: . | . | . | . | . | . | . | . 12: . | . | . | . | off | off | . | . 13: . | . | . | . | . | . | off | . 14: . | . | . | . | . | . | . | . 15: . | . | . | . | . | . | . | . } # ------------------------------------------------------------------ terrain # ridged fbm heightfield; a valley corridor follows pathx(z); a basin at # (-1.32, 75) and another at pathx(155) sink below sea level 0.30. fn pathx(z) { return 1.1 * sin(z * 0.055) + 0.45 * sin(z * 0.13 + 1.7) } fn terra(px, pz) { f1 = fbm(px * 0.15, pz * 0.15, 4) r = 1 - abs(f1 * 2 - 1) th = r * r * sqrt(r) * 3.35 - 0.55 dv = px - pathx(pz) vk = 1 - smooth(1.0, 4.2, abs(dv)) th = mix(th, 0.45 + 0.25 * r, vk) db = len(px + 1.32, pz - 75.0) th = th - 2.8 * (1 - smooth(3.0, 10.0, db)) db = len(px - pathx(155), pz - 155) th = th - 3.0 * (1 - smooth(3.5, 11.0, db)) return th } fn terraC(px, pz) { f1 = fbm(px * 0.15, pz * 0.15, 2) r = 1 - abs(f1 * 2 - 1) th = r * r * sqrt(r) * 3.35 - 0.55 dv = px - pathx(pz) vk = 1 - smooth(1.0, 4.2, abs(dv)) th = mix(th, 0.45 + 0.25 * r, vk) db = len(px + 1.32, pz - 75.0) th = th - 2.8 * (1 - smooth(3.0, 10.0, db)) db = len(px - pathx(155), pz - 155) th = th - 3.0 * (1 - smooth(3.5, 11.0, db)) return th } # sky: contained low sun at (-0.3036, 0.2024, 0.9312), blue-grey gradient, # wispy streak clouds, contrails, horizon-localised flashes. # cl: 0 = plain (fog/reflections), 1 = +sun, 2 = +clouds+trails. fn sky(dx, dy, dz, cl) { sd = dx * -0.3036 + dy * 0.2024 + dz * 0.9312 k = clamp(dy * 1.6 + 0.10, 0, 1) k = k ^ 0.9 wt = max(sd, 0) wt = wt * wt * wt r = mix(0.52, 0.16, k) + wt * 0.20 g = mix(0.60, 0.30, k) + wt * 0.06 b = mix(0.66, 0.52, k) - wt * 0.08 if (cl > 0.5) { g1 = max(sd, 0) g32 = g1 ^ 32 halo = g32 * 0.50 + g1 ^ 6 * 0.06 disc = smooth(0.99960, 0.99980, sd) * 2.6 r = r + halo + disc g = g + halo * 0.88 + disc * 0.95 b = b + halo * 0.66 + disc * 0.88 } if (cl > 1.5) { if (dy > 0.015) { fac = min((9.0 - camy) / max(dy, 0.025), 130) cxp2 = camx + dx * fac czp2 = camz + dz * fac cc = fbm(cxp2 * 0.018 + t * 0.008, czp2 * 0.085, 3) cmask = smooth(0.55, 0.74, cc) * smooth(0.03, 0.16, dy) * 0.55 cr2 = mix(0.40, 0.78, wt) cg2 = mix(0.44, 0.74, wt) cb2 = mix(0.50, 0.68, wt) r = mix(r, cr2, cmask) g = mix(g, cg2, cmask) b = mix(b, cb2, cmask) # world-anchored contrail pair on the cloud plane tr = exp(-abs(czp2 - 40.0) * 0.9) * 0.20 + exp(-abs(czp2 - 41.1) * 2.2) * 0.12 tr = tr * smooth(60, 15, abs(cxp2 - 20)) * smooth(0.05, 0.15, dy) r = r + tr g = g + tr * 0.95 b = b + tr * 0.9 } } fl = flashE * smooth(-0.02, 0.15, dy) r = r + fl * (0.22 + 0.30 * wt) g = g + fl * (0.25 + 0.30 * wt) b = b + fl * (0.34 + 0.30 * wt) rgb(r, g, b) } fn textline(s, px, py, sz) { cx = (u - px) / sz cy = (py - v) / sz i = floor(cx) return glyph(str(s, i), fract(cx), fract(cy)) * step(0, cx) * step(cx, strlen(s)) * step(0, cy) * step(cy, 1) } uniform camx camy camz cyaw cpit crol flashE wooaa mistK fogK taiE sunU sunV sunVis mbK # Integral of a linear speed change. Position is absolute, so playback, # low frame rates and direct seeks follow exactly the same route. fn travel(tim, start, end, delta) { dt = clamp(tim - start, 0, end - start) return delta * (dt * dt / (2 * (end - start)) + max(tim - end, 0)) } fn routez(tim) { # speeds: 1.2 -> 1.4 -> 1.8 -> 2.4 -> 2.0 -> 1.7 -> 2.1 # -> 2.3 -> 1.9 -> 1.5 -> 1.2 world units / second. z = tim * 1.2 + travel(tim, 0, 5, 0.2) + travel(tim, 5, 15, 0.4) z = z + travel(tim, 15, 25, 0.6) + travel(tim, 25, 40, -0.4) z = z + travel(tim, 40, 55, -0.3) + travel(tim, 55, 65, 0.4) z = z + travel(tim, 65, 80, 0.2) + travel(tim, 80, 85, -0.4) z = z + travel(tim, 85, 90, -0.4) + travel(tim, 90, 100, -0.3) return z } frame { camz = routez(t) cx0 = pathx(camz) camx = cx0 + 0.35 * sin(t * 0.21) gnd = terra(camx, camz) grn = max(gnd, 0.30) camy = max(evtl(alt), grn + 0.55) + 0.05 * sin(t * 1.6) + 0.03 * sin(t * 2.7) shk = evtl(shake) cyaw = 0.10 * sin(t * 0.13) + (hash(frame * 3.17) - 0.5) * 0.022 * shk cpit = evtl(pitch) + (hash(frame * 7.71) - 0.5) * 0.015 * shk crol = 0.03 * sin(t * 0.09) + (hash(frame * 5.33) - 0.5) * 0.02 * shk fl = step(10, t) * exp(-(t - 10) * 4.0) * 0.30 + step(90, t) * exp(-(t - 90) * 2.2) * 0.50 flashE = fl * (0.7 + 0.3 * hash(frame * 9.13)) wooaa = step(89.9, t) * exp(-(t - 89.9) * 1.0) mistK = evtl(mist) fogK = evtl(fog) taiE = exp(-trig(0) * 5) mbK = evtl(mbK) # project the sun to screen space (inverse of the pixel ray construction) sxz = rot(-0.3036, 0.9312, -cyaw) sz2 = r1 kk = 1.42 / max(sz2, 0.05) bx0 = sxz * kk by0 = 0.2024 * kk sunU = rot(bx0, by0, -crol) sunV = r1 + cpit # sun visibility: five coarse probes along the sun ray svis = 0 repeat q 5 { qt = 2 + q * 4 qy = camy + 0.2024 * qt svis = svis + (terra(camx - 0.3036 * qt, camz + 0.9312 * qt) < qy ? 1 : 0) } sunVis = svis * 0.2 } pixel { # --- primary ray: pitch offset, roll, yaw, normalise d0x = u d0y = v - cpit d0z = 1.42 rx = rot(d0x, d0y, crol) ry = r1 fx2 = rot(rx, d0z, cyaw) fz = r1 dl = len(len(fx2, fz), ry) + 0.0001 dx = fx2 / dl dy = ry / dl dz = fz / dl # --- sky and fog colours sky(dx, dy, dz, 2) cr = cget(0) cg = cget(1) cb = cget(2) skyR = cr skyG = cg skyB = cb sky(dx, max(dy, 0.03), dz, 0) fr = cget(0) fg = cget(1) fb = cget(2) # --- analytic sea-plane crossing (grazing rays converge too slowly onto # flat water, so the plane is intersected exactly) twat = 1000000 if (dy < -0.002 && camy > 0.31) { twat = (camy - 0.30) / (-dy) } # --- terrain march over the unclamped heightfield tt = 0.05 d = 1 hit = 0 # terra never exceeds 2.8: only upward rays above that bound can be culled. # Grazing rays need more steps; stop evaluating the field once converged. if (camy < 2.8 || dy < 0) { repeat i 192 { if (hit < 0.5 && tt < 160) { px = camx + dx * tt py = camy + dy * tt pz = camz + dz * tt d = py - terra(px, pz) if (d < 0.003 + tt * 0.0008) { hit = 1 } else { # A height difference is not a signed distance: cap steps so a # steep ridge cannot be jumped over on the descent from altitude. tt = tt + min(d * 0.45, 1.5) } } } } # --- winner: terrain if it beats the sea crossing, else the sea isLand = 0 isWater = 0 pxw = 0 pzw = 0 if (hit > 0.5 && tt < twat) { isLand = 1 } if (isLand < 0.5 && twat < 400) { pxw = camx + dx * twat pzw = camz + dz * twat if (terra(pxw, pzw) < 0.295) { isWater = 1 } } px = 0 py = 0 pz = 0 hh = 1 if (isWater > 0.5) { tt = twat px = pxw py = 0.30 pz = pzw hh = terra(px, pz) # ripple normal (hard distance fade kills the Nyquist grid) rnf = exp(-tt * 0.15) rn1 = 0.05 * sin(px * 6.3 + t * 1.9) + 0.03 * sin(pz * 9.7 - t * 1.3) rn1 = rn1 + 0.09 * (fbm(px * 1.1 + t * 0.10, pz * 1.1, 1) - 0.5) rn2 = 0.05 * sin(pz * 7.1 - t * 1.6) + 0.03 * sin(px * 11.3 + t * 1.0) rn2 = rn2 + 0.09 * (fbm(px * 0.9, pz * 0.9 - t * 0.09, 1) - 0.5) rn1 = rn1 * rnf rn2 = rn2 * rnf ndv = dx * rn1 + dy + dz * rn2 rdx = dx - 2 * ndv * rn1 rdy = dy - 2 * ndv rdz = dz - 2 * ndv * rn2 rl = len(len(rdx, rdz), rdy) + 0.0001 rdx = rdx / rl rdy = rdy / rl rdz = rdz / rl rhit = 0 rt = 0.25 rd2 = 99 rtb = 40 if (rdy > 0.005) { repeat j 12 { rt = rt * 1.55 qx = px + rdx * rt qy = 0.31 + rdy * rt qz = pz + rdz * rt dq = qy - max(terraC(qx, qz), 0.30) if (dq < rd2) { rd2 = dq rtb = rt } } rhit = 1 - smooth(0.0, 0.10 + rtb * 0.010, rd2) } sky(rdx, max(rdy, 0.02), rdz, 0) rr2 = cget(0) * 0.62 rg2 = cget(1) * 0.62 rb2 = cget(2) * 0.62 rf = 1 - exp(-rtb * 0.022) mrr = mix(0.10, fr, rf) mrg = mix(0.115, fg, rf) mrb = mix(0.14, fb, rf) rr2 = mix(rr2, mrr, rhit) rg2 = mix(rg2, mrg, rhit) rb2 = mix(rb2, mrb, rhit) gl0 = max(rdx * -0.3036 + rdy * 0.2024 + rdz * 0.9312, 0) gl8 = gl0 ^ 8 sheen = gl8 * gl8 * 0.35 glint = gl8 * gl8 * 1.3 * (0.3 + 0.7 * rnf) f0 = max(-dy, 0.001) fres = 0.04 + 0.96 * (1 - f0) ^ 5 shallow = smooth(0.10, 0.28, hh) deepr = mix(0.018, 0.045, shallow) deepg = mix(0.042, 0.095, shallow) deepb = mix(0.058, 0.120, shallow) cr = mix(deepr, rr2, fres) + sheen * 1.25 + glint * 1.3 cg = mix(deepg, rg2, fres) + sheen * 1.00 + glint * 1.0 cb = mix(deepb, rb2, fres) + sheen * 0.72 + glint * 0.8 } if (isLand > 0.5) { px = camx + dx * tt py = camy + dy * tt pz = camz + dz * tt hh = terra(px, pz) # --- dark rock & snow: forward-difference normal + ridged crag detail e2 = 0.03 + tt * 0.0006 nxx = hh - terra(px + e2, pz) nzz = hh - terra(px, pz + e2) nl = len(len(nxx, nzz), e2) + 0.0001 nxx = nxx / nl nyy = e2 / nl nzz = nzz / nl det = 0.5 det2 = 0.5 if (tt < 30) { det = 1 - abs(fbm(px * 2.0, pz * 2.0, 2) * 2 - 1) det2 = 1 - abs(fbm(px * 2.0 + 7.7, pz * 2.0 + 3.1, 2) * 2 - 1) } # crag: perturb the normal with the detail field nxx = nxx + (det - 0.62) * 0.8 nzz = nzz + (det2 - 0.62) * 0.8 nl = len(len(nxx, nzz), nyy) + 0.0001 nxx = nxx / nl nyy = nyy / nl nzz = nzz / nl dnl = nxx * -0.3036 + nyy * 0.2024 + nzz * 0.9312 diff = max(dnl, 0) wrap = clamp((dnl + 0.50) / 1.5, 0, 1) # strata banding + dark olive-grey rock with warm patches st = 0.70 + 0.30 * sin(py * 7.0 + det * 5.0) rockr = 0.150 + 0.155 * det + 0.045 * st rockg = 0.145 + 0.140 * det + 0.040 * st rockb = 0.135 + 0.130 * det2 + 0.030 * st # snow only on flatter surfaces above the snow line snowK = smooth(1.22, 1.62, py + 0.35 * (det - 0.5)) * smooth(0.60, 0.78, nyy) colr = mix(rockr, 0.78, snowK) colg = mix(rockg, 0.80, snowK) colb = mix(rockb, 0.84, snowK) amb = 0.34 + 0.22 * nyy cr = colr * (amb * 0.62 + diff * 1.45 + wrap * 0.22) cg = colg * (amb * 0.78 + diff * 1.10 + wrap * 0.18) cb = colb * (amb * 1.05 + diff * 0.72 + wrap * 0.14) # sun-lit sparkle grain (near field only) sp = step(0.9962, hash(px * 37.7 + pz * 91.3)) * diff * exp(-tt * 0.05) cr = cr + sp * 0.35 cg = cg + sp * 0.33 cb = cb + sp * 0.30 wet = 1 - smooth(0.32, 0.60, py) cr = cr * (1 - wet * 0.45) cg = cg * (1 - wet * 0.40) cb = cb * (1 - wet * 0.30) # foam waterline anchors the shore shore = smooth(0.30, 0.335, py) * (1 - smooth(0.345, 0.42, py)) foam = shore * (0.5 + 0.5 * sin(px * 13.0 + pz * 9.0 + t * 0.9)) cr = cr + foam * 0.14 cg = cg + foam * 0.15 cb = cb + foam * 0.15 } # --- aerial perspective + valley mist for whichever surface won if (isLand + isWater > 0.5) { fogf = 1 - exp(-tt * 0.020 * fogK) fogf = fogf + smooth(45, 80, tt) * 0.22 mistf = mistK * (1 - exp(-tt * 0.05)) * exp(-max(py - 1.0, 0) * 0.9) * 0.32 ff2 = min(fogf + mistf, 0.97) cr = mix(cr, fr, ff2) cg = mix(cg, fg, ff2) cb = mix(cb, fb, ff2) # Become the actual sky before the finite trace ends. No visible far edge, # even at the summit with the thinnest fog; applies to water as well. horizon = smooth(100, 150, tt) cr = mix(cr, skyR, horizon) cg = mix(cg, skyG, horizon) cb = mix(cb, skyB, horizon) } rgb(cr, cg, cb) cmul(1 + flashE * 0.15 + wooaa * 0.08 + taiE * 0.04) # --- title & credit tA = smooth(0.8, 2.0, t) * (1 - smooth(5.5, 7.5, t)) ttl = textline(ttl1, -0.96, 0.10, 0.24) * tA glo = textline(ttl1, -0.955, 0.105, 0.24) * tA cadd(ttl * 0.9 + glo * 0.2, ttl * 0.88 + glo * 0.18, ttl * 0.95 + glo * 0.25) cA = smooth(2.0, 3.0, t) * (1 - smooth(11.0, 13.0, t)) crd = textline(cred, -0.82, -0.78, 0.05) * cA cadd(crd * 0.7, crd * 0.72, crd * 0.75) cprev(x, y, 0.08) } fn tone(x) { return 1.30 * x / (1 + 0.38 * x * x) } post { # --- horizontal streak blur, strongest during the fast low flight mof = 1.5 + 5.0 * mbK cr = cget(0) cg = cget(1) cb = cget(2) t1 = tap(-mof, 0) g1b = r1 b1b = r2 t2 = tap(-mof * 0.45, 0) g2b = r1 b2b = r2 t3 = tap(mof * 0.45, 0) g3b = r1 b3b = r2 t4 = tap(mof, 0) g4b = r1 b4b = r2 blk = mbK * 0.8 cr = mix(cr, (cr * 2 + t1 + t2 + t3 + t4) * 0.1667, blk) cg = mix(cg, (cg * 2 + g1b + g2b + g3b + g4b) * 0.1667, blk) cb = mix(cb, (cb * 2 + b1b + b2b + b3b + b4b) * 0.1667, blk) # --- small bloom bl = (tap(-2, 0) + tap(2, 0) + tap(0, -2) + tap(0, 2)) * 0.25 cr = cr + bl * (0.16 + 0.14 * wooaa) cg = cg + bl * (0.15 + 0.12 * wooaa) cb = cb + bl * (0.17 + 0.13 * wooaa) # --- chromatic fringe rsh = tap(1.2 + 2 * flashE + mbK, 0) cr = mix(cr, rsh, 0.22) bsh = tap(-1.2 - 2 * flashE - mbK, 0) cb = mix(cb, r2, 0.22) # --- lens flare around the (occlusion-tested) sun du = u - sunU dv = v - sunV anam = exp(-abs(dv) * 48) * exp(-abs(du) * 2.0) diag = exp(-abs(dv - du * 0.45) * 60) * exp(-abs(du) * 2.6) core2 = exp(-len(du, dv) * 9) fla = (anam * 0.40 + diag * 0.30 + core2 * 0.50) * sunVis cr = cr + fla cg = cg + fla * 0.86 cb = cb + fla * 0.72 # --- exposure flicker + flash lift, then highlight-rolling tonemap fl2 = 1 + (hash(frame * 13.71) - 0.5) * 0.06 + flashE * 0.18 cr = tone(cr * fl2) cg = tone(cg * fl2) cb = tone(cb * fl2) rgb(cr, cg, cb) dd = len(u, v) cmul(1 - 0.16 * dd * dd) gn = hash(x * w * 0.37 + y * h * 1.13 + frame * 7.7) - 0.5 cadd(gn * 0.040, gn * 0.037, gn * 0.044) cmul(smooth(0.0, 1.1, t)) wk = smooth(115.0, 119.8, t) cr2 = cget(0) cg2 = cget(1) cb2 = cget(2) rgb(mix(cr2, 1.02, wk * 0.88), mix(cg2, 0.99, wk * 0.88), mix(cb2, 0.95, wk * 0.88)) }