# Score Editor

> Views, book switching, Dorico-familiar shortcuts, offline storage, and signed revision history.

Canonical page: [https://docs.score.miso.fm/editor/](https://docs.score.miso.fm/editor/)

The Score Editor runs the Zig engraving engine inside a browser Web Worker and paints its binary display list with WebGPU (falling back to Canvas 2D). Every keystroke compiles to Flow, echoes in the status line, and updates the engraved page within a single frame.

## Galley and Page Views

Switch between continuous horizontal entry and print-exact pagination without losing your selection.

- **Galley view (default):** Renders the active book or score as one continuous system on a strip with pinned staff headers and a bar-number ruler. Built for fast left-to-right note entry and editing without page breaks.
- **Page view (`Ctrl+Alt+1`; `Ctrl+Alt+2` back to Galley):** Displays engraved pages using the active house style, page breaks, system spacing, and page-turn grades. Print and PDF export always use Page view.

## Score and Part Books

One score drives the conductor's score and every player's part book.

- Press `W` to toggle between the conductor's score and the active part book.
- Press `Shift+W` to open the view switcher and jump to any book or custom staff selection.
- Press `Alt+PageUp` / `Alt+PageDown` (or click the number breadcrumb in the top bar) to switch numbers in a multi-number show.
- Musical edits made in any book update the shared score immediately; [Flow Layout](https://docs.score.miso.fm/flow/layout/) overrides stay scoped to the active book.

## Keyboard Workflow

The default keymap follows Dorico conventions where possible, without switching between Setup, Write, Engrave, and Print modes. The status line's scope label (`CARET`, `NOTES`, `BARS`) shows what the next key acts on, and every edit echoes as a single line of Flow.

| Shortcut | Action |
| --- | --- |
| `Shift+N` / `Return` | Show the entry caret on the selected note or rest (`Esc` exits entry or clears selection) |
| `1`–`9`, `.` | Arm or apply duration (`6` = quarter, `5` = eighth) and rhythm dot |
| `A`–`G` | Enter pitch at caret, or repitch a single selected note (`Shift+Alt` / `Ctrl+Alt` + `A`–`G` shifts octave) |
| `-`, `=`, `0` | Flat, sharp, natural (`Alt+=` / `Alt+-` respells enharmonically) |
| `,`, `Space`, `T` | Rest, advance by step, tie |
| `Q`, `I`, `L`, `K`, `/`, `;` | Chord mode, insert mode, rhythmic lock, pitch-before-duration, grace note, tuplet |
| `V` / `Shift+V` | Switch or move voice |
| `S`, `Shift+S`, `Shift+F` | Slur / line break (`Shift+S`) / page break (`Shift+F`) |
| `[`, `]`, `'`, `}`, `\` | Accent, staccato, marcato, staccatissimo, tenuto |
| `<`, `>` | Crescendo / diminuendo hairpin over selection |
| `Shift+D`, `T`, `M`, `K`, `C`, `L`, `X`, `R` | Open popovers (dynamics, tempo, meter, key, chord symbols, lyrics, text, repeats); `Enter` commits, `Alt+Enter` applies to current staff only |
| `J` | Open the command palette (run commands, jump to bars/rehearsal marks, or type raw Flow) |
| `?` | Open the live key sheet showing all active bindings |
| `Mod+Z` / `Mod+Shift+Z` | Undo / redo through the draft (survives tab reload) |
| `Mod+S` / `Mod+P` | Open Send review / print current view |
| `Mod+Alt+7` / `Mod+Alt+9` | Toggle the left notes strip / right suggestions rail |

Bindings live on the client and are remappable per account while commands remain stable engine instructions (`{"cmd": {"id", "args"}}`). Browser-reserved chords (`Mod+T`, `Mod+N`, `Mod+W`, `Mod+1`–`9`, `Mod+Tab`) are never bound.

## Offline Execution and Local Journal

After the initial load, the editor operates completely offline.

- The Zig WASM engine, fonts, and session state run locally in a Web Worker.
- Every editing step writes to a draft journal in the browser's Origin Private File System (OPFS), so closing or reloading a tab loses zero work and preserves the full undo stack.
- Open, edit, undo, review, print, and `export everything` (which bundles score JSON, signed log, MusicXML, and every book's PDF into one archive) all run on device without a server.
- Sending while offline marks the draft `will send when connected` and signs it against the live head upon reconnection.

## Collaboration and Signed History

Miso Score tracks every change through three explicit states:

| State | Meaning |
| --- | --- |
| **Kept** | Local draft stored on your device; marked on changed bars and fully undoable. |
| **Sent** | Signed revision published to the show log; immutable once sent (reverting creates a new revision). |
| **Seen** | Confirmed received and rendered on a player's device. |

- **Cryptographic authorship:** Each browser holds an Ed25519 device key approved once by the user's Privy embedded Sui wallet (`notate-device-1`). Every revision carries the author account, approving device key (`by`), timestamp, human-readable Flow lines, and a BLAKE3 content hash verified locally on replay (`✓ verified`).
- **Safe collaboration:** Incoming revisions from another copyist arrive with a banner naming the author and bars. Your local draft rebases cleanly on top without silent overwrites, and the History rail inspects or reverts past revisions.
- **Deterministic by default:** No AI runs on the editor's input path. Plain-word drafting via [System 1](https://docs.score.miso.fm/ai/system-1/) is strictly opt-in per device and produces inspectable Flow proposals that apply only when confirmed.
