GLITCH
glitch.dmt · 180 BPM · 30 s · 960×600
breakbeatfractalglitch
notes
Breakcore at 180 BPM over datamoshed Mandelbrot video. The sampled kit is pitched by note and chopped with rolls, pattern loops and delays.
| music | breakcore: the sampled kit pitched by note, reversed snares via Sxx, E9x rolls, an E6x stutter loop, EDx delays, reese bass, FM screams, snare bitcrush and master drive opened by Wxx |
|---|---|
| visual | datamosh over a pulsing Mandelbrot: hashed block displacement of the previous frame, row tearing and RGB split on the snare, posterisation that coarsens with the timeline, inverted kick flashes, noise snow on the screams |
| file | glitch.dmt |
|---|---|
| duration | 0:30 |
| video | 960×600 · 30 fps · h264 + audio · 96 MB |
| song | 180 BPM · speed 3 · rpb 8 · 6 channels |
| loop | 0 |
| render | scale 1 · dither on · master 0.58 |
| uniforms | kickE snE scrE moshA zoomA blockseed tear |
| collection | Demos |
| tags | breakbeatfractalglitch |
| source | 292 lines · 15 KB · download |
anatomy
11VM programs
5patterns
0palettes
9timeline events
4text / sample / texture
292source lines
6inst
1chan
1master
1frame
1pixel
1post
0fn
line composition
pattern 63%pixel 12%inst 10%frame 3%timeline 3%master 3%chan 2%sample 1%post 1%title 0%song 0%order 0%uniform 0%
play order
00121301234
order list · 11 entries
timeline
| at | event | value | source | |
|---|---|---|---|---|
| 0:00 | zoomk | 0 | L18 | |
| 0:00 | mosh | 0.2 | L18 | |
| 0:03 | mosh | 0.5 | L19 | |
| 0:05 | mosh | 0.9 | L20 | |
| 0:05 | zoomk | 1 | L20 | |
| 0:08 | mosh | 0.3 | L21 | |
| 0:11 | mosh | 1.0 | L22 | |
| 0:11 | zoomk | 2 | L22 | |
| 0:13 | mosh | 0.6 | L23 |
Event times are derived from the order list, pattern lengths, BPM and RPB. The rendered video is 0:30; the computed song length is 0:15.
resources
| kind | name | info | value |
|---|---|---|---|
| sample | kick | assets/kick.wav | |
| sample | snare | assets/snare.wav | |
| sample | hat | assets/hat.wav | |
| sample | ride | assets/ride.wav |
source
1# @description Breakcore at 180 BPM over datamoshed Mandelbrot video. The sampled kit is pitched by note and chopped with rolls, pattern loops and delays.
2# @tags glitch, fractal, breakbeat
3# @collection Demos
4# @music breakcore: the sampled kit pitched by note, reversed snares via Sxx, E9x rolls, an E6x stutter loop, EDx delays, reese bass, FM screams, snare bitcrush and master drive opened by Wxx
5# @visual datamosh over a pulsing Mandelbrot: hashed block displacement of the previous frame, row tearing and RGB split on the snare, posterisation that coarsens with the timeline, inverted kick flashes, noise snow on the screams
6# glitch.dmt - breakcore at 180 bpm over datamoshed Mandelbrot video.
7# Drums are the sampled kit, pitched by note, chopped with E9x rolls, E6x pattern loops and EDx delays.
8title GLITCH
9song bpm=180 speed=3 rpb=8 channels=6 loop=0 volume=0.58 dither=1
10order 0 0 1 2 1 3 0 1 2 3 4
12sample kick "assets/kick.wav"
13sample snare "assets/snare.wav"
14sample hat "assets/hat.wav"
15sample ride "assets/ride.wav"
17timeline {
18 0:00 zoomk=0 mosh=0.2
19 2:00 mosh=0.5
20 4:00 mosh=0.9 zoomk=1
21 6:00 mosh=0.3
22 8:00 mosh=1.0 zoomk=2
23 10:00 mosh=0.6
24}
26inst skick {
27 out(smp(kick, t * freq / 261.6) * 0.95)
28}
29inst ssnare {
30 # pitched by note; reversed when p0 > 0.5
31 rate = freq / 261.6
32 sp = p0 > 0.5 ? smplen(snare) - t * rate : t * rate
33 out(smp(snare, sp) * 0.85)
34}
35inst shat {
36 out(smp(hat, t * freq / 261.6) * 0.6)
37}
38inst sride {
39 out(smp(ride, t * freq / 261.6) * 0.45)
40}
41inst reese {
42 e = env(0.01, 0.3, 0.8, 0.1)
43 s = bsaw(ph + 0.003 * t, freq) + bsaw(ph - 0.0025 * t, freq) + bsaw(ph * 0.5, freq * 0.5) * 0.6
44 s = svf(s, 150 + 900 * e * (0.5 + p0), 0.5)
45 out(dist(s, 1.6) * e * 0.5)
46}
47inst scream {
48 e = env(0.003, 0.2, 0.5, 0.05)
49 m = sin(ph * tau * 3.01) * (4 + 6 * exp(-t * 5))
50 s = sin(ph * tau + m) + bsqr(ph, 0.2, freq) * 0.5
51 s = dist(s * 3, 2.5)
52 s = svf(s, 1500 + 4000 * e, 0.5)
53 out(s * e * 0.32)
54}
56chan 1 {
57 # snares get a bitcrush that opens with mp0 (Wxx) and a slap
58 c = crush(x, 256 - 240 * mp0)
59 d = dly(c, 0.1667, 0.3)
60 out(c + d * 0.3)
61}
62master {
63 d = dly(l * 0.5 + r * 0.5, 0.3333, 0.35)
64 d = svf(d, 2500, 0.3)
65 ol = dist(l + d * 0.2, 1.8 + 1.5 * mp0)
66 or = dist(r + d * 0.2, 1.8 + 1.5 * mp0)
67 out(ol, or)
68}
70# channels: 0 kick 1 snare 2 hat 3 ride 4 reese 5 scream rows are 32nds (8 per beat)
71pattern 0 rows=32 {
72 C-4 1 40 W00 | . | C-4 3 24 | . | E-1 5 40 S20 | .
73 . | . | . | . | . | .
74 . | . | C-4 3 16 | . | . | .
75 . | . | . | . | . | .
76 . | . | C-4 3 24 | . | . | .
77 . | . | . | . | . | .
78 . | . | C-4 3 16 | . | . | .
79 . | . | . | . | . | .
80 . | C-4 2 40 | C-4 3 24 | . | . | .
81 . | . | . | . | . | .
82 . | . | C-4 3 16 | . | . | .
83 . | . | . | . | . | .
84 C-4 1 36 | . | C-4 3 24 | . | . | .
85 . | . | . | . | . | .
86 . | . | C-4 3 16 | . | . | .
87 . | . | . | . | . | .
88 C-4 1 40 | . | C-4 3 24 | . | E-1 5 . | .
89 . | . | . | . | . | .
90 . | . | C-4 3 16 | . | . | .
91 . | . | . | . | . | .
92 . | C-4 2 30 ED1 | C-4 3 24 | . | . | .
93 . | . | . | . | . | .
94 . | . | C-4 3 16 | . | . | .
95 . | . | . | . | . | .
96 . | C-4 2 40 | C-4 3 24 | . | G-1 5 . | .
97 . | . | . | . | . | .
98 . | . | C-4 3 16 | . | . | .
99 . | . | . | . | . | .
100 . | . | C-4 3 24 | . | . | .
101 . | D-4 2 26 | . | . | . | .
102 C-4 1 30 | . | C-4 3 16 | . | . | .
103 . | E-4 2 30 | . | . | . | .
104}
105pattern 1 rows=32 {
106 # the chop: rolls, pitched snares, reversed hits
107 C-4 1 40 W60 | . | C-4 3 24 | C-4 4 20 | E-1 5 40 S60 | E-4 6 30
108 . | . | . | . | . | .
109 . | . | C-4 3 16 | . | . | .
110 . | . | . | . | . | .
111 . | . | C-4 3 24 | . | . | G-4 6 28
112 . | . | . | . | . | .
113 C-4 1 36 | . | C-4 3 16 | . | . | .
114 . | . | . | . | . | .
115 . | C-4 2 40 | C-4 3 24 | . | . | .
116 . | . | . | . | . | .
117 . | . | C-4 3 16 | . | . | B-4 6 30
118 . | G-4 2 30 | . | . | . | .
119 C-4 1 40 | . | C-4 3 24 | . | . | .
120 . | A-4 2 32 E91 | . | . | . | .
121 . | . | C-4 3 16 | . | . | .
122 . | . | . | . | . | .
123 C-4 1 40 | . | C-4 3 24 | C-4 4 20 | E-1 5 . | E-5 6 30
124 . | . | . | . | . | .
125 . | C-5 2 28 S80 | C-4 3 16 | . | . | .
126 . | . | . | . | . | .
127 . | . | C-4 3 24 | . | . | D-5 6 28
128 . | C-4 2 36 E91 | . | . | . | .
129 . | . | C-4 3 16 | . | . | .
130 . | . | . | . | . | .
131 . | C-4 2 40 | C-4 3 24 | . | G-1 5 . | .
132 . | . | . | . | . | .
133 . | . | C-4 3 16 | . | . | B-4 6 28
134 C-4 1 30 | . | . | . | . | .
135 C-4 1 34 | . | C-4 3 24 | . | . | .
136 C-4 1 38 | F-4 2 30 | . | . | . | .
137 C-4 1 40 | D-4 2 34 E91 | C-4 3 16 | . | . | .
138 . | C-4 2 40 E91 | . | . | . | .
139}
140pattern 2 rows=32 {
141 # stutter bar: pattern loop on the first 4 rows, then the rest
142 C-4 1 40 E60 | C-4 2 40 | C-4 3 24 | . | E-1 5 40 S90 | E-4 6 30
143 . | . | . | . | . | .
144 . | C-5 2 36 | C-4 3 16 | . | . | .
145 . | . . . E63 | . | . | . | .
146 . | . | C-4 3 24 | . | . | .
147 . | . | . | . | . | .
148 C-4 1 36 | . | C-4 3 16 | . | . | .
149 . | . | . | . | . | .
150 . | C-4 2 40 | C-4 3 24 | C-4 4 20 | . | G-4 6 28
151 . | . | . | . | . | .
152 . | . | C-4 3 16 | . | . | .
153 . | . | . | . | . | .
154 C-4 1 40 | . | C-4 3 24 | . | . | .
155 . | . | . | . | . | .
156 . | A-4 2 30 S80 | C-4 3 16 | . | . | .
157 . | . | . | . | . | .
158 C-4 1 40 WA0 | . | C-4 3 24 | . | E-1 5 . | E-5 6 30
159 . | . | . | . | . | .
160 . | . | C-4 3 16 | . | . | .
161 . | . | . | . | . | .
162 . | C-4 2 40 | C-4 3 24 | . | . | .
163 . | . | . | . | . | .
164 . | C-4 2 30 E91 | C-4 3 16 | . | . | .
165 . | . | . | . | . | .
166 C-4 1 40 | . | C-4 3 24 | . | G-1 5 . | D-5 6 28
167 . | . | . | . | . | .
168 . | . | C-4 3 16 | . | . | .
169 . | . | . | . | . | .
170 . | G-4 2 36 E91 | C-4 3 24 | . | . | .
171 . | F-4 2 36 E91 | . | . | . | .
172 . | D-4 2 38 E91 | C-4 3 16 | . | . | .
173 . | C-4 2 40 E91 | . | . | . | .
174}
175pattern 3 rows=32 {
176 # breakdown: reese and screams, hats only
177 . | . | C-4 3 20 | C-4 4 20 | E-1 5 40 SFF | E-4 6 30
178 . | . | . | . | . | .
179 . | . | C-4 3 14 | . | . | .
180 . | . | . | . | . | .
181 . | . | C-4 3 20 | . | . | .
182 . | . | . | . | . | .
183 . | . | C-4 3 14 | . | . | .
184 . | . | . | . | . | .
185 . | . | C-4 3 20 | . | . | B-4 6 28
186 . | . | . | . | . | .
187 . | . | C-4 3 14 | . | . | .
188 . | . | . | . | . | .
189 . | . | C-4 3 20 | . | . | .
190 . | . | . | . | . | .
191 . | . | C-4 3 14 | . | . | .
192 . | . | . | . | . | .
193 . | . | C-4 3 20 | . | F-1 5 . | A-4 6 30
194 . | . | . | . | . | .
195 . | . | C-4 3 14 | . | . | .
196 . | . | . | . | . | .
197 . | . | C-4 3 20 | . | . | .
198 . | . | . | . | . | .
199 . | . | C-4 3 14 | . | . | .
200 . | . | . | . | . | .
201 . | . | C-4 3 20 | . | G-1 5 . | G-4 6 28
202 . | . | . | . | . | .
203 . | . | C-4 3 14 | . | . | .
204 . | . | . | . | . | .
205 . | . | C-4 3 20 | . | . | .
206 . | . | . | . | . | .
207 . | . | C-4 3 14 | . | . | .
208 . | . | . | . | . | off
209}
210pattern 4 rows=32 {
211 # final roll to the top
212 C-4 1 40 WFF | C-4 2 40 E91 | C-4 3 24 | C-4 4 20 | E-1 5 40 S20 | E-5 6 30
213 . | . | . | . | . | .
214 . | . | C-4 3 16 | . | . | .
215 . | . | . | . | . | .
216 C-4 1 40 | D-4 2 40 E91 | C-4 3 24 | . | . | .
217 . | . | . | . | . | .
218 . | . | C-4 3 16 | . | . | .
219 . | . | . | . | . | .
220 C-4 1 40 | E-4 2 40 E91 | C-4 3 24 | . | . | .
221 . | . | . | . | . | .
222 . | . | C-4 3 16 | . | . | .
223 . | . | . | . | . | .
224 C-4 1 40 | F-4 2 40 E91 | C-4 3 24 | . | . | .
225 . | . | . | . | . | .
226 . | . | C-4 3 16 | . | . | .
227 . | . | . | . | . | .
228 C-4 1 40 E91 | G-4 2 40 E91 | C-4 3 24 | . | . | .
229 . | . | . | . | . | .
230 . | . | C-4 3 16 | . | . | .
231 . | . | . | . | . | .
232 C-4 1 40 E91 | A-4 2 40 E91 | C-4 3 24 | . | . | .
233 . | . | . | . | . | .
234 . | . | C-4 3 16 | . | . | .
235 . | . | . | . | . | .
236 C-4 1 40 E91 | B-4 2 40 E91 | C-4 3 24 | . | . | .
237 C-4 1 40 E91 | C-5 2 40 E91 | . | . | . | .
238 C-4 1 40 E91 | D-5 2 40 E91 | C-4 3 16 | . | . | .
239 C-4 1 40 E91 | E-5 2 40 E91 | . | . | . | .
240 C-4 1 40 E91 | F-5 2 40 E91 | C-4 3 24 | . | . | .
241 C-4 1 40 E91 | G-5 2 40 E91 | . | . | . | .
242 C-4 1 40 E91 | A-5 2 40 E91 | C-4 3 16 | . | . | .
243 C-4 1 40 E91 | C-6 2 40 E91 | . | . | . | .
244}
246uniform kickE snE scrE moshA zoomA blockseed tear
248frame {
249 kickE = exp(-trig(0) * 12)
250 snE = exp(-trig(1) * 10)
251 scrE = exp(-trig(5) * 6)
252 moshA = evtl(mosh)
253 zoomA = evtl(zoomk)
254 blockseed = floor(beat * 4) + 100 * floor(bar) # new displacement field every 16th
255 tear = step(0.6, snE)
256}
257pixel {
258 # the "video": a mandelbrot zoom pulsing with the kick
259 zm = 1.2 + zoomA * 2 + kickE * 0.4
260 it = mandel(-0.745 + u / zm * 0.9, 0.186 + v / zm * 0.9, 64)
261 k = log(1 + it) / log(65)
262 hsv(k * 1.5 + bar * 0.05, 0.9, (0.1 + 1.3 * k * k) * (1 - step(64, it)))
263 # datamosh: blocks of the previous frame slide by a hashed vector; stronger on the snare
264 bx = floor(x * 16)
265 by = floor(y * 10)
266 hv = hash(bx * 1.3 + by * 7.1 + blockseed)
267 hv2 = hash(bx * 2.7 + by * 3.9 + blockseed + 5)
268 amt = moshA * (0.3 + 0.7 * snE) * step(0.35, hv)
269 ox = (hv - 0.5) * 0.3 * amt
270 oy = (hv2 - 0.5) * 0.2 * amt
271 # row tearing: horizontal bands shift on the snare
272 band = floor(y * 24)
273 ox = ox + tear * (hash(band * 9.1 + blockseed) - 0.5) * 0.25
274 keep = 0.55 + 0.4 * moshA
275 cprev(x + ox, y + oy, keep)
276 # rgb split: pull red and blue from displaced copies
277 pr = prev(x + ox + 0.012 * snE, y + oy)
278 pb = prev(x + ox - 0.012 * snE, y + oy)
279 bq = r2
280 rgb(mix(cget(0), pr, 0.5 * snE), cget(1), mix(cget(2), bq, 0.5 * snE))
281 # posterise harder as the breaks get rougher, invert on the kick attack
282 lv = 8 - 5 * moshA
283 rgb(floor(cget(0) * lv + 0.5) / lv, floor(cget(1) * lv + 0.5) / lv, floor(cget(2) * lv + 0.5) / lv)
284 inv = step(0.6, kickE) * step(0.5, moshA)
285 rgb(mix(cget(0), 1 - cget(0), inv), mix(cget(1), 1 - cget(1), inv), mix(cget(2), 1 - cget(2), inv))
286 # scream: white noise snow
287 snow = step(0.995 - 0.03 * scrE, hash(x * 913 + y * 677 + frame)) * scrE
288 cadd(snow, snow, snow)
289}
290post {
291 cmul(1 - 0.2 * step(0.5, fract(y * h * 0.5)))
292}
Click a line number to link to that line.