Chipgrid / Documentation / Reference
Movers and routes
Arrows that travel across the grid and turn into a bang when they hit something, and the switches and turns that steer them.
E emitter
Launches a > to its right every N ticks.
Every every ticks, launches a > to its right. The mover travels until it hits something and turns into a bang — the distance is a delay.
| Cell | Role | What it takes |
|---|---|---|
| left | every | ticks between launches |
History. Collisions are the heart of 8-bit games: the hardware itself could tell when two sprites touched (the C64 had a register for it). Here a collision is a note.
Example
# EMITTER - example #
.
.8E.....P5C14
.
.6E.........N520
8E launches a mover > to its right every 8 ticks. It flies one cell per tick until it hits P, then turns into a bang that plays it. The second emitter fires every 6 ticks at a noise further away. The two drift in and out of phase.
Try this
- Move
Pcloser or further: the note shifts in time, it does not change speed. - Change
8into3: a stream of arrows. - Put an
F4just under the cell where the arrow stops: the screen flashes too.
> east
Moves east each tick; becomes a bang when blocked.
Moves one cell east every tick. When the next cell is not empty it becomes a bang * — hitting a sound operator from the left plays it.
Example
# EAST - example #
.
.>.....P4C14.....v
.
.............N010
..o.....<
...B2G4
.
.................P5E04
.
.............^
Four movers, one per direction, each aimed at a voice. Every tick each one moves one cell. When the next cell is not empty it stops and turns into a bang *, which plays the voice it touches: > hits P from the left, v lands on top of P, ^ reaches N from below, < hits the wall o and its bang lands above B. The distance is a delay: 5 cells = 5 ticks. A mover flies only once.
Try this
- While it plays, type a new
>anywhere left of a voice: it flies again. - Put an emitter
4Eon the left of a row: it launches a>every 4 ticks. - Move a voice further away: the note comes later.
< west
Moves west each tick; becomes a bang when blocked.
Moves one cell west every tick; becomes a bang when blocked.
Example
# WEST - example #
.
.>.....P4C14.....v
.
.............N010
..o.....<
...B2G4
.
.................P5E04
.
.............^
Four movers, one per direction, each aimed at a voice. Every tick each one moves one cell. When the next cell is not empty it stops and turns into a bang *, which plays the voice it touches: > hits P from the left, v lands on top of P, ^ reaches N from below, < hits the wall o and its bang lands above B. The distance is a delay: 5 cells = 5 ticks. A mover flies only once.
Try this
- While it plays, type a new
>anywhere left of a voice: it flies again. - Put an emitter
4Eon the left of a row: it launches a>every 4 ticks. - Move a voice further away: the note comes later.
^ north
Moves north each tick; becomes a bang when blocked.
Moves one cell north every tick; becomes a bang when blocked.
Example
# NORTH - example #
.
.>.....P4C14.....v
.
.............N010
..o.....<
...B2G4
.
.................P5E04
.
.............^
Four movers, one per direction, each aimed at a voice. Every tick each one moves one cell. When the next cell is not empty it stops and turns into a bang *, which plays the voice it touches: > hits P from the left, v lands on top of P, ^ reaches N from below, < hits the wall o and its bang lands above B. The distance is a delay: 5 cells = 5 ticks. A mover flies only once.
Try this
- While it plays, type a new
>anywhere left of a voice: it flies again. - Put an emitter
4Eon the left of a row: it launches a>every 4 ticks. - Move a voice further away: the note comes later.
v south
Moves south each tick; becomes a bang when blocked.
Moves one cell south every tick; becomes a bang when blocked. A mover arriving just above a voice plays it.
Example
# SOUTH - example #
.
.>.....P4C14.....v
.
.............N010
..o.....<
...B2G4
.
.................P5E04
.
.............^
Four movers, one per direction, each aimed at a voice. Every tick each one moves one cell. When the next cell is not empty it stops and turns into a bang *, which plays the voice it touches: > hits P from the left, v lands on top of P, ^ reaches N from below, < hits the wall o and its bang lands above B. The distance is a delay: 5 cells = 5 ticks. A mover flies only once.
Try this
- While it plays, type a new
>anywhere left of a voice: it flies again. - Put an emitter
4Eon the left of a row: it launches a>every 4 ticks. - Move a voice further away: the note comes later.
: switch
Sends a mover that reaches it another way: :^ up, :v down, :< left, :> right.
A switch for movers. A mover that reaches it from the left, top or bottom leaves the way the cell on its right says: :^ up, :v down, :< left, :> right. Empty means straight on. The cell also takes 0 left, 1 right, 2 up, 3 down, so a clock or a sequence can change the route while it plays. Leave at least one empty cell between the switch and a voice: the mover needs a tick to turn into a bang. If the way out is blocked, the mover stops and bangs where it is. Its input cell blocks movers coming from the right.
| Cell | Role | What it takes |
|---|---|---|
| right | exit | < > ^ v, or 0 left · 1 right · 2 up · 3 down; empty = straight on |
Example
# SWITCH - example #
.
........P5C02
.
.8E.....:^
.
.
........B3C2o
The emitter sends > arrows along the lane. At :^ each arrow turns up, travels one cell and hits P from below: a bang, and a note.
Try this
- Change
^intov: the arrows go down and play the kick instead. - Empty the cell: the arrows go straight on, past the switch.
) turn right
Turns a mover right, from any side, and bangs what touches it. Four of them make a loop.
Turns a mover right, from any side: east becomes south, south west, west north, north east. It has no input, so all four sides stay free and a track can close into a loop: four ) and one arrow, and it goes round forever. Everything touching the turn gets a bang as the mover goes round it, from the left, above or below. A loop of perimeter 2 × (width + height) − 4 ticks is a sequencer you can see.
Example
# TURN RIGHT - example #
.
.P4C12
.)>____)
.|.....|
.|.....|
.)_____)
.B2C2
Four turns and one arrow: a loop that never stops. Each time the arrow goes round the top-left turn, the P above it plays; at the bottom-left turn, the B below it plays. The loop lasts 2 × (6 + 3) − 4 = 14 ticks.
Try this
- Make the loop wider: the rhythm gets slower.
- Add a second arrow on the track for twice as many notes.
( turn left
Turns a mover left, from any side, and bangs what touches it.
Turns a mover left, from any side, and bangs what touches it, like ). Use ) for clockwise loops and ( for counter-clockwise ones: side by side they make mirror images.
Example
# TURN LEFT - example #
.
.(___<(
.|....|
.(____(
.P5E12
The same loop turning the other way: ( turns left, so this one runs counter-clockwise.
Try this
- Write a
)loop next to it for a mirror image.