HAKKUH
hakkuh.dmt · 180 BPM · 30 s · 960×600
flashingfractalhardcorestrobe
warning This piece contains strobe or flashing effects.
notes
Rotterdam hardcore at 180 BPM. The kick is the bassline.
| music | Rotterdam hardcore: overdriven 909 kick as bassline, three-saw hoover riff, square lead hook, orchestra hits, kick rolls |
|---|---|
| visual | black/white/red Julia bands racing on the beat, shake and inversion strobe on every kick, melting feedback, a flame-haired wizard with fists up built from fn SDF helpers. Strobes. |
| file | hakkuh.dmt |
|---|---|
| duration | 0:30 |
| video | 960×600 · 30 fps · h264 + audio · 60 MB |
| song | 180 BPM · speed 6 · rpb 4 · 6 channels |
| loop | 0 |
| render | scale 1 · master 0.5 |
| uniforms | zoom ang kickE hoovE strobe sx sy cx cy melt hitE mascot |
| collection | Demos |
| tags | flashingfractalhardcorestrobe |
| source | 360 lines · 16 KB · download |
anatomy
9VM programs
7patterns
0palettes
0timeline events
0text / sample / texture
360source lines
6inst
0chan
1master
1frame
1pixel
0post
4fn
line composition
pattern 39%pixel 33%inst 14%fn 6%frame 5%master 2%title 0%song 0%order 0%uniform 0%
play order
0011262633411265
order list · 16 entries
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
1# @description Rotterdam hardcore at 180 BPM. The kick is the bassline.
2# @tags hardcore, fractal, strobe
3# @collection Demos
4# @music Rotterdam hardcore: overdriven 909 kick as bassline, three-saw hoover riff, square lead hook, orchestra hits, kick rolls
5# @visual black/white/red Julia bands racing on the beat, shake and inversion strobe on every kick, melting feedback, a flame-haired wizard with fists up built from fn SDF helpers. Strobes.
6# hakkuh.dmt - Rotterdam hardcore. 180 bpm, the kick is the bassline.
7# WARNING: strobes on every kick.
8title HAKKUH
9song bpm=180 speed=6 rpb=4 channels=6 loop=0 volume=0.5
10order 0 0 1 1 2 6 2 6 3 3 4 1 1 2 6 5
12# ------------------------------------------------------------------ instruments
13inst kick {
14 # 909 body into a wall of overdrive: pitch drops 1500 -> 55 Hz, tanh squares it off
15 f = 55 + 170 * exp(-t * 16) + 1500 * exp(-t * 95)
16 $p = $p + f / sr
17 s = sin($p * tau)
18 s = dist(s * (4 + 8 * p0) * exp(-t * 2.4), 3.2)
19 s = svf(s, 2600 + 5000 * exp(-t * 9), 0.15)
20 out(s * 0.8)
21}
22inst hoover {
23 # alpha juno "what the": three detuned saws + pwm sub, pitch falls 5 semitones into the note
24 e = env(0.012, 0.35, 0.8, 0.18)
25 sw = 2 ^ ((5 * exp(-t * 5)) / 12)
26 f = freq * sw
27 $a = $a + f / sr
28 $b = $b + f * 1.011 / sr
29 $c = $c + f * 0.989 / sr
30 $d = $d + f * 0.5 / sr
31 pw = 0.5 + 0.35 * sin(t * 6 + 1)
32 s = saw($a) + saw($b) + saw($c) + sqr($d, pw) * 0.8 + sqr($a * 2, 0.3) * 0.3
33 s = svf(s, 1100 + 2600 * e + 2000 * p0, 0.35)
34 out(dist(s * 0.6, 1.5) * e * 0.58)
35}
36inst hat {
37 out(hp(noise(), 8000) * exp(-t * (70 - 55 * vel)) * 0.3)
38}
39inst lead {
40 # hardcore square lead: two detuned squares + an octave saw, a little drive, vibrato after the attack
41 e = env(0.003, 0.2, 0.6, 0.08)
42 vib = 1 + 0.004 * sin(t * 6.5) * min(t * 4, 1)
43 f = freq * vib
44 $a = $a + f / sr
45 $b = $b + f * 1.004 / sr
46 s = sqr($a, 0.5) + sqr($b, 0.5) + saw($a * 2) * 0.35
47 s = svf(s, 1800 + 2500 * e, 0.2)
48 out(dist(s * 0.5, 1.3) * e * 0.5)
49}
50inst hit {
51 # orchestra hit: stacked saws, root fifth octave tenth, with a noise crack
52 e = env(0.001, 0.28, 0.0, 0.06)
53 s = saw(ph) + saw(ph * 1.498 + 0.2) + saw(ph * 2.003) + saw(ph * 2.52 + 0.1) * 0.6 + noise() * exp(-t * 40) * 0.6
54 s = svf(s, 700 + 4500 * e, 0.3)
55 out(dist(s * 0.6, 1.5) * e * 0.5)
56}
57inst riser {
58 e = env(0.02, 0.1, 1.0, 0.3)
59 s = svf(noise(), 250 + 9000 * min(t / 2.6, 1), 0.75)
60 out((s + r2 * 0.5) * e * 0.3 * (0.4 + 0.6 * min(t / 2.6, 1)))
61}
63master {
64 # short slap to glue, a little hall on the synths, then crush everything against the ceiling
65 d = dly(l * 0.5 + r * 0.5, 0.0833, 0.15)
66 w = verb(hp(l * 0.5 + r * 0.5, 400), 0.72, 0.5)
67 ol = dist(l + d * 0.15 + w * 0.12, 1.9)
68 or = dist(r + d * 0.15 + w * 0.12, 1.9)
69 out(ol, or)
70}
72# ------------------------------------------------------------------ patterns
73# channels: 0 kick 1 hoover 2 hats 3 lead 4 hit 5 riser
75pattern 0 rows=16 {
76 # intro: just the kick
77 C-2 1 40 S00 | . | . | . | . | .
78 . | . | . | . | . | .
79 . | . | C-6 3 20 | . | . | .
80 . | . | . | . | . | .
81 C-2 1 40 | . | . | . | . | .
82 . | . | . | . | . | .
83 . | . | C-6 3 20 | . | . | .
84 . | . | . | . | . | .
85 C-2 1 40 | . | . | . | . | .
86 . | . | . | . | . | .
87 . | . | C-6 3 20 | . | . | .
88 . | . | . | . | . | .
89 C-2 1 40 | . | . | . | . | .
90 . | . | . | . | . | .
91 . | . | C-6 3 20 | . | . | .
92 . | . | C-6 3 14 | . | . | .
93}
94pattern 1 rows=16 {
95 # main A: hoover riff
96 C-2 1 40 S40 | A-2 2 36 S30 | . | . | . | .
97 . | . | . | . | . | .
98 . | . | C-6 3 22 | . | . | .
99 . | A-3 2 30 | . | . | . | .
100 C-2 1 40 | off | . | . | . | .
101 . | . | . | . | . | .
102 . | G-2 2 34 | C-6 3 22 | . | . | .
103 . | . | . | . | . | .
104 C-2 1 40 | A-2 2 36 | . | . | . | .
105 . | . | . | . | . | .
106 . | . | C-6 3 22 | . | . | .
107 . | C-3 2 32 | . | . | . | .
108 C-2 1 40 | off | . | . | . | .
109 . | . | . | . | . | .
110 . | E-2 2 34 | C-6 3 22 | . | . | .
111 . | off | C-6 3 30 | . | . | .
112}
113pattern 2 rows=16 {
114 # main B, hook bar 1
115 C-2 1 40 S80 | A-2 2 36 S60 | . | A-4 4 36 | A-3 5 36 | .
116 . | . | . | . | . | .
117 . | . | C-6 3 22 | A-5 4 34 | . | .
118 . | A-3 2 30 | . | . | . | .
119 C-2 1 40 | off | . | G-5 4 34 | . | .
120 . | . | . | . | . | .
121 . | G-2 2 34 | C-6 3 22 | E-5 4 34 | . | .
122 . | . | . | . | . | .
123 C-2 1 40 | A-2 2 36 | . | D-5 4 34 | A-3 5 36 | .
124 . | . | . | . | . | .
125 . | . | C-6 3 22 | E-5 4 34 | . | .
126 . | C-3 2 32 | . | . | . | .
127 C-2 1 40 | off | . | C-5 4 34 | . | .
128 . | . | . | . | . | .
129 . | E-2 2 34 | C-6 3 22 | A-4 4 34 | . | .
130 . | off | C-6 3 30 | . | . | .
131}
132pattern 6 rows=16 {
133 # main B, hook bar 2
134 C-2 1 40 S80 | A-2 2 36 S60 | . | G-4 4 36 | A-3 5 36 | .
135 . | . | . | . | . | .
136 . | . | C-6 3 22 | A-4 4 34 | . | .
137 . | A-3 2 30 | . | . | . | .
138 C-2 1 40 | off | . | C-5 4 34 | . | .
139 . | . | . | . | . | .
140 . | G-2 2 34 | C-6 3 22 | D-5 4 34 | . | .
141 . | . | . | . | . | .
142 C-2 1 40 | F-2 2 36 | . | E-5 4 36 | F-3 5 36 | .
143 . | . | . | . | . | .
144 . | . | C-6 3 22 | . | . | .
145 . | F-3 2 30 | . | D-5 4 34 | . | .
146 C-2 1 40 | off | . | . | . | .
147 . | . | . | C-5 4 34 | . | .
148 . | G-2 2 34 | C-6 3 22 | . | G-3 5 36 | .
149 . | off | C-6 3 30 | B-4 4 30 | . | .
150}
151pattern 3 rows=16 {
152 # breakdown: no kick, the hoover sings, riser climbs
153 . | A-2 2 38 SA0 | . | . | . | A-4 6 30
154 . | . | . | . | . | .
155 . | . | . | . | . | .
156 . | . | . | . | . | .
157 . | . | . | . | . | .
158 . | . | . | . | . | .
159 . | . | . | . | . | .
160 . | . | . | . | . | .
161 . | F-2 2 38 | . | . | . | .
162 . | . | . | . | . | .
163 . | . | . | . | . | .
164 . | . | . | . | . | .
165 . | G-2 2 38 | . | . | . | .
166 . | . | . | . | . | .
167 . | A-3 2 34 | . | . | . | .
168 . | A-2 2 38 | . | . | . | .
169}
170pattern 4 rows=16 {
171 # build: kick rolls accelerating into the drop
172 C-2 1 40 SC0 | A-2 2 38 SF0 | . | . | . | .
173 . | . | . | . | . | .
174 . | . | . | . | . | .
175 . | . | . | . | . | .
176 C-2 1 40 | . | . | . | . | .
177 . | . | . | . | . | .
178 C-2 1 40 | . | . | . | . | .
179 . | . | . | . | . | .
180 C-2 1 40 | G-2 2 38 | . | . | . | .
181 . | . | . | . | . | .
182 C-2 1 40 | . | . | . | . | .
183 . | . | . | . | . | .
184 C-2 1 40 SFF | off | . | . | . | .
185 C-2 1 40 | . | . | . | . | .
186 C-2 1 40 | . | . | . | . | .
187 C-2 1 40 | . | . | A-4 4 36 | A-3 5 40 | off
188}
189pattern 5 rows=16 {
190 # turnaround: double kicks and a hit to throw it back to the top
191 C-2 1 40 S80 | A-2 2 36 | . | A-4 4 30 | A-3 5 36 | .
192 . | . | . | . | . | .
193 C-2 1 40 | . | C-6 3 22 | . | . | .
194 . | . | . | . | . | .
195 C-2 1 40 | off | . | E-5 4 30 | . | .
196 . | . | . | . | . | .
197 C-2 1 40 | . | C-6 3 22 | . | . | .
198 . | . | . | . | . | .
199 C-2 1 40 | C-3 2 36 | . | . | C-4 5 36 | .
200 . | . | . | . | . | .
201 C-2 1 40 | . | C-6 3 22 | . | . | .
202 . | . | . | . | . | .
203 C-2 1 40 | off | . | . | . | .
204 . | . | . | . | . | .
205 C-2 1 40 | . | C-6 3 30 | . | . | .
206 C-2 1 40 | . | C-6 3 30 | . | G-3 5 40 | .
207}
209# ------------------------------------------------------------------ shape helpers (inlined fns)
210fn segd(px, py, ax, ay, bx, by) {
211 dx = bx - ax
212 dy = by - ay
213 tt = clamp(((px - ax) * dx + (py - ay) * dy) / (dx * dx + dy * dy), 0, 1)
214 return len(px - ax - dx * tt, py - ay - dy * tt)
215}
216fn elld(px, py, cx, cy, rx, ry) {
217 return (len((px - cx) / rx, (py - cy) / ry) - 1) * min(rx, ry)
218}
219fn fill(d) {
220 return 1 - smooth(-0.004, 0.004, d)
221}
222fn flame(px, py, y0, y1, w, seed, spd) {
223 hf = clamp((py - y0) / (y1 - y0), 0, 1)
224 wob = (fbm(px * 5 + seed, py * 4 - time * spd, 3) - 0.5) * (0.08 + 0.25 * hf)
225 wid = w * (1 - hf) ^ 0.75 * (1 + 0.5 * wob / w)
226 d = abs(px + wob * 0.6) - wid
227 return max(d, max(min(y0, y1) - py, py - max(y0, y1)))
228}
230# ------------------------------------------------------------------ visuals
231uniform zoom ang kickE hoovE strobe sx sy cx cy melt hitE mascot
233frame {
234 kickE = exp(-trig(0) * 12)
235 hoovE = exp(-trig(1) * 2.5)
236 hitE = exp(-trig(4) * 6)
237 strobe = step(0.5, kickE) # ~2 frames of inversion per kick
238 sx = (hash(frame * 1.7) - 0.5) * 0.1 * kickE # screen shake
239 sy = (hash(frame * 2.3) - 0.5) * 0.1 * kickE
240 zoom = 1.0 + 0.3 * kickE + 0.4 * hitE
241 $a = $a + 0.012 * (step(0.5, fract(bar * 0.5)) * 2 - 1) # spin flips direction every bar
242 ang = $a
243 th = hash(floor(bar) + 3) * tau # hard-cut julia parameter every bar
244 cx = 0.7885 * cos(th)
245 cy = 0.7885 * sin(th)
246 melt = hoovE * 0.7
247 mascot = (1 - step(4.1, trig(5))) * step(0.02, trig(5)) + hitE * 0.8 # breakdown + build, and on every hit
248}
249pixel {
250 px = rot(abs(u) + sx, v + sy, ang) / zoom # mirrored left/right
251 py = r1 / zoom
252 it = julia(px * 1.25, py * 1.25, cx, cy, 48)
253 k = it / 48
254 inside = step(1, k)
255 kb = log(1 + it) / log(49) # log scale so the far field gets stripes too
256 band = step(0.5, fract(kb * 7 - beat * 0.5)) # black/white bands racing outward on the beat
257 bw = band * (1 - inside)
258 red = inside * (0.45 + 0.55 * kickE)
259 rgb(bw + red, bw * (1 - 0.5 * hitE), bw * (1 - 0.8 * hitE))
260 cmul(1 - 0.35 * step(0.5, fract(y * h * 0.5))) # scanlines
261 # melt: drag the previous frame through noise while the hoover rings
262 dx = (fbm(x * 6, y * 6 + beat, 2) - 0.5) * melt * 0.3
263 dy = (fbm(x * 6 + 7, y * 6 - beat, 2) - 0.5) * melt * 0.3
264 cprev(x + dx, y + dy + 0.004, melt * 0.85)
265 # ---- the wizard: flame-haired, fists up, ring behind; drawn from signed distances over the fractal
266 px = (u + sx * 0.5) * 1.15
267 py = (v + sy * 0.5) * 1.15 - 0.05
268 wa = abs(px)
269 cr = cget(0)
270 cg = cget(1)
271 cb = cget(2)
272 am = 0
273 mk = min(mascot, 1)
274 # ring: blue upper-left to red lower-right, thin white inner line
275 rd = abs(len(px, py + 0.1) - 0.75) - 0.055
276 rk = 0.5 + 0.5 * sin(atan2(py + 0.1, px) - 0.8)
277 m = fill(rd) * mk
278 cr = mix(cr, mix(0.15, 1.0, rk), m)
279 cg = mix(cg, mix(0.35, 0.15, rk), m)
280 cb = mix(cb, mix(1.0, 0.05, rk), m)
281 m = fill(abs(len(px, py + 0.1) - 0.69) - 0.012) * mk
282 cr = mix(cr, 0.9, m)
283 cg = mix(cg, 0.9, m)
284 cb = mix(cb, 0.9, m)
285 # robe
286 bd = max(wa - (0.38 + 0.12 * max(-py, 0)), max(py - 0.02, -0.72 - py))
287 m = fill(bd) * mk
288 shade = 0.6 + 0.4 * smooth(-0.9, 0.0, py)
289 cr = mix(cr, 0.95 * shade, m)
290 cg = mix(cg, 0.25 * shade, m)
291 cb = mix(cb, 0.05 * shade, m)
292 # arms: shoulder -> elbow -> fist, pumping on the kick
293 fy = 0.62 + 0.06 * kickE
294 aL = min(segd(px, py, -0.3, -0.02, -0.64, 0.24), segd(px, py, -0.64, 0.24, -0.56, fy)) - 0.085
295 aR = min(segd(px, py, 0.3, -0.02, 0.64, 0.24), segd(px, py, 0.64, 0.24, 0.56, fy)) - 0.085
296 m = fill(min(aL, aR)) * mk
297 cr = mix(cr, 1.0, m)
298 cg = mix(cg, 0.32, m)
299 cb = mix(cb, 0.05, m)
300 # beard: flame pointing down from the chin, dark streaks
301 fd = flame(px, py, 0.16, -1.0, 0.32, 3, 0.7)
302 m = fill(fd) * mk
303 hb = clamp((0.16 - py) / 1.16, 0, 1)
304 streak = step(0.72, fract(fbm(px * 6 + 1, py * 3 - time * 0.5, 2) * 5 + px * 3))
305 cr = mix(cr, mix(1.0, 0.75, hb) - 0.45 * streak, m)
306 cg = mix(cg, mix(0.45, 0.08, hb) - 0.2 * streak, m)
307 cb = mix(cb, 0.03, m)
308 # head, moustache, mouth, nose, eyes, brows
309 m = fill(elld(px, py, 0, 0.3, 0.18, 0.21)) * mk
310 cr = mix(cr, 1.0, m)
311 cg = mix(cg, 0.72, m)
312 cb = mix(cb, 0.5, m)
313 m = fill(min(elld(px, py, -0.1, 0.16, 0.14, 0.045), elld(px, py, 0.1, 0.16, 0.14, 0.045))) * mk
314 cr = mix(cr, 1.0, m)
315 cg = mix(cg, 0.4, m)
316 cb = mix(cb, 0.03, m)
317 m = fill(elld(px, py, 0, 0.1, 0.06 + 0.02 * hoovE, 0.035 + 0.03 * hoovE)) * mk
318 cr = mix(cr, 0.15, m)
319 cg = mix(cg, 0.02, m)
320 cb = mix(cb, 0.02, m)
321 m = fill(elld(px, py, 0, 0.22, 0.04, 0.055)) * mk
322 cr = mix(cr, 0.95, m)
323 cg = mix(cg, 0.6, m)
324 cb = mix(cb, 0.4, m)
325 m = fill(min(elld(px, py, -0.085, 0.3, 0.055, 0.022), elld(px, py, 0.085, 0.3, 0.055, 0.022))) * mk
326 cr = mix(cr, 1, m)
327 cg = mix(cg, 1, m)
328 cb = mix(cb, 0.95, m)
329 m = fill(min(len(px + 0.08, (py - 0.3) * 1.5) - 0.018, len(px - 0.08, (py - 0.3) * 1.5) - 0.018)) * mk
330 cr = mix(cr, 0.05, m)
331 cg = mix(cg, 0.02, m)
332 cb = mix(cb, 0.02, m)
333 m = fill(min(segd(px, py, -0.17, 0.39, -0.03, 0.33), segd(px, py, 0.17, 0.39, 0.03, 0.33)) - 0.028) * mk
334 cr = mix(cr, 0.2, m)
335 cg = mix(cg, 0.05, m)
336 cb = mix(cb, 0.0, m)
337 # hair: flame pointing up, brighter on the kick
338 m = fill(flame(px, py, 0.44, 1.05, 0.2, 7, 1.6)) * mk
339 hh = clamp((py - 0.44) / 0.6, 0, 1)
340 cr = mix(cr, 1.0, m)
341 cg = mix(cg, mix(0.85, 0.25, hh) + 0.2 * kickE, m)
342 cb = mix(cb, mix(0.2, 0.0, hh), m)
343 # fists and knuckles
344 m = fill(min(len(px + 0.56, py - fy - 0.06) - 0.115, len(px - 0.56, py - fy - 0.06) - 0.115)) * mk
345 cr = mix(cr, 1.0, m)
346 cg = mix(cg, 0.7, m)
347 cb = mix(cb, 0.48, m)
348 kd = min(segd(px, py, -0.64, fy + 0.12, -0.48, fy + 0.12), segd(px, py, 0.48, fy + 0.12, 0.64, fy + 0.12)) - 0.012
349 kd = min(kd, min(segd(px, py, -0.62, fy + 0.04, -0.5, fy + 0.04), segd(px, py, 0.5, fy + 0.04, 0.62, fy + 0.04)) - 0.012)
350 m = fill(kd) * mk
351 cr = mix(cr, 0.6, m)
352 cg = mix(cg, 0.3, m)
353 cb = mix(cb, 0.15, m)
354 rgb(cr, cg, cb)
355 # strobe: invert on the kick attack
356 rr = cget(0)
357 gg = cget(1)
358 bb = cget(2)
359 rgb(mix(rr, 1 - rr, strobe), mix(gg, 1 - gg, strobe), mix(bb, 1 - bb, strobe))
360}
Click a line number to link to that line.