Chipgrid / Documentation / Examples
Routes
Movers on tracks: switches, rails and loops that turn the layout of the code into a sequencer you can see.
9 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.
Scene router
One stream of arrows, three pictures. 4E launches an arrow every 4 ticks, and the switch : sends each one where the sequence says: up to a ring and a kick, right to a sprite and a hat, down to a bar and a snare. Edit ^>v> while it plays: you are choreographing the screen.
The input of the switch comes from &r, a link, because a clock right above it would block the way up.
# SCENE ROUTER #
.
4C4
..S^>v>.# the route, step by step #
...@r
.
.
.
T4.....................1R9
....................?Qgc.7
....................|B2C2
....................|&r.....0Rs
..........4E________:._____?O.a57
....................|..0RnN010
....................|?H0.w8
....................N520
Open in Chipgrid ↗ · 118 BPM
Effects board
The picture on the left draws by itself. The arrows only hit effects: +0 zoom, /0 glitch, % colours. With amount 0 they do nothing until a bang touches them, so each route is a punch on the picture, played by the sequence like a drum pattern.
# EFFECTS BOARD #
.
8C8
..S^>>v>>^>
...@r
.
V0
Ogc77
.
.2Wn................+0
.Qg.c5..............|B2C2
....................|&r
T2..........2E______:._____/0
....................|.....N010
....................|N520
....................%
Open in Chipgrid ↗ · 124 BPM
Kaleido tree
A tree of random choices. Each arrow meets a first switch, up or down, then a second one: four leaves, each a sprite and a note of the pentatonic scale. All the sprites land in the top-left quarter, and Z2 mirrors them to all four corners. The picture and the melody make each other up as they go.
# KALEIDO TREE #
.
.0R1
...S^v
....@a..........?O2254
................|P5C12
.0R1............|&b
...S^>..........:.______?O8269
....@b..........|......P5D12
................|
.0R1............|
...Sv>..........|&a
....@c..4E______:
................|
Z2..............|
T2..............|
................|&c
................:.______?O8a3e
................|......P5A12
................|P5G12
................?O2a7b
Open in Chipgrid ↗ · 116 BPM
Elevator
Watch the column. An arrow goes down it, and the switch at the bottom sends it back up; the one at the top sends it back down. It is trapped, while the starfield grows. Once in every four steps the bottom switch reads >, and if the arrow is there at that moment it escapes: wipe, flash, boom. It might take one trip or several, which is where the suspense comes from.
# ELEVATOR #
.
8C4
..S^^^>
...@e
.
Ug1...........zE________:v
+10.....................|
T1......................|
........................|
........................|
..0R4...................|
1D2.SCDEGA..............|
..P5.12.................|
........................|
........................|&e....B1C8
........................:.______K
...............................F1
Open in Chipgrid ↗ · 126 BPM
The music steers
Nobody decides the route here. I0 writes the loudness of the first voice into the switch: as a note fades, its number falls, and the arrows change direction. Each note you hear sweeps the picture through ring, sprite and bar. Change the melody at the bottom and the choreography changes with it.
I has nothing on its left, so it can sit right above a switch and leave the way up free.
# THE MUSIC STEERS #
.
.
.
T3
V1
.
.
.......................1R9
....................?Qgc.b
....................|
....................|I0.....0Rs
........3E__________:._____?O.a37
....................|..0Rn
....................|?H0.w4
....................N520
.
.
..8C4
1D8.SCEGA
..P4.28
Open in Chipgrid ↗ · 112 BPM
Three trains
Three trains on three lines, leaving every 5, 7 and 9 ticks: a polyrhythm you can see. :v and :^ turn each one into its station, where a gate draws a ring. Two lines share one voice from above and below. They only line up every 315 ticks.
# THREE TRAINS #
.
........................T3
.
5E__________:v
............|...1R7
............|?Q8c.8
............P4C11R7
............|?Qgc.b
............|
7E__________:^
.
.
.
9E__________:v
............|...1R7
............|?Qoc.4
............N010
Open in Chipgrid ↗ · 120 BPM
Two scenes
Song structure from a single switch. A fast stream of arrows goes up for 32 ticks, to bars and a hat, then down for 32, to rings and a snare. The slow clock doing that is the arrangement. Its bang also changes the palette through ?V, so scene and colours turn together.
# TWO SCENES #
.
1DwwC4
..?V....# a new palette at each change #
.
wC2
..S^v
...@s...............N010Rn
....................|?H0.w8
T3..................|&s
............2E______:
....................|.0Rv
....................|?Q.c.7
....................N51
Open in Chipgrid ↗ · 122 BPM
Room railway
An uppercase link belongs to the whole room. One player runs the signal box and sends arrows on R. Everyone who builds a line reading &R gets their track switched at the same moment, and each one can decide what its own two routes do. Here: a sprite and a kick up, a glitch and a snare down.
# ROOM RAILWAY - for multiplayer #
.
# the signal# your own line, the signal comes from R: #
wC2
..S^v.................0Rs
...@R...............?O.857
....................|B2C2
....................|&R
............4E______:
....................|
....................|N520
..................../0
Ug9
T3
Open in Chipgrid ↗ · 120 BPM
Orbit
The simplest loop. Four ) and one arrow: no emitter, nothing consumed, it just goes round, and the perimeter is the length of the bar: 2 × (7 + 3) − 4 = 16 ticks. Whatever touches a corner plays when the arrow goes round it. Add a second arrow on the track for double time, or move a voice to another corner.
# ORBIT #
.
.
.
T3
V0
.
........?Qgc87.N010
........)>_____)
........|......|..# one arrow, going round for ever #
........|......|
........)______)
........B2C2...%
Open in Chipgrid ↗ · 120 BPM