Chipgrid / Documentation / Examples
Visuals
Pictures made by code: rain, equalizers, raster bars, tunnels, plasma, scrollers, kaleidoscopes.
25 examples. Each block is the grid as the app loads it (a . is an empty cell). Open in Chipgrid opens it ready to play; or pick it from the app’s EXAMPLES menu.
Rain
Two random numbers 0Rv (0–31) choose where X draws a drop on the top row, every tick. M35 scrolls the whole picture down 5 pixels a tick, T1 fades it slowly: rain. Try M31 (slower), other colours, or V2 for Game Boy greens.
# RAIN #
.
V0
.
.0Rv
.X.07..# random x, drawn on the top row, scrolled down #
.
.0Rv
.X.01
.
M35
T1
.
................0R4
..............1D2.SCDEGA..# plinks #
................P5.12
Open in Chipgrid ↗ · 120 BPM
Equalizer
Three bars H. Each one’s width comes from a sequence of numbers walked by a clock — the same machinery as a melody, but drawn. T8 fades fast, so the bars bounce. Edit the number lists: w = full width, 0 = nothing.
# EQUALIZER #
V16
.
..1Cg.....................1Cg
....Sw8g4o8c2w6k4s8e2.......S*0000000*0*00000
.H06.7.....................J.B3C2o
............................S00*000*000*000*0
..2Cg......................J.N010
....S4cgkoswsokgc8442.......S0000*0000000*000
.H0b.d.......................N530
.
..1Cg
....Sg0g0wg8gs0c0w0o4
.H0g.a
.
T8
Open in Chipgrid ↗ · 126 BPM
Sprite parade
Three sprites O cross a star field (two X at random places, dissolved by T6 so they twinkle), pushed by clocks at three speeds (1, 2, 3 ticks per step) — the slow ones look further away: parallax. Change the seed (the 3rd input) to get another creature.
# SPRITE PARADE #
V0
..........................gC4
.1Cw....................1D4.SCAFG
.O.414....................G3.24
.
.2Cw......................gC4
.O.a57..................1D2.SCAFG
..........................B2.2
.3Cw
.O.g9b
.
.0Rv
.X.31
.
.0Rv
.X.m1
.
T6..# 3 clocks at 3 speeds = parallax; random X = stars
Open in Chipgrid ↗ · 112 BPM
Palette cycling
Four bars H whose colour comes from clocks counting 0–15, scrolled down by M35: a waterfall of every colour. Then a clock 8C4 on V’s palette input switches NES → C64 → Game Boy → CGA every two beats, and the whole picture changes colour at once, because the screen stores colour numbers — palette cycling. F flashes on the snare.
# PALETTE CYCLING #
.
....1Cg.................1Cg
.H02w.....................S*0000000*0*00000
.........................J.B3C2o
....2Cg...................S00*000*000*000*0
.H08w....................J.N010
..........................S0000*0000000*000
....3Cg....................N530
.H0ew.....................F1
.
....4Cg
.H0kw.....................2C8
........................1D2.SCEGEAGED
M35.......................P4.12
.
.8C4
.V...# a clock on V s palette #
Open in Chipgrid ↗ · 124 BPM
Weaving
Four pixels on the bottom row, each pushed by its own clock (1, 2, 3, 5). M21 scrolls everything up one pixel a tick, so each pixel leaves a slanted thread: a woven pattern that only repeats after 30 steps. Change the speeds, the colours, or try M11.
# WEAVING #
V3
.
.1Cw
.X.nb..# 4 pixels at 4 speeds on the bottom row, scrolle
.
.2Cw
.X.nd
..........................2C8
.3Cw....................1D2.SCEGEAGED
.X.ne.....................P4.12
.
.5Cw......................gC4
.X.n7...................1D2.SCAFG
..........................B2.2
M21
Open in Chipgrid ↗ · 118 BPM
Rave
A random bar H and a sprite O at a random place every tick, and K wipes the screen on every beat (1D4): the picture is rebuilt four times a bar, in time with the kick. F2 flashes red on the snare.
# RAVE #
V0
........................1Cg
1D4.......................S*0000000*0*00000
..K......................J.B3C2o
..........................S00*000*000*000*0
..0Rn....................J.N010
.H0.w4....................S0000*0000000*000
...........................N530
.0Rs......................F2
.O.837
.
..........................gC4
........................1D2.SCAFG
..........................B2.2
.
# K wipes the screen every beat #
# a random bar and a random sprite every tick #
Open in Chipgrid ↗ · 140 BPM
Copper bars
The classic of Amiga and C64 demos. Five bars H; the y of each comes from a wave 4Wn (0 → 23 → 0, once a bar). The waves have the same speed but a different phase (0 3 6 9 c), so the bars follow each other like a snake. T5 leaves trails. Change the rates (4) to break them apart, or the phases.
# COPPER BARS #
V10
........................1Cg
..4Wn0....................S*0000000*0*00000
.H0.w7...................J.B3C2o
..........................S00*000*000*000*0
..4Wn3...................J.N010
.H0.wa....................S0000*0000000*000
...........................N530
..4Wn6
.H0.we....................gC4
........................1D2.SCAFG
..4Wn9....................B2.2
.H0.wd
.
..4Wnc
.H0.w4
.
.
T5..# 5 waves, same speed, phase 0 3 6 9 12 #
Open in Chipgrid ↗ · 128 BPM
Lissajous
One pixel X whose x is a fast wave (2Wv, 8 ticks a cycle) and whose y is a slower one (3Wn, 12 ticks). Two speeds in a 3:2 ratio draw a Lissajous figure. The y input can’t be fed from above (the x wave’s inputs are there), so Y74 sends it: 7 right, 4 down. T1 keeps a long trail. Try other rates (1, 5…), or add Z2 for a kaleidoscope.
# LISSAJOUS #
V30
..........................2C8
........................1D2.SCEGEAGED
..........................P4.12
...3Wn
.....Y74.# y: a wave sent by Y #
.
.
..........2Wv
..........X..b.# x: a wave just above #
.
.
T1..# slow dissolve = long trail #
.
.
..........................gC4
........................1D4.SCAFG
..........................G3.24
Open in Chipgrid ↗ · 120 BPM
Tunnel
Four rings Q centred on the screen; each radius comes from a clock counting 0–15 at its own speed (1, 2, 3, 5 ticks per step), so the rings fly outwards and start again: a tunnel. U11 sprinkles a few white pixels for stars, T4 dissolves the old rings. Move the centre (gc) or change the colours.
# TUNNEL #
V00
........................1Cg
...1Cg....................S*0000000*0*00000
.Qgc.4...................J.B3C2o
..........................S00*000*000*000*0
...2Cg...................J.N010
.Qgc.2....................S0000*0000000*000
...........................N530
...3Cg
.Qgc.9....................gC4
........................1D4.SCAFG
...5Cg....................G3.24
.Qgc.7
.
.
U11.# 4 rings, 4 speeds; glitter = stars #
T4
Open in Chipgrid ↗ · 132 BPM
Kaleidoscope
Everything is drawn in the top-left quarter: a sprite O at a random x, whose creature (seed) changes every beat — a clock sent by Y84 — and a line L from the corner to a random point. Then Z2 mirrors it left→right and top→bottom: a kaleidoscope. T3 dissolves the past.
# KALEIDOSCOPE #
V30
..........................0R4
........................1D2.SCDEGA
..........................P5.12
...4C9...# seed from a clock, sent by Y #
.....Y84...................D2.0R1
............................N01
.
..........0Re
..........O.4.d...........gC4
........................1D2.SCAFG
............0Rf...........B2.2
..........L00.be
.
.
Z2..# draw in one corner, Z2 makes four #
T3
Open in Chipgrid ↗ · 116 BPM
Radar
A line L from the centre (gc) to a point that goes round: its x is a wave 4Ww, its y the same wave a quarter of a cycle later (phase 9 out of 36) — sine and cosine make a circle. T2 lets the sweep fade like a radar screen. Two rings Q are the scale. I3 listens to the noise channel and feeds U: blips crackle on every hi-hat and snare.
# RADAR #
V20
........................1Cg
..........................S*0000000*0*00000
.........................J.B3C2o
...4Wn9...................S00*000*000*000*0
.....Y94.# y: same wave .J.N010er later = cosine #
..........................S0000*0000000*000
...........................N530
............4Ww0
..........Lgc..3..........2C8
........................1D2.SCEGEAGED
..........................P4.12
T2
.
.Qgc82
.Qgcc1
.
..I3
.U.3.# glitter follows the noise channel #
Open in Chipgrid ↗ · 124 BPM
Live VU meter
The picture listens to the music. Four Is each read the volume of one chip channel (0 pulse 1, 1 pulse 2, 2 triangle, 3 noise) and set the width of a bar H. Z0 mirrors left onto right, so the bars close in from both sides. In the middle a ring Q breathes with the melody (I0 on its radius). All four voices play — watch each bar follow its own voice.
# LIVE VU METER #
V00
........................1Cg
...I0.....................S*0000000*0*00000
H03.4....................J.B3C2o
..........................S00*000*000*000*0
...I1....................J.N010
H08.7.....................S0000*0000000*000
...........................N530
...I2
H0d.2.....................2C8
........................1D2.SCEGEAGED
...I3.....................P4.12
H0i.d
..........................gC4
........................1D4.SCAFG
Z0........................G3.24
T6
..........................gC4
....I0..................1D2.SCAFG
.Qgc.7....................B2.2
.
# each I listens to one channel; Z0 mirrors #
Open in Chipgrid ↗ · 132 BPM
On the beat
Without the gate, O would draw every tick. With ?O it waits for the bang from 1D8, the same bang that plays the bass: picture and sound hit together. Both R change every tick, but they only matter at that moment. Try 1D4, or a gate before T2.
# ON THE BEAT #
.
1D80RsRz
..?O.a.7..# ? : the sprite draws only on the bang #
.B2C2
.
T2
Open in Chipgrid ↗ · 124 BPM
Text scroller
The classic of every demo. 8Cc walks a sequence of 12 letters, one every 8 ticks. On the same beat, ?" stamps the current letter at the right edge, and M01 pushes everything left, 8 pixels in 8 ticks: exactly one letter. Put your own message in the sequence, and set the c of 8Cc to its length.
# TEXT SCROLLER #
.
D8.8Cc
.....SHELLO_WORLD_
?"uc1
.
M01.# next letter every 8 ticks, M moves it 1 px a tick
.
.
..2C8
1D2.SCEGEAGED
..P4.12
Open in Chipgrid ↗ · 120 BPM
Your own sprite
The cells under $ are the picture, one digit per pixel. 4Wr feeds its x with a wave, so the heart travels. Draw your own while it plays.
# YOUR OWN SPRITE #
.
4Wr
$.688.....# the rows under $ are the picture #
.22..22
22222222
21222222
22222222
.222222
..2222
...22
.
.
T9
Open in Chipgrid ↗ · 120 BPM
Sections
A piece needs parts. 8D8 bangs every 64 ticks. ?V and ?! wait for that bang, then read a clock: palette and tempo jump together, and hold until the next one.
# SECTIONS #
.
8D88C3
..?V....# new palette every 8 beats #
.
8D8.8C3
..?!1.5..# new tempo too #
.
...2Wa..............1Cg
.Qgc.7................S*0000000*0*00000
.....................J.B3C2o
Ug3...................S00*000*000*000*0
T3...................J.N010
......................S0000*0000000*000
.......................N530
Open in Chipgrid ↗ · 115 BPM
Starfield
No stars are moved here. U sprinkles a few new pixels, + pushes the whole picture outward, T dissolves it. Feedback does the rest. Try +40 for warp speed.
# STARFIELD #
.
V0
U31
+20..# new stars, zoomed outward, dissolved #
T1
.
.
..0R4
1D2.SCDEGA
..P5.12
Open in Chipgrid ↗ · 120 BPM
Room link
An uppercase name is shared by the whole room. The conductor sends on B every 64 ticks. Everyone who copies the second part reacts to it: K wipes the shared picture, and ?-11 cuts their own chip for one tick. Nobody is forced: following is something you wire in yourself.
# ROOM LINK - for multiplayer #
.
# one player, the conductor: #
gD4
..@B
.
# every player who wants to follow: #
&B
.K...# on its bang: wipe the screen, cut your chip #
?-11
.
Ug1
.
..gC4
1D2.SCAFG
..B2.2
Open in Chipgrid ↗ · 120 BPM
Plasma
The classic of the demoscene, in one line: ~02318 is a plasma, moving, in 8 colours. % on the same layer makes the colours flow through it. Above that, a big sprite lands on each beat. Try patterns 3 rings and 7 tunnel.
# PLASMA #
.
V0
[0
~02318..# one line paints the whole screen #
4Cg
%
.
[1..................1Cg
]3....................S*0000000*0*00000
1D80Rl...............J.B3C2o
..?O.5.1..............S00*000*000*000*0
T9...................J.N010
......................S0000*0000000*000
.......................N530
Open in Chipgrid ↗ · 124 BPM
Swell
; turns a bang into a shape in time: it jumps, then falls. Its value is the radius of the ring, so the ring breathes with the kick. A second one, on the bar, drives the zoom. Nothing here is drawn on the beat by hand: you connect the swell, and everything pulses.
# SWELL #
.
.1D8......1D8
...;f1......B1C3..# the kick makes the ring jump #
Qgc.7
.
.1Dg
...;w2
..+.0
T41.V0..~3.4c3
.
..gC4
1D4.SCAFG
..G3.24
Open in Chipgrid ↗ · 118 BPM
Glow
Compare with the other trails: no random holes. Ta1 steps every pixel down the palette together, bright to dark to black, so a moving dot leaves a soft glowing tail. Change the palette in V1: each one has its own way of fading.
# GLOW #
.
V1
Ta1.....# T with a 1: fade through the palette #
.
3Wn.......5Wn
..Y13.......Y13
.
.4Wv.......3Wv
.X..1......Q..21
.
.
..2C8
1D2.SCEGEAGED
..P4.12
Open in Chipgrid ↗ · 120 BPM
Depth
Three layers moving at three speeds: that is how old games faked distance, and it is called parallax. M01 and M03 only touch their own layer, and the ship rides the front layer with a wave on its y: the fast scroll stretches it into an exhaust trail. Each [ sets the layer for everything below it, so the layout of the code is the depth of the picture.
# DEPTH #
.
V0
~6.484..# back: a sky that never moves #
.
[1
M01.....# middle: distant stars, slow #
U11
.
.
[2
M03.....# front: near sparks, fast #
T7
.0Rn
Xv.1
.
]2
..4Wf
.O8.57
.
.
..gC4
1D2.SCAFG
..B2.2
Open in Chipgrid ↗ · 116 BPM
Giant
On a projector, small sprites disappear. ]3 and ]5 make what follows them three and five times as big, in the same chunky pixels. The little creature in the code is the big one on the screen.
# GIANT #
.
V3
~4.2d1..# a checkerboard, behind everything #
.
]3
"41eBIG
.
]5
8Wk
$.a88
..5...........gC4
.555555.....1D2.SCAFG
55255255......B2.2
55555555
5.5..5.5
.5....5
..5..5
.
.
T8
Open in Chipgrid ↗ · 108 BPM
Player piano
The picture plays the music. Each H draws a bar. Four eyes , sweep across four rows of the screen, and each one bangs a note while it is over a bar. You compose by drawing: move a bar, lengthen it, add one, and the tune changes. The moving ring that shows where they are is on the front layer, so the eyes don’t see it.
# PLAYER PIANO #
.
1Cw.........H0441
,.41........Hg441
.P5C02......H4a41
............Hka41..# the bars are the score #
1Cw.........H8g44
,.a1........Hog44
.P5E02......Hck47
.
1Cw
,.g1
.P5G02
.
1Cw
,.k1
.P5A02
.
.
[2
1Cw
Q.c21...# the marker, in front #
T9
Open in Chipgrid ↗ · 120 BPM
Rainbow tune
This eye reads the colour under it, and that number becomes the note. Red plays one pitch, yellow another: the row of colours on the screen is the melody. Change a colour in a bar and you change a note.
# RAINBOW TUNE #
.
D41Cw.......H0c80
..,.c.......H8c81..# each colour is a note #
P4.14.......Hgc83
............Hoc85
.
[2
1Cw
Q.c21
T9
Open in Chipgrid ↗ · 126 BPM