
Grimoire
The assembled DAW engine, with a headless JSON-RPC protocol any UI can drive.
Grimoire is the component that wires the other components into one complete, headless audio engine. It is part of Signals & Sorcery, a coherent set of Rust audio building blocks for audio apps, plugins, players and DAWs.
| Repository | github.com/shiehn/grimoire-daw-engine |
|---|---|
| License | MIT, free for commercial and closed-source use |
| Status | Planned |
| Layer | The engine (how the layers stack) |
| Crates (planned names) | grimoire |
What it is
Each component is useful alone. Grimoire is for people who want the whole thing: an engine they can start, point at a project, and drive from any language.
- Threads and lifecycles. A control thread, a writer thread for the project store, the audio callback and background workers, each with written rules about what it may do.
- Projects. Open, edit, save and close Tapestry projects. Every edit goes through an intent, so undo and replay always work.
- Playback. One or more transports, each running a Procession playback into a Leyline graph on an Aethergate device.
- Plugins. Plugin chains through a
PluginHosttrait, with Summoner as the default implementation, so a crashing plugin never takes the engine down. - Import, render, bounce and freeze. Media import through Scriptorium, offline render on the same graph as live playback, and track freezing as a mechanism an application applies with its own policy.
- Recording. Takes captured through Aethergate and written crash-safe through Scriptorium.
- The protocol. Newline-delimited JSON-RPC 2.0 over TCP and local sockets, with events, limits and a JSON Schema for every method. Method groups cover projects, intents, transport, tracks, clips, plugins, render and audio.
- Method modules. Applications register their own namespaces of methods beside the built-in ones, so product features live in the application, not in the engine.
Usage example
Illustrative sketch
Planned, not final. Taken from the README.
As a library:
use grimoire::{Engine, EngineConfig};
let mut engine = Engine::start(EngineConfig::default())?;
let project = engine.open("MySong.project")?;
engine.transport(0).play()?;
// Serve the protocol so a UI in another process can drive it.
engine.serve("127.0.0.1:0")?;
Over the protocol, from anything that can open a socket:
{"jsonrpc":"2.0","id":1,"method":"project.open","params":{"path":"MySong.project"}}
{"jsonrpc":"2.0","id":2,"method":"intent.apply","params":{"name":"track.insert","params":{"kind":"audio","name":"Vox"}}}
{"jsonrpc":"2.0","id":3,"method":"transport.play","params":{"transport":0}}
{"jsonrpc":"2.0","method":"event.transport","params":{"transport":0,"playing":true}}
A typed TypeScript client generated from the schemas is part of the plan, so web and Electron user interfaces get autocompletion and checked calls.
How it fits in the ecosystem
Grimoire is the engine row. Dependencies point down, never up.
Below it: every other engine component, each reached through its published interface, so any one can be replaced with your own:
- Tapestry (repo) and Procession (repo) for musical structure;
- Leyline (repo) for signal flow;
- Cantrips (repo), Scriptorium (repo), Aethergate (repo) and Summoner (repo) for sound and devices;
- Runecraft (repo) and Orrery (repo) for the floor.
Above it: only applications, Familiar (repo) extensions, and user interfaces built with Glyphwork (repo).
Headless first. Everything a user interface can do, the protocol can do. Scripts, tests, command-line tools and automated agents are first-class clients.
What it deliberately doesn't do: no user interface, no product logic (that lives in applications, as method modules and app data), and no lock-in. An application that only needs a graph and a device should use Leyline and Aethergate directly.
| Component | Repository | Role | Status |
|---|---|---|---|
| Runecraft | runecraft-audio-core | Shared contracts, realtime safety, process isolation and realtime-safe logging: the floor every other component stands on | In preparation |
| Orrery | orrery-musical-time | Tempo and meter, transports, bar, beat and sample maths, timed MIDI | In preparation |
| Summoner | summoner-plugin-host | Out-of-process VST3 and Audio Unit plugin hosting with crash isolation | In preparation |
| Aethergate | aethergate-audio-platform | Audio devices (cpal, CoreAudio, a fake device for tests) and shared-memory meters | Planned |
| Leyline | leyline-audio-graph | A realtime audio graph with delay compensation, and a compiler from an edit model to a graph | Planned |
| Cantrips | cantrips-audio-dsp | Built-in mixer DSP: sampler, fader, pan, meters, compressor | Planned |
| Scriptorium | scriptorium-audio-media | Decode and encode, a sample store, streaming voices, crash-safe recording | Planned |
| Tapestry | tapestry-session-model | Tracks, clips, lanes and scenes; edits with undo; a crash-safe project store | Planned |
| Procession | procession-timeline-engine | What plays in each block: regions, notes, automation, launches | Planned |
| Grimoire | grimoire-daw-engine | The assembled engine and its headless JSON-RPC protocol | Planned |
| Familiar | familiar-plugin-sdk | An SDK for plugins and panels that extend a Signals & Sorcery engine | Planned |
| Glyphwork | glyphwork-audio-ui | Audio UI widgets: meters, knobs, faders, waveforms | Planned |
Status
Planned. No code yet. The repository holds the design.
macOS first, then Windows and Linux as the components below support them. Driving a native engine from a browser through the protocol works anywhere; running the engine itself in WebAssembly is a later exploration.
Links
- Repository: github.com/shiehn/grimoire-daw-engine (README, LICENSE)
- Depends on: tapestry-session-model, procession-timeline-engine, leyline-audio-graph, cantrips-audio-dsp, scriptorium-audio-media, aethergate-audio-platform, summoner-plugin-host, runecraft-audio-core, orrery-musical-time
- Used by: familiar-plugin-sdk, glyphwork-audio-ui
- All twelve components · For agents · llms.txt