Chipgrid / Documentation / Guides

Sound

The four voices of the chip, how to get melodies, chords, basslines and drums out of them, and what happens when they run out.

Four voices, no more

Chipgrid’s sound chip works like the NES’s: two pulse channels, one triangle and one noise channel. Melody, harmony, bass and drums: four roles, four voices.

OperatorVoiceInputs, left to rightGood for
P pulseone of the 2 pulsesoctave, note, duty, length, dropleads, melodies, lasers
G arpeggioone of the 2 pulsesoctave, note, chord, lengthchords
B trianglethe triangleoctave, note, length, dropbass, kick drums
N noisethe noisepitch, length, modehi-hats, snares, metal

A voice plays when a bang touches it on its left, above or below. Length is in ticks, from 1 to z (35). Full details: Sound chip reference.

Melodies

A clock walks through a sequence, and the sequence feeds the note input:

..2C8
1D2.SCEGEAGED
..P4.12

To pick notes at random but stay in key, put a random number R on the sequence’s index and fill the sequence with a scale. Here 0R4 picks 0 to 4 from a pentatonic scale (C D E G A): random, but never wrong.

..0R4
1D2.SCDEGA
..P5.12

The pulse and its duty

The duty is how long the pulse wave stays “up”. It is the pulse’s only tone control, and it changes the sound a lot:

  • 0: 12.5%, thin and nasal;
  • 1: 25%, the classic lead;
  • 2: 50%, the hollow square;
  • 3: 75%, which sounds just like 25%.

Put a clock on the duty input and the timbre changes on every note.

Chords and bass

Two pulses are not enough for a chord plus a melody, so 8-bit composers faked chords: the notes of the chord are played one after the other, very fast, and the ear fuses them. G does exactly that, 50 times a second. Its third input is the chord type: 0 octave, 1 fifth, 2 major, 3 minor, 4 sus4, 5 major 7, 6 minor 7, 7 diminished.

..gC4
1D4.SCAFG
..G3.24
..gC4
1D2.SCAFG
..B2.2

The top block plays C, A, F and G major chords on a pulse. The bottom block plays the same roots on the triangle, twice as often: a bassline. Change the chord type 2 into 3 and the chords turn minor.

Drums

There is no drum sound on the chip. Drums are made from what is there:

  • Kick: the triangle with a big, fast pitch drop. B3C2o falls 24 semitones (o) in 2 ticks.
  • Hi-hat: the noise, high and short: N010.
  • Snare: the noise, lower and a little longer: N530.
  • Metal: noise in mode 1, a short loop of the shift register that has a pitch: N021.

The noise pitch goes from 0 (highest hiss) to f (low rumble). Patterns are sequences of * (hit) and 0 (rest), sharing one clock through a column of J:

1Cg
..S*0000000*0*00000
.J.B3C2o
..S00*000*000*000*0
.J.N010
..S0000*0000000*000
...N530

Pitch drops: lasers and effects

P and B take a last input, the drop: how many semitones the note falls over its length. A short, high pulse with a big drop is a laser:

.D8
..P6C04o

The Creative sounds examples go further: sirens, coins, explosions.

When the voices run out

With only four voices, notes compete for them:

  • P and G share the two pulses. A new pulse note takes a free one. If both are busy, it steals the one that would finish first.
  • B always plays on the triangle and N on the noise. A new note cuts the one still ringing.

The meters under the screen flash STEAL when this happens. It is not a bug: on a NES, the kick and the bass shared the triangle in exactly this way, and you can hear it in the music of the time. When a part goes missing, look for two voices fighting over one channel, and shorten the notes or move them apart.

Silence and tempo

  • - silences all sound for some beats out of a cycle, while everything else keeps running. -14 drops out 1 beat in 4, at the end of the cycle, so the music comes back on the downbeat. Good for breaks.
  • ! sets the tempo from the grid: !150 is 150 BPM, from 40 to 999. Feed one of its digits from a sequence or a wave and the tempo moves.

Sound that drives the picture

I listens to one channel (0 pulse 1, 1 pulse 2, 2 triangle, 3 noise) and writes its current volume below, from 0 to f. Wire that into a size or a colour and the picture follows the music. See Drawing.

Esc