How TETERI is built

Every Sound Is Generated, Not Recorded

Oscillators, filtered noise and a reverb impulse built from decaying random numbers. No audio files anywhere.

There are no sound files in TETERI. Every blip, thud, chime and explosion is constructed at the moment you hear it from Web Audio primitives.

The basic voice

Almost everything is one function: create an oscillator, give it a waveform and a frequency, optionally glide that frequency somewhere else, run it through a filter whose cutoff also moves, and shape the whole thing with an amplitude envelope.

That single primitive, with different parameters, produces the move blip, the rotate chirp, the lock thud, the level-up run and the game-over descent.

Noise

The other primitive is filtered noise: a buffer of random samples played on loop, run through a filter whose frequency sweeps. That gives you the snare, the hi-hat, the hard-drop impact and the whoosh under a line clear.

Sweeping a bandpass filter upward over noise is a rising hiss. Sweeping a lowpass down is an impact. The same generator, different filter motion.

Reverb without a file

Convolution reverb normally needs a recorded impulse response. Here the impulse is generated: a couple of seconds of random samples multiplied by a decaying curve. That is, in effect, a synthetic room, and it costs nothing to ship.

Why bother

Size. A set of decent sound effects is a few hundred kilobytes. This is a few kilobytes of code.

Parameterisation. The hard-drop sound takes the drop distance and gets punchier for a longer fall. A recorded sample cannot do that without shipping several variants.

No loading. Nothing to fetch, nothing to decode, no first-play stutter.

The catch

It is harder to make it sound good. A recorded sample is whatever the recording was; a synthesised sound is a set of numbers you have to tune by ear. Getting a convincing kick drum out of a sine wave and an envelope takes real fiddling.

The trade is worth it for a game this size, and would not be for a game with a composer and a sound designer.

PLAY TETERI ALL ARTICLES