Sonir Bench Module Specification
SPEC V1Everything you need to write a DSP module and the resample design around it, in one file: the prose, both JSON Schemas, the complete error catalog, and reference examples that pass as they are. The intended reader is not only you but the AI you write with.
Writing a module with an AI
The specification is written to be read by an AI as much as by you. The whole path is three steps, and none of them let an AI touch what is playing.
- 01
Hand over the specification.
Give your assistant the URL below, or attach the file. It is one file on purpose: the prose, the Schema, every error code and working examples all arrive together.
- 02
Have it write one JSON.
A module is a single JSON file. It must state its spec_version, and the reference modules in Appendix C are there to be imitated.
- 03
Drop the file into the app.
Under "create new" there is a field that takes the file. Saving runs the same validation as playback, and a module that does not pass comes back with the stage, the code and the numbers that were measured. Copy that from the app and hand it back: that is how the AI fixes its own mistake.
Something to paste
Read the Sonir Bench module specification at https://sonir.app/spec/sonir-bench-v1.en.md, then write one DSP module as JSON. Include spec_version, follow the reference modules in Appendix C, and do not invent fields that the Schema does not define.- An AI cannot make sound. There is no way for an assistant to drive Sonir Bench, so nothing it says can change what you are listening to.
- What it writes is a file. Both shapes are here: the graph, and the resample design that carries the band limit. Playing it, and the settings of the app itself, are not.
- Running Sonir Bench itself is what plays the module. The specification alone does not produce sound.
How this document is built
It is generated.
The prose comes from the specification, the JSON Schema and the error codes come from the implementation, and the examples come from tested reference modules. Nothing in it was copied by hand.
Every JSON in it actually passes.
Only modules a test carries through all four stages (shape, validate, simulate, arm) are included. An example that does not pass would only get imitated.
Thresholds and ranges are not written in the prose.
The numbers live in the JSON Schema, assembled from the implementation's own constants. Copying them into prose makes two sources, and two sources drift.
What is included.
Only the parts a module author needs. Per-OS audio I/O, internal architecture, and future plans are not here.