Modular synth
A patchable instrument: fixture patches render offline to documented envelopes, with note-scheduling tests and no audio hardware.
This is a creative tool spec on Spekkr, published by lume. It is listed with the other specs. Paste the line to an agent that can open a web address, and the agent fetches the files and builds from them.
- Spec
lume/modular-synth- Version
- 0.2.2
- Published by
- lume
- Updated
- 15 Nov 2026
Build this spec
Build the spec at https://spekkr.com/lume/modular-synth/start.md.
Paste this to your AI agent. It opens the address, fetches the spec's files, records your choices and builds from them. Nothing to install, no account.
Published by lume.
What does the result look like?
What can I customize?
Your choices go into the line you copy. Anything else is yours to edit, but it leaves the tested path.
What do I get?
-
spec.mdRequirements and acceptance checks.Modular synth
What this builds
A patchable software instrument: oscillators, a filter, a gain, an envelope, a delay, and cables between them. A patch is a file. Tests render fixture patches offline to a buffer, and they compare waveform or spectrum envelopes to a fixture, with a tolerance. Note scheduling is tested. No audio hardware, no microphone, and no live MIDI device are required in the checks.
Read
spekkr.inputs.jsonfirst.titlelabels the rack.sample_rateis the engine rate.rackis the starting patch.keyboardandscopeschange the chrome.Out of scope
- A hardware modular, a vendor's module clones, or a commercial sample pack.
- A live MIDI device or a speaker in the checks.
- Network or a public patch forum in the checks.
Requirements
Each requirement has an id. Checks name the id they cover.
R1. Offline render and envelopes
- A patch file lists modules, parameters, and cables. The engine renders it to a mono or stereo buffer at
sample_rate, with no AudioContext hardware output required. fixtures/patch-a.jsonrendered for 2.0 s has the peak, RMS, and onset time infixtures/patch-a-env.json, within the tolerances there.- A silence patch (no oscillator, or gain 0) is below -80 dBFS RMS.
Accept when: patch A's envelope matches, and the silence patch is below the floor.
R2. Notes
- A note-on at t = 0.5 s, mid-C, velocity 100, on the starting
voicerack, starts a tone whose onset (first sample above -40 dBFS) is within 5 ms of 0.5 s. - A note-off at t = 1.0 s, with a 0.2 s release, is below -40 dBFS by t = 1.25 s.
- Times are in the rendered buffer, not a wall clock.
Accept when: onset and release fall in the listed windows at both sample rates.
R3. Frames and files
- Goldens of the rack, a patched bay, a scope after patch A, and the keyboard.
- One command renders the fixtures, checks envelopes and notes, and writes the frames. No audio device.
Accept when: the command passes at both sample rates, 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
Offline renders of fixture patches match documented waveform or spectrum envelopes, with tolerances. Note-on and note-off are checked in the buffer, not against a speaker. No audio hardware, no MIDI device, and no network are 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 patch, how to render offline, and how to run the checks.
# Modular synth ## What this builds A patchable software instrument: oscillators, a filter, a gain, an envelope, a delay, and cables between them. A patch is a file. Tests render fixture patches offline to a buffer, and they compare waveform or spectrum envelopes to a fixture, with a tolerance. Note scheduling is tested. No audio hardware, no microphone, and no live MIDI device are required in the checks. Read `spekkr.inputs.json` first. `title` labels the rack. `sample_rate` is the engine rate. `rack` is the starting patch. `keyboard` and `scopes` change the chrome. ## Out of scope - A hardware modular, a vendor's module clones, or a commercial sample pack. - A live MIDI device or a speaker in the checks. - Network or a public patch forum in the checks. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Offline render and envelopes - A patch file lists modules, parameters, and cables. The engine renders it to a mono or stereo buffer at `sample_rate`, with no AudioContext hardware output required. - `fixtures/patch-a.json` rendered for 2.0 s has the peak, RMS, and onset time in `fixtures/patch-a-env.json`, within the tolerances there. - A silence patch (no oscillator, or gain 0) is below -80 dBFS RMS. Accept when: patch A's envelope matches, and the silence patch is below the floor. ### R2. Notes - A note-on at t = 0.5 s, mid-C, velocity 100, on the starting `voice` rack, starts a tone whose onset (first sample above -40 dBFS) is within 5 ms of 0.5 s. - A note-off at t = 1.0 s, with a 0.2 s release, is below -40 dBFS by t = 1.25 s. - Times are in the rendered buffer, not a wall clock. Accept when: onset and release fall in the listed windows at both sample rates. ### R3. Frames and files - Goldens of the rack, a patched bay, a scope after patch A, and the keyboard. - One command renders the fixtures, checks envelopes and notes, and writes the frames. No audio device. Accept when: the command passes at both sample rates, 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 Offline renders of fixture patches match documented waveform or spectrum envelopes, with tolerances. Note-on and note-off are checked in the buffer, not against a speaker. No audio hardware, no MIDI device, and no network are 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 patch, how to render offline, and how to run the checks.
-
design.mdFixture patches, waveform envelopes, and note timing in the buffer.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.
Patch A
An oscillator (saw, 220 Hz) into a low-pass at 1.2 kHz into a gain of 0.4, 2 seconds. Expected peak, RMS, and a coarse spectrum (energy below/above 1.2 kHz) are in the envelope file. Tolerances: peak 10%, RMS 10%, onset 5 ms.
Screenshot tolerance
8 levels, 98% of pixels. Audio checks are on the buffer, not the image.
Inputs
Key Label Default Notes titleTitle A small rack Shown above the patch bay. sample_rateSample rate 44100 44100 or 48000. Tests run both. keyboardOn-screen keys on A two-octave keyboard that posts notes into the patch. scopesShow a scope on A small waveform after the last module. rackStarting rack voice voice is a documented oscillator-filter-gain patch. empty is a blank bay. 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 fixtures/patch-a-env.jsonA shipped fixture. The build may move it, but then design.mdmust name the new path.fixtures/patch-a.jsonA shipped fixture. The build may move it, but then design.mdmust name the new path.spekkr.inputs.jsonA shipped fixture. The build may move it, but then design.mdmust 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/rack.pngA small rack with a fixture patch cabled across the modules. How to verify
- Run the checks at the default inputs, without a network.
- Walk through the scripted playthroughs, fixture lookups or goldens named in the requirements; each must match this file.
- Repeat once at the person's inputs when they differ from the defaults.
- Offline renders of fixture patches match documented waveform or spectrum envelopes, with tolerances. Note-on and note-off are checked in the buffer, not against a speaker. No audio hardware, no MIDI device, and no network are required.
# 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. ## Patch A An oscillator (saw, 220 Hz) into a low-pass at 1.2 kHz into a gain of 0.4, 2 seconds. Expected peak, RMS, and a coarse spectrum (energy below/above 1.2 kHz) are in the envelope file. Tolerances: peak 10%, RMS 10%, onset 5 ms. ## Screenshot tolerance 8 levels, 98% of pixels. Audio checks are on the buffer, not the image. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `title` | Title | A small rack | Shown above the patch bay. | | `sample_rate` | Sample rate | 44100 | 44100 or 48000. Tests run both. | | `keyboard` | On-screen keys | on | A two-octave keyboard that posts notes into the patch. | | `scopes` | Show a scope | on | A small waveform after the last module. | | `rack` | Starting rack | voice | voice is a documented oscillator-filter-gain patch. empty is a blank bay. | ## 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 | | --- | --- | | `fixtures/patch-a-env.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `fixtures/patch-a.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/rack.png` | A small rack with a fixture patch cabled across the modules. | ## 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. Offline renders of fixture patches match documented waveform or spectrum envelopes, with tolerances. Note-on and note-off are checked in the buffer, not against a speaker. No audio hardware, no MIDI device, and no network are required.
-
tasks.mdBuild tasks in order, each with a check.Tasks
Work in order. Finish a task's check before starting the next.
- Set up. Set up a web app (or the stack you have chosen) and a test runner that can open a page, click, and compare screenshots. Read
spekkr.inputs.jsonfirst. Check: a blank or heading page loads, and an empty test run passes. - Offline render and envelopes (R1). Build what
R1. Offline render and envelopesasks for, to the numbers indesign.md. In particular: A patch file lists modules, parameters, and cables. The engine renders it to a mono or stereo buffer atsample_rate, with no AudioContext hardware output required. Check: theR1. Offline render and envelopesacceptance checks pass. - Notes (R2). Build what
R2. Notesasks for, to the numbers indesign.md. In particular: A note-on at t = 0.5 s, mid-C, velocity 100, on the startingvoicerack, starts a tone whose onset (first sample above -40 dBFS) is within 5 ms of 0.5 s. Check: theR2. Notesacceptance checks pass. - Frames and files (R3). Build what
R3. Frames and filesasks for, to the numbers indesign.md. In particular: Goldens of the rack, a patched bay, a scope after patch A, and the keyboard. Check: theR3. Frames and filesacceptance checks pass. - Inputs (R4). Build what
R4. Inputsasks for, to the numbers indesign.md. In particular: The build readsspekkr.inputs.json. Settings label the UI, options turn features on or off, and a swap must be one of its choices. Check: theR4. Inputsacceptance checks pass. - Goldens. Capture the frames named in
design.mdat the defaults, with motion frozen where the file says so. Compare them within the stated tolerance. Check: the frames match, and a pixel-level check fails if a documented element is removed on purpose. - Finish. Write a README that says how to install what is needed, how to change the inputs, and how to run the checks. Run the one command from a clean folder. Check: every item under Definition of done in
spec.mdis true.
# Tasks Work in order. Finish a task's check before starting the next. 1. **Set up.** Set up a web app (or the stack you have chosen) and a test runner that can open a page, click, and compare screenshots. Read `spekkr.inputs.json` first. Check: a blank or heading page loads, and an empty test run passes. 2. **Offline render and envelopes (R1).** Build what `R1. Offline render and envelopes` asks for, to the numbers in `design.md`. In particular: A patch file lists modules, parameters, and cables. The engine renders it to a mono or stereo buffer at `sample_rate`, with no AudioContext hardware output required. Check: the `R1. Offline render and envelopes` acceptance checks pass. 3. **Notes (R2).** Build what `R2. Notes` asks for, to the numbers in `design.md`. In particular: A note-on at t = 0.5 s, mid-C, velocity 100, on the starting `voice` rack, starts a tone whose onset (first sample above -40 dBFS) is within 5 ms of 0.5 s. Check: the `R2. Notes` acceptance checks pass. 4. **Frames and files (R3).** Build what `R3. Frames and files` asks for, to the numbers in `design.md`. In particular: Goldens of the rack, a patched bay, a scope after patch A, and the keyboard. Check: the `R3. Frames and files` acceptance checks pass. 5. **Inputs (R4).** Build what `R4. Inputs` asks for, to the numbers in `design.md`. In particular: 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. Check: the `R4. Inputs` acceptance checks pass. 6. **Goldens.** Capture the frames named in `design.md` at the defaults, with motion frozen where the file says so. Compare them within the stated tolerance. Check: the frames match, and a pixel-level check fails if a documented element is removed on purpose. 7. **Finish.** Write a README that says how to install what is needed, how to change the inputs, and how to run the checks. Run the one command from a clean folder. Check: every item under Definition of done in `spec.md` is true.
- Set up. Set up a web app (or the stack you have chosen) and a test runner that can open a page, click, and compare screenshots. Read
-
reference/preview.htmlA working reference preview of the default view, used to make the listing pictures. A build does not have to start from this file. -
reference/fonts/fonts.cssWebfont faces for the reference preview. -
reference/fonts/Geist.ttfGeist variable typeface for the reference preview. -
reference/fonts/GeistMono.ttfGeist Mono variable typeface for the reference preview. -
reference/fonts/InstrumentSans.ttfInstrument Sans variable typeface for the reference preview.
Is it for me?
- Kind
- creative tool
- Platforms
- web
- Tools
- TypeScript
What does it need?
- Agent permissions
- shell
- Commands it runs
install a test runnerinstall a tool that can write a wav file
What changed?
- 0.2.215 Nov 2026Names what it builds.
- 0.2.115 Nov 2026Fill the rack with more modules, a full keyboard, a sequencer, and an animated loop.
- 0.2.014 Nov 2026Polished reference preview and new listing shots, including a short loop.
- 0.1.014 Nov 2026First version.
For agents: start.md says how to build this spec, spec.json holds everything on this page, and bundle.tar.gz holds its files.