Every note graded, to the sample.
A music engine where an AI's playing can be graded exactly, replayed exactly, and trained on with a clean conscience. The model proposes. A checker that is not the model admits the proposal or refuses it with a reason, and a deterministic law commits and hashes what it admits.
Fetch the piano
cargo run -p host --release -- fetch-piano
Play
cargo run -p host --release -- play
Play along
cargo run -p host --release -- jam --midi 0
Listen: one hymn, two arrangers
Two models arranged the same 1862 edition of Battle Hymn of the Republic. The law committed every note of each, and the piano played what it committed.
Uncompressed WAV, 116 MB ·the notes the law committed85b2d56723cacc6c87895a2784d2cd034dea1142e62de6d8a1a9d2867dad2eed
Uncompressed WAV, 106 MB ·the notes the law committedbf49d310de5e94975b277cd1e7c57134388a0232d53bb059f12e7727baeba017
Introduction: kimi-k3 plays louder: average velocity 93 against 89.
This browser could not start WebGL, so the 3D view is off. The table below has the same measurements.
Where they differ, section by section
Each cell gives the section's length, notes a second, range and average velocity (out of 127), measured from the notes the law committed. The last column states the largest of five differences: length, notes a second, median note, average velocity, and the most notes sounding at once. Both arrangements follow the same form: an introduction, five verses each with its chorus, and a coda.
| Section | glm-5.3 | kimi-k3 | The largest difference |
|---|---|---|---|
| Introduction | 9.5 s · 7.8 notes/s · E♭1–D5 · 89 | 9.5 s · 7.4 notes/s · E♭1–D5 · 93 | kimi-k3 plays louder: average velocity 93 against 89 |
| Verse 1 | 28.4 s · 6.5 notes/s · E♭2–D5 · 84 | 25.7 s · 6.4 notes/s · E♭1–D5 · 78 | kimi-k3's median note sits 4 semitones higher |
| Chorus 1 | 25.3 s · 6.9 notes/s · F1–D5 · 88 | 25.3 s · 4.2 notes/s · E♭1–D5 · 82 | glm-5.3 stacks up to 7 notes at once, against 4 |
| Verse 2 | 28.4 s · 4.3 notes/s · E♭2–D5 · 85 | 25.7 s · 6.8 notes/s · E♭1–D5 · 82 | kimi-k3 plays 1.6× as many notes a second |
| Chorus 2 | 25.3 s · 5.7 notes/s · E♭1–D5 · 89 | 25.3 s · 7.0 notes/s · E♭1–D5 · 88 | kimi-k3 stacks up to 7 notes at once, against 5 |
| Verse 3 | 28.4 s · 6.7 notes/s · E♭1–D5 · 92 | 25.7 s · 8.4 notes/s · E♭1–D5 · 87 | kimi-k3's median note sits 4 semitones higher |
| Chorus 3 | 25.3 s · 7.5 notes/s · E♭1–D5 · 91 | 25.3 s · 5.9 notes/s · E♭1–D5 · 93 | kimi-k3's median note sits 5 semitones higher |
| Verse 4 | 28.4 s · 3.4 notes/s · B♭2–B♭4 · 88 | 25.7 s · 6.1 notes/s · E♭1–D4 · 78 | kimi-k3 plays 1.8× as many notes a second |
| Chorus 4 | 25.3 s · 4.4 notes/s · B♭1–D5 · 89 | 25.3 s · 7.4 notes/s · E♭1–D5 · 93 | kimi-k3 plays 1.7× as many notes a second |
| Verse 5 | 28.4 s · 6.8 notes/s · E♭1–D6 · 93 | 25.7 s · 11.3 notes/s · E♭1–D6 · 93 | kimi-k3 plays 1.7× as many notes a second |
| Chorus 5 | 25.3 s · 6.2 notes/s · E♭1–D6 · 95 | 25.3 s · 7.4 notes/s · E♭1–D6 · 96 | kimi-k3's median note sits 7 semitones higher |
| Coda | 23.2 s · 3.7 notes/s · B♭1–D5 · 92 | 12.2 s · 3.8 notes/s · E♭1–C6 · 95 | glm-5.3 takes 11.0 s longer |
Piano: Salamander Grand Piano V3 by Alexander Holm, CC BY 3.0. Both arrangements are dedicated to the public domain under CC0 1.0. Each was generated on Ollama Cloud from this project's transcription of the anonymous 1862 Ditson edition, and admitted by the law's licence check with its evidence. Each recording is rendered through the law. Rendering it again gives the same bytes, on the same machine and on Windows and Linux.
How it works
A model may propose anything. Only the law decides what happened.
Integer time
The law keeps time at 3,360 ticks per quarter note and steps a fixed quantum of 48 samples at 48 kHz, whether anyone plays or not. A plan that arrives late is refused; it never stalls the music.
The take is part of the law
Every note you play is graded against the score to the sample, inside a gate of ±40 ms. "Late by 45 ms" is a fact the engine can prove, and the waveform is only presentation.
One hash everywhere
The law is no_std Rust with no floating point, compiled to one pinned WebAssembly binary. The Entertainer’s golden hash is the same on x86_64 and ARM64 and under V8, SpiderMonkey and JavaScriptCore; the exemplars’ goldens are checked on both architectures.
Every song earns its place
A score is admitted only with evidence: a composition in the public domain in the US and the EU, a free or self-engraved arrangement, the source edition and its year, and an in-file licence that matches its receipt.
Replays without a model
The law is deterministic, so a recorded take replays to the same hash without calling a model. CI replays The Entertainer’s constructed take on every run.
Reviewed across families
Before a code change merges, two models from families other than the author’s review it on Ollama Cloud, each blind to the other.
Try it
Rust 1.98.1, which rustup installs, or the container, which already holds the host. Windows runs everything, though live input has not yet met a real MIDI keyboard. On Linux, CI builds, tests and renders, and live input is Windows-only for now.
Or use the container
docker run --rm -v "$PWD:/out" \
ghcr.io/mcp-tool-shop-org/si-jam-sessions:0.2.1 \
notes /out/notes.jsonGet the grand piano once
git clone https://github.com/mcp-tool-shop-org/si-jam-sessions
cd si-jam-sessions
cargo run -p host --release -- fetch-piano # 742 MB, checked by SHA-256Listen
cargo run -p host --release -- play # glm-5.3
cargo run -p host --release -- play --piece battle-hymn-kimi-k3Play along
cargo run -p host --release -- devices # find your MIDI input
cargo run -p host --release -- jam --midi 0Reproduce a recording
cargo run -p host --release --locked -- render battle-hymn-glm-5.3.wav \
--piece battle-hymn-glm-5.3 --voice piano
# SHA-256 85b2d56723cacc6c87895a2784d2cd034dea1142e62de6d8a1a9d2867dad2eedPinned
Every claim on this page is a hash you can check.
| What | SHA-256 |
|---|---|
| The Entertainer: the golden take, graded | b43db3787577b4f959f611ae6e7d84c0b92e69d34c31bcbfe927a9f67f0eda11 |
| Battle Hymn, glm-5.3: the law’s snapshot | 409a3341a35af9e7ad203ef573a28e475600b27e183cc08d1b8b0cfbb03d2f97 |
| Battle Hymn, kimi-k3: the law’s snapshot | e792361b22413de14e1cd0740947af2a34725970ef0d126be1e720f96b06395f |
| Battle Hymn, glm-5.3: the WAV | 85b2d56723cacc6c87895a2784d2cd034dea1142e62de6d8a1a9d2867dad2eed |
| Battle Hymn, kimi-k3: the WAV | bf49d310de5e94975b277cd1e7c57134388a0232d53bb059f12e7727baeba017 |
| The Salamander piano archive | b7760e168494cf095344e217b0af013fc449ad033abbbdf1c65211cf11dc038b |
Trust model
What the code touches, and what it never does.
The law does no I/O
CI checks that the WebAssembly module imports nothing at all.
One download, pinned
Only fetch-piano uses the network: one archive from one fixed address, checked by SHA-256 before anything is unpacked, with links and escaping paths refused.
No telemetry
Nothing is collected or sent. There are no accounts, and the code handles no credentials.