synth
The synthesised half of RED DOT RISING's clip bank, computed from nothing. Oscillators, noise, one-pole and state-variable filters, a small Schroeder reverb for the atrium, and a recipe per clip — all of it raw interleaved f32 PCM handed to `audio.encodePcm`. No network, no credi…
game.vendor.synth — where the sound of NEKO-9 comes from
The synthesised half of RED DOT RISING's clip bank, computed from nothing.
Oscillators, noise, one-pole and state-variable filters, a small Schroeder
reverb for the atrium, and a recipe per clip — all of it raw interleaved f32
PCM handed to audio.encodePcm. No network, no credit, no service: this half
of the bank cannot go silent because a generation failed.
The bank
| clip | what it is |
|---|---|
ui_move | a brass tick as the focus moves |
ui_confirm | two brass notes, a control taken |
ui_back | a soft descending thud, a card closed |
win_sting | an F major cluster arriving one voice at a time |
lose_sting | strip lights striking on, and the floor dropping out |
bed_rain | rain on the skylight, heard from inside a wet building |
bed_neon | three floors of neon on the mains, and a tube that crackles |
music_night | the score when nothing was generated: lo-fi, 72 bpm, sixteen beats round |
One-shots are Opus; anything that loops is codec = "pcm", because an Opus
clip loses its first few milliseconds on decode and the seam is heard once a
lap. The settings go in at CREATE time — patching them afterwards re-encodes
what is already stored rather than the samples that went in.
Seams
A bed is rendered longer than it plays and folded back on itself: the tail is
crossfaded into the head, so the last sample runs into the first with no step.
Tonal layers additionally sit on frequencies that complete a whole number of
cycles across the loop (cyc), which are continuous across the seam by
construction. bakeOne reads audio.loopSeam on the payload it just encoded
and says so in its report when a loop would tick.
Running it
Bake from an execute, never from a component — a create made inside a
component callback is filed in the ephemeral runtime store and never reaches
the commit.
local synth = require("game.vendor.synth")
synth.bake() -- the whole bank
synth.bake({ "bed_rain" }) -- one clip
bakeMusicFromFile(path, name, opts) is the other half: it takes a generated
music file, downmixes it, trims the silence off both ends, folds its tail back
over its head so it loops, resamples it down to what a bed is worth storing
uncompressed at, and re-encodes it under the game's own identity. That is how
music_neko was made.
Scoped to this part · feeds back into the world's score.