SPB Git

Repository Public

spborix-sonata

ORIX Sonata is a native macOS studio for writing music as code: the Sonata language with its own Rust compiler, real-time DSP engine, 16 instrument engines and 18 effects, plus a SwiftUI studio with timeline, mixer, WaveLab, score and a notarized release.

22 entries at the root
History

Latest commit Status: listed on www.spboucher.ai/apps 9ed6eb7

NameLast commitUpdated
Apps Manual: measured size of the language description
Benchmarks Manual chapters for the assistant and packages; benchmark report (M5 Max, release); dependency...
crates Language: a leading plus is accepted (gain +4dB), transpose(x, interval) is callable as the spec...
Distribution Status report (delivered, tested, measured, not verified, incomplete), release notes, changelog,...
Documentation 0.1.0 (2): 107 examples with catalogue, Compose verified live, README in the ORIX standard with...
Examples Examples: 71 new verified scripts in nine categories (107 in total) with a generated catalog...
Packages Live test logs follow-ups and usage
Scripts Examples: 71 new verified scripts in nine categories (107 in total) with a generated catalog...
StandardLibrary Compiler: registry of the build, compile() and Compiler session (content-hash result cache,...
Tests Compiler: registry of the build, compile() and Compiler session (content-hash result cache,...
.gitignore M0: workspace, sonata-ir contracts (rational time, tempo map, diagnostics, Musical IR, DSP IR,...
Cargo.lock Packages (.sonatapkg): manifest, semver requirements, SHA-256 hash lists, validated ustar...
Cargo.toml Packages (.sonatapkg): manifest, semver requirements, SHA-256 hash lists, validated ustar...
CHANGELOG.md 0.1.0 (2): 107 examples with catalogue, Compose verified live, README in the ORIX standard with...
CLAUDE.md Governance: ADR 0001 architecture, roadmap with mandate traceability, risk register, status,...
project.yml 0.1.0 (2): 107 examples with catalogue, Compose verified live, README in the ORIX standard with...
README.md 0.1.0 (2): 107 examples with catalogue, Compose verified live, README in the ORIX standard with...
RISKS.md Status report (delivered, tested, measured, not verified, incomplete), release notes, changelog,...
ROADMAP.md Status report (delivered, tested, measured, not verified, incomplete), release notes, changelog,...
rust-toolchain.toml Manual chapters for the assistant and packages; benchmark report (M5 Max, release); dependency...
rustfmt.toml M0: workspace, sonata-ir contracts (rational time, tempo map, diagnostics, Musical IR, DSP IR,...
STATUS.md Status: listed on www.spboucher.ai/apps
README.md View source
ORIX Sonata icon

# ORIX Sonata

Write the Music. Compile the Sound.

A native macOS studio around Sonata, a language that compiles a program into musical events,
a DSP graph and audio. Its own compiler, real-time engine, instruments and effects — offline, without an account.
Every waveform, spectrum and number shown is measured; what is not finished is said to be unfinished.

Author: Simon-Pierre Boucher

macOS Apple Silicon Rust Swift Offline Accounts

Version Rust tests Swift tests Examples Notarization Entitlements Dependencies Listening License

Studio: timeline over the rendered audio of each track, mixer

# The language

sonata
composition "Aurora" {
    tempo 120bpm
    key D minor
    instrument piano: GrandPiano {
        gain -8dB
        chord [D3, A3, D4] duration 1/2
        chord [F3, A3, C4] duration 1/2
        effects { reverb hall(mix: 0.2) }
    }
}
bash
sonata check piece.sonata          # diagnostics with codes, lines, suggestions
sonata render piece.sonata -o piece.wav
sonata play piece.sonata

# The application

Code space Piano roll
Code — editor coloured by the compiler, diagnostics with fixes, the master's real waveform Studio — notes over each track's rendered audio; edits are reversible overrides beside the code
WaveLab spectrum Instrument Lab
WaveLab — oscilloscope, calibrated spectrum, spectrogram, 3D waterfall, loudness Instrument Lab — 16 engines, inspector generated from the registry, measured test notes
Score Compose from a description
Score — staff notation, PDF, MusicXML, MIDI Compose — describe a piece; with your Anthropic key the model writes it in Sonata and the app compiles, corrects and measures it
Library Documentation
Library — 83 instruments, 18 effects, 107 example scripts Documentation — the manual, offline, every example runnable

# Install

Download ORIX-Sonata-0.1.0.dmg from the releases of this repository, open it and drag ORIX Sonata to Applications. Signed with a Developer ID and notarized by Apple. See Distribution/RELEASE-NOTES-0.1.0.md for the command-line tools and how to uninstall.

# What is here

crates/ the compiler, DSP, instruments, real-time engine, renderer, interchange, packages, CLI, LSP and the C ABI (Rust)
Packages/, Apps/ the macOS application (Swift): Code, Compiler, Studio, WaveLab, Instrument Lab, Score, Documentation, Library, Assistant
StandardLibrary/ the standard library, written in Sonata
Examples/ example scripts, compiled and rendered by the tests, bundled in the app
Documentation/ language specification, manual, acoustics notes, architecture decisions
Benchmarks/ measured performance with its protocol

Read STATUS.md first. It says what is delivered, tested and measured, what was never verified (nobody has listened to it yet) and what is not in this version.

# Build

Requires Xcode 27, Rust 1.95 (pinned), XcodeGen.

bash
Scripts/build.sh test        # every Rust and Swift test
Scripts/build.sh debug       # the app (Debug) in build/DerivedData
Scripts/build.sh cli         # target/release/sonata
Scripts/build-release.sh     # signed, notarized DMG and ZIP in dist/ (needs a Developer ID and a notarytool profile)
Scripts/check.sh             # headers, no secret or audio tracked, no placeholder

Dependencies: serde and serde_json. Everything else — FFT, filters, instruments, codecs, the audio engine — is in this repository. See Documentation/DEPENDENCIES.md.

# Licence

All rights reserved. © 2026 Simon-Pierre Boucher.

Clone orix-sonata

Anonymous clone and fetch. Pushing requires the owner's personal access token.

Snapshot of main

Files main
Menu

Theme