# Station melody ## What this builds A small box of short station-like melodies, each a place in a made-up network. Selecting one plays a bundled file. Tests assert the play order and the length of fixture melodies, and they cover the selection UI. Audio is original or permissively licensed, listed in a licence file. No live radio network is used. Read `spekkr.inputs.json` first. `title` labels the list. `volume` is the default. `set` chooses the bundle. `loop` and `labels` change play and chrome. ## Out of scope - A live transit authority's marks, or a commercial jingle pack without a licence. - A live radio stream in the checks. - Network in the checks. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Order and length - The sample set's play-all order is the list in `fixtures/melodies.json`. Each file's duration matches the listed length within 50 ms. - A play-all script starts them in that order, with no overlap unless `loop` is on (loop is off for this script). - A licence file lists every track. Accept when: order and durations match, and the licence file is present. ### R2. UI and files - Selecting a named melody sets it as current and starts it. A stop control stops it. Tests assert a playing flag and a local src. - A fetch hook fails if a radio host is contacted. Goldens: the list, a selected item, a playing state, and the tiny set. - One command runs durations, the script, the UI, the hook, and writes the frames. No audio device required beyond an offline or mocked element. Accept when: the hook stays quiet, and the four frames match the goldens. ### R3. 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. ### R4. Checks and report - One command runs every acceptance check at the defaults and at the person's inputs, including golden frames where a requirement asks for them. - Checks do not need a network, a paid API, or physical hardware. Accept when: the command passes at the defaults, and a deliberately broken fixture or a wrong price fails it. ## Verification Fixture melodies play in documented order and length, within 50 ms. UI selection starts a local file. Bundled audio is licensed in the repo. A fetch hook fails if a live radio host is contacted. No network is required. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to pick a melody, how the files are licensed, and how to run the checks.