# Chiptune tracker ## What this builds A charming tracker: patterns of notes, an order list, and a few simple voices, enough to write and share a tiny song. A fixture module renders offline to a buffer whose length and peak match a file. Pattern-edit tests cover placing a note, deleting it, and changing the order list. The voices are synthesised, not ripped from a commercial chip, and the file format is original. Read `spekkr.inputs.json` first. `title` labels the tracker. `rows` is the pattern height. `voices` chooses the voice set. `piano` and `follow` change the views. ## Out of scope - A commercial console's rip or a trademarked console name in the UI. - A live speaker or a hardware cartridge. - Network or a public module host in the checks. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Render of a fixture song - `fixtures/song-lull.json` rendered offline at 44100 Hz has a length of 8.0 seconds within 20 ms, and a peak in the documented 0.2–0.9 range (exact bounds in the file). - A second, silent song (no notes) is below -80 dBFS RMS and has the length implied by its order list. Accept when: both length and peak (or silence) match for the two songs. ### R2. Pattern edits - Placing a note (voice, row, pitch, velocity) and reading the pattern back returns it. Deleting that row clears it. - The order list of song-lull is `[0, 0, 1, 0]`. A script that changes it to `[0, 1, 1]` is read back as that. - Edits are undoable once, restoring the previous pattern or order. Accept when: place, delete, order-change, and undo all match the fixtures. ### R3. Frames and files - Goldens: the first pattern of song-lull, the order list, an optional piano roll (or the pattern again if the option is off), and a scope of the render. - One command renders, checks length and peak, runs the edits, and writes the frames. No audio device. Accept when: the command passes for both voice sets, and the frames match the goldens. ### R4. Inputs - The build reads `spekkr.inputs.json`. Settings label the UI, options turn features on or off, and a swap must be one of its choices. - A value outside a stated range, or a swap that is not one of its choices, is refused before the app starts its checks, with a message that names the key. Accept when: the default inputs render, an illegal swap is refused by name, and changing a visible setting (for example the title) shows up in a later check. ## Verification A fixture song renders offline to a documented length and peak. A silent song is quiet. Pattern-edit tests cover place, delete, the order list, and one undo. No audio hardware, no ripped samples, and no network. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to enter a note, how to render, and how to run the checks.