Chipgrid / Documentation / Start here
First steps
A beat, a beep, a melody and a drum pattern, typed by hand in five minutes.
These are the first chapters of the tutorial, in short. Open
Chipgrid next to this
page, press new to get an empty grid, and type along. Move with the arrow keys, or
click a cell. A . in the blocks below is an empty cell: skip over it.
A beat that beeps
Type this at the top left of the grid:
.D4
..P4C24
Press Ctrl+Enter (or ▶ PLAY). Browsers only allow sound after a click or a key, so nothing plays before you do.
D4is a beat: every 4 ticks it writes a bang*in the cell below itself. A tick is a sixteenth note, so 4 ticks is one beat.- That bang lands just left of
P, a pulse voice. A voice plays when a bang touches it on its left, above or below. 4C24are P’s inputs: octave4, noteC, duty2(a 50% square wave), length4ticks.
Now change things while it plays. Put the cursor on the C and type E, G or A:
you hear it on the next bang. Change the 4 after D into 2 for twice as fast. Change
the duty 2 into 0 for a thin, nasal sound. That is live coding: there is no “run”
step, every change counts on the next tick.
A melody
..2C8
1D2.SCEGEAGED
..P4.12
Three operators, one above the other:
2C8is a clock: it counts 0, 1, 2 … 7, one step every 2 ticks, and writes the count below.- That count lands on the left of
S, a sequence. Its steps are the notes on its right,CEGEAGED. The count chooses which note it writes below. - The note lands in P’s note input.
1D2bangs P every 2 ticks.
Clock → sequence → voice is how most melodies are built. Rewrite the notes while it
plays. Lowercase means sharp: c is C♯. Change the clock’s 8 into 4 to loop only
the first four notes.
Drums
1Cg
..S*0000000*0*00000
.J.B3C2o
..S00*000*000*000*0
.J.N010
..S0000*0000000*000
...N530
1Cgcounts to 16 (gis 16: after 9, cells count on with letters, see Values).- The
Js copy that count down the column, so all three sequences share one clock. - Each sequence is a pattern:
*is a hit,0is a rest. B3C2ois the triangle with a big pitch drop (o= 24 semitones): a kick drum.N010is the noise channel high and short: a hi-hat.N530, lower and longer: a snare.
Change the patterns while it plays.
Next
- The tutorial goes on with chords, movers, drawing on the screen, chance, effects, words and sprites, gates, tracks and playing together: all 20 chapters.
- How the grid works explains the rules behind what you just did.
- Your grid is kept in the browser as you type. To keep it elsewhere, use save (a text file) or link (a web address holding the whole grid).