# Design This file fixes the parts that are easy to get wrong. The language and tools are up to you, as long as the numbers here hold. ## Scaling Magnitude `m` is `20 * log10(m + 1e-9)`, then mapped so -60 dB is 0 height and 0 dB is 1. Heights outside are clamped. ## Fixture `fixtures/pulse.wav` is a short original pulse, permissively licensed in the repo. The expected first 8 bins of row 0, and the peak bin of the 220 Hz tone, are in `fixtures/ridges-pulse.json` and `fixtures/ridges-tone.json`. ## Screenshot tolerance 8 levels, 98% of pixels, 1600 by 1000, camera as in `fixtures/ridges-cameras.json`. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `title` | Title | Ridges of a pulse | Shown under the mesh. | | `rows` | Ridge rows | 48 | From 16 to 96. | | `fill` | Fill under each ridge | on | A solid surface under the line, not only a stroke. | | `rotate` | Slow turntable | on | The mesh turns. Tests settle at a documented angle. | | `source` | Source | fixture | fixture is a shipped audio buffer. tone is a generated sine. Neither uses a microphone. | ## Acceptance at the defaults The numbers, names and fixture paths already in this file are the authority. Where a later table or a shipped fixture file disagrees with prose, the table or the fixture wins. | Fixture | Role | | --- | --- | | `design.md` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/ridges-cameras.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/ridges-pulse.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/ridges-tone.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `spekkr.inputs.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | Golden frames are compared at 1400 by 1000 CSS pixels unless a requirement names another size. Tolerance, unless a tighter figure is given above: 8 levels, 98% of pixels, with motion, cursors and clocks frozen as this file says. A build's goldens are of that build; they do not have to match a shipped reference preview pixel-for-pixel if the tool or the type is different, but they do have to match this file's layout, counts and copy. ## Screenshots These pictures are headless-Chrome captures of the working reference in `reference/preview.html`, at the default inputs. They are not drawings of a product that has not been built. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel. | File | What it shows | | --- | --- | | `shots/ridges.png` | Forty-eight rows of a ridge spectrogram from the fixture audio buffer. | ## How to verify 1. Run the checks at the default inputs, without a network. 2. Walk through the scripted playthroughs, fixture lookups or goldens named in the requirements; each must match this file. 3. Repeat once at the person's inputs when they differ from the defaults. 4. A fixture audio buffer produces a documented mesh (and a tone produces a peak in a documented bin). A golden render is taken from two cameras. Checks hook microphone APIs so a mic cannot sneak in. No copyrighted album is shipped. No network.