The assistant
The assistant is optional. ORIX Sonata compiles, plays, analyses and exports without it, offline and without an account. Nothing in this chapter is needed to make music.
Compose from a description
Switch the space to Compose, describe the music in words — "a gentle lullaby for piano in F major, 3/4, about 30 seconds" — and press Compose (⌘↩).
- The first time, paste your Anthropic API key in the field shown there (or choose another provider in Settings…). The key goes to your login Keychain.
- The model receives your description and the whole description of the Sonata language shipped with the app: the normative specification, the grammar, the diagnostics reference, the source of the standard library, the reference of every instrument, effect and parameter, and three example programs — about 140 000 characters, the same files the tests compile. With Anthropic this text is marked cacheable, so repeated requests reuse it.
- What the model writes is compiled here by the real compiler. If it does not compile, the diagnostics (code, line, message) are sent back and the model corrects its program; at most four requests in all. A program that compiles but contains no note is sent back too.
- The piece is rendered offline so you see its real waveform and its measured length, peak and loudness, with the code underneath. If the render is too quiet (peak under −16 dBFS), the measurement is sent back once and the model raises the levels without changing the notes.
Nothing is opened or changed by itself. Open as a New Document saves the piece in
~/Library/Application Support/ORIX Sonata/Compositions/ (never over an existing file) and
opens it — press Play there to hear it, edit it, save it wherever you like.
Replace This Document's Code puts it in the current document as one undoable edit.
In Compose mode your project is not sent: only your description and the language description. The piece is as good as the model's musical judgement; the app guarantees that it compiles and tells you what it measured, not that it is beautiful.
What it is
A conversation, in the Assistant space, with a language model that can use six tools on the open project:
| Tool | What it does | What it cannot do |
|---|---|---|
read_project |
reads the Sonata sources of the project | read anything else on the Mac |
list_instruments |
lists engines, effects and standard instruments from the registry | — |
check |
compiles source it wrote and reads the diagnostics | save anything |
propose_patch |
proposes the full new text of one source file | apply it |
render_preview |
renders the composition offline and reads duration, peaks and loudness | hear or send audio |
inspect_spectrum |
measures the rendered audio of a track around a time | — |
There is no shell, no file access, no network tool. Tool inputs are validated; an unknown tool or a malformed input is refused and reported to the model. A request stops after eight rounds of tools.
Proposals
When the assistant wants to change your code it records a proposal. You see it on the right as a diff, with a warning if the proposed text does not compile. Nothing changes until you press Accept; accepting is one undoable edit (⌘Z). If you edited the file after the proposal was made, accepting does nothing and says so: a proposal is never applied over newer text.
The Journal lists every tool the assistant ran, with its input and the beginning of its result, and every proposal you accepted or rejected.
Providers and keys
Choose a provider in Settings… inside the space:
- Anthropic — the Messages API. The default model is
claude-opus-5-5; you can type another model identifier. Requests ask the API to retry on its default fallback model when a safety filter declines a request; a refusal is shown as a notice. - OpenAI, OpenRouter — the Chat Completions API with function tools. Type the model you want.
- Local model — any OpenAI-compatible server on this Mac (for example an MLX server), by
default at
http://127.0.0.1:8080/v1. Requests to127.0.0.1orlocalhostnever leave the machine, need no key and no consent. ORIX Sonata does not download or run a model itself.
Keys are stored in your login Keychain (one item per provider), never in a project, a preference file or a log. Remote addresses must use HTTPS.
Consent
Before the first request to a remote provider, the space shows exactly what will be sent to which host — your messages, the project's Sonata sources when the assistant reads them, diagnostics and measured numbers — and waits for Allow. Consent is remembered per provider and per host; changing the address asks again. Audio is never sent.
Limits you should know
- Compose was run live against the Anthropic API (four runs, all ending with a piece that compiles; see
STATUS.md). Chat mode and the other providers were tested against scripted providers and the real compiler only: request and response formats are covered by tests, an actual conversation with each provider has not been run. - Answers are not streamed; a long answer appears when it is complete. Stop cancels.
- The model can be wrong about Sonata. It is instructed to compile what it writes; the diff and the compile warning on each proposal are there so you can judge before accepting.