Repository Public
1<!--2ORIX Sonata3File: STATUS.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# ORIX Sonata — Status89Version 0.1.0 (build 2), 2026-11-24. Four words are used precisely: **delivered** (in the tree and10reachable by the user), **tested** (an automated test passes), **measured** (a number recorded11with its protocol), **not verified** (never exercised the way a user would).1213> **Nobody has listened to this application.** Every statement about sound below is a14> measurement (pitch, level, spectrum, loudness, determinism), not a judgement of how it sounds.15> The instruments may be in tune and still sound poor. A listening pass by the owner is the16> first thing to do. Renders for that purpose: `cargo run --release -p sonata-instruments17> --example audition` (one WAV per engine and preset in `build/audition/`).1819## Definition of Done, line by line2021| The user can… | State |22|---|---|23| create a project | delivered; tested at model level (`DocumentRoundTripTests`), not through the UI by automation |24| read the documentation | delivered: 31 chapters bundled, searchable; every `sonata` block compiled by tests; 107 example scripts in the Examples menu and the Library, each compiled, rendered and measured by tests |25| write an original composition | delivered: editor with compiler-driven colouring, completion, diagnostics |26| get precise diagnostics | delivered and tested: code, file, line, column, suggestion, safe fix |27| compile | delivered, tested, measured (sub-millisecond phases on the starter piece) |28| hear several instruments at once | delivered; tested with the engine driven offline and with the real output device **muted**; never heard |29| see the true waveforms and spectra | delivered: master and per-track waveforms come from offline renders of the program; WaveLab reads the engine tap or rendered PCM; calibration tested on known sines |30| mix | delivered: faders, pan, mute, solo, meters, loudness; live and stored as overrides; tested through the engine |31| save, reopen | delivered; tested (package round trip, assets preserved, migration from format 1) |32| export a valid audio file | delivered, tested: WAV, AIFF, FLAC verified by ffmpeg/ffprobe and afinfo |33| get the same result from the CLI | tested: the CLI and the app call the same crates, including studio overrides |34| reproduce tests and benchmarks | `Scripts/build.sh test`, `Benchmarks/2026-11-24-m5max.md` |35| install a Release build | delivered: Developer ID, Hardened Runtime, **notarized (Accepted)**, stapled, Gatekeeper accepts a quarantined copy |3637## Delivered and tested3839**Language and compiler** — Sonata 0.1: normative spec, EBNF, diagnostics reference,40compatibility policy; lexer, parser with recovery, canonical idempotent formatter; modules with41an embedded standard library; unit algebra; pure functions, patterns, seeded randomness, quotas;42cursor model with voices, tuplets, swing, ties, articulations, tempo ramps, signatures;43instrument definitions with inheritance, slots and `graph { }` patches; effects, buses, sends,44automation, markers; Musical IR and DSP IR with latency compensation; content-hash cache;45AST/IR/graph JSON; language services; LSP server. The mandate's Aurora and CrystalHarp listings46compile unchanged. Fuzzing: about 6 000 generated or mutated programs without a panic.4748**Engine** — one processor for real time and offline (bit-identical across block sizes); no49allocation in the callback (counting-allocator tests); sample-accurate events; hot swap with50crossfade keeping position; loop, seek, count-in, metronome; meters, scope rings, callback51timing percentiles; BS.1770-4 loudness (−23.0 LUFS ±0.1 on the reference tone) and true peak.5253**Sound** — 16 engines, 83 presets, 83 named standard instruments; 18 effects, 44 presets;5424 patch nodes. Pitch within 0.13 cent for most engines (clarinet +1.0, bowed string −3.6 at the55top), tested at 44.1–192 kHz; levels below 0 dBFS; deterministic renders.5657**Files** — WAV 16/24/32/float, AIFF/AIFC, FLAC 16/24 (own encoder and decoder), TPDF dither,58stems, explicit normalisation, atomic writes, refusal to overwrite; MIDI export and import;59MusicXML 4.0 (checked with xmllint); vector PDF of the score.6061**Application** — document-based (projects and single files), nine spaces: Code, Compiler,62Studio (timeline, mixer, piano roll), WaveLab (12 tools incl. Metal waterfall), Instrument Lab63(inspector from the registry, patch editor, analysis), Score, Documentation, Library, Assistant.64Command palette, quick open, project search, jump to definition, undo for every studio edit,65Examples menu, MIDI keyboard audition, settings. **Compose from a description**: with the user's66Anthropic key (Keychain), the model is given the whole language description (specification,67grammar, standard library, parameter reference) and writes a piece that the app compiles,68corrects through the compiler's diagnostics (at most four requests), renders and measures.6970**Tools** — `sonata` CLI (check, build, render, play, fmt, inspect, export, import, test,71benchmark, docs, pkg) with stable exit codes; packages (`.sonatapkg`) with hashes, safe72extraction, deterministic resolution and a lock file.7374**Tests** — 253 Rust tests; 79 Swift tests (8 project format, 13 bridge through the C ABI,7558 interface logic), plus two opt-in tests (real output device muted; live Anthropic API); clippy `-D warnings` and rustfmt clean on the whole workspace;76`Scripts/check.sh` (headers, no secret or audio tracked, no placeholder).7778## Measured7980See `Benchmarks/2026-11-24-m5max.md`. In short, on an M5 Max, one audio thread, 48 kHz, 12881frames: 64 voices of synth or piano use 4–6 % of a core (p99 ≤ 0.17 ms); 256 voices 14–23 %;821024 simple voices about 55 % without a missed callback; 1024 piano voices do **not** hold.83Real device, monitor muted, debug build: 188 callbacks, p99 0.53 ms, no overrun.8485**Compose, live** (Anthropic API, `claude-opus-5-5`, 2026-11-24, four runs of the opt-in test86`liveComposeWritesAPieceThatCompiles`): every run ended with a piece that compiles and renders.87Two compiled on the first request, two needed one correction from the compiler's diagnostics;8820–37 s per run. Examples: a piano lullaby (2 tracks, 60–97 notes, 30–33 s, peak −13.8 to89−24.6 dBFS — the −24.6 run is what led to the measured-level feedback now in the loop) and a90chiptune (6 tracks, 702 notes, 25.6 s, peak −2.7 dBFS, −15.5 LUFS). With the system prompt91cached, a request is billed 61 uncached input tokens. Four runs are an observation, not a92success rate; none of these pieces was listened to.9394## Not verified9596- **Listening**, on any speaker or headphone.97- **The interface driven by a person or by XCUITest.** Every space was built, launched and98 captured as a screenshot; buttons were exercised through their models in unit tests. The one99 XCUITest (`Apps/ORIXSonataUITests`) was written but not run, because UI automation takes the100 keyboard and mouse of the machine in use. Drag gestures in the timeline and piano roll, the101 save and export panels, the detached mixer, the palette and the MIDI keyboard path were never102 operated by hand.103- **VoiceOver.** Labels and values are set on controls and canvases; no pass with VoiceOver on.104- **MIDI hardware**, **device changes while playing**, **long sessions**, **low memory**, **disk full**.105- **The assistant's Chat mode, OpenAI, OpenRouter and local servers against the real services.**106 Compose was run live against the Anthropic API (see Measured); the chat tool loop and the three107 other providers are tested with scripted providers only.108- **macOS 15–26** (deployment target 15.0; built and run on macOS 27 only) and **Intel** (arm64 only).109- The DMG was mounted and assessed on this Mac only, not installed on a second machine.110111## Incomplete (explicitly not in 0.1)112113| Area | Missing |114|---|---|115| Studio | audio recording; MIDI recording; trimming, splitting and fading audio regions; visual editing of automation (lanes are displayed); freeze/bounce commands (stems are rendered for display only); markers created in the studio |116| Editor | multi-cursor, minimap, snippets with placeholders, hover cards (hover text exists in the LSP; the editor shows diagnostics tooltips), side-by-side diff outside the assistant |117| Language | static type inference (types and units are checked when code is evaluated); incremental analysis; effect times that follow tempo changes |118| DSP | multiband dynamics, pitch shifting, time stretching, binaural spatialisation, multichannel beyond stereo, multithreaded engine, true-peak limiting (the limiter is sample-peak; true peak is measured) |119| Instruments | the 150-instrument goal: 16 engines / 83 presets exist. Flute and brass use a prescribed excitation (no overblowing); the piano has no string-to-string sympathetic coupling; no sampled instrument; engine preset values are not exposed in the registry |120| Score | slurs, dynamics, lyrics, grand staff, mid-piece clef or key changes, cross-measure beams, collision avoidance, visual editing |121| Files | AAC/MP3 export; RF64 (WAV/AIFF stop at 4 GiB); FLAC above 24 bits or 2 channels |122| Plugins | Audio Units hosting (none) |123| Packages | remote registry; audio content in packages |124| Assistant | streaming answers; an embedded local model (a local OpenAI-compatible server is supported instead) |125| Localisation | the interface is English only; one French chapter in the manual. All interface strings go through the localisation APIs, so a catalogue can be added |126| Distribution | universal2; installation of the CLI outside the bundle (the tools are in `Contents/Helpers/`) |127128## Blocked129130Nothing is blocked by a missing credential or tool.131132## Published133134At the owner's request on 2026-11-24: the repository is public at135https://git.spboucher.ai/orix-sonata with tag `v0.1.0`, and the release files (DMG, ZIP,136checksums, notes) are at `/releases/orix-sonata/v0.1.0/`; the DMG was downloaded again from137there and its checksum, staple and Gatekeeper assessment verified. The app is listed on https://www.spboucher.ai/apps with its page138https://www.spboucher.ai/apps/sonata. Not done: the ORIX site entry (www.orixlab.dev) and the139GitHub mirror.140