📝 Async PR & Smart-Paste Tokens
Bundle a change-set into a single token, send it through any channel (Discord, email, file
drop), and the recipient hits Ctrl+V in MidiEditor to review each hunk before merging.
This is the simplest collab mode - no servers, no realtime, just text.
When to use it
PRs shine when realtime co-editing would be the wrong tool: an AI agent just generated a draft you want to look over before merging; a friend sent a few-bar suggestion you want to cherry-pick from; you're working across timezones and don't want to wait for the other side to be online. A PR is a snapshot of your changes since the last share - the recipient sees a per-hunk diff and chooses what to merge.
Compared to a Live Session, a PR is asynchronous, leaves no servers running, and gives the receiver explicit veto power on every change. For small back-and-forth changes between two people on the same network, a Live Session is faster; for larger reviewable change-sets, the PR flow is better.
Quick start
- Make some edits in your MIDI file, save it (so the changes are captured in the local commit history).
- Open Collab → Create PR…. Pick a short title and an optional longer message describing what's in the change.
- Click Copy token. The clipboard now holds a single string that fully encodes your change-set.
- Paste the token into Discord, email, a chat, a text file - anywhere it'll reach the recipient.
- The recipient opens MidiEditor with their copy of the file, hits
Ctrl+Vin the matrix view, and the Review dialog opens.
Creating a PR
Open Collab → Create PR… after you've made and saved some edits. The dialog shows what'll be included (the commits and hunk counts since your last share), a message field, and a live size readout, with three ways to share:
- Copy token - copies a single, self-contained smart-paste
token (
midiedit-pr://v1:<sessionId>:inline:…) to the clipboard. The recipient pastes it withCtrl+Vin the matrix view - no follow-up download. The size readout tells you when a token is small enough to drop straight into a Discord code block. - Save bundle… - writes the change-set to a
.midiedit-pr.jsonfile you can attach to an email, drop in a shared folder, or keep next to the song. Best when a token is too long to paste into chat. - Post to Discord - sends the PR to your configured webhook channel as an embed, with the bundle uploaded as an attachment, so large change-sets travel as a file. Enabled only once a webhook URL is set, and posting is a deliberate click each time (never automatic). See the Discord webhook setting for setup.
The PR's scope is automatically "everything since your last share" - the local commit history (sidecar file) is the source of truth. If you've shared 3 PRs already, the 4th covers only the changes since the 3rd.
Receiving a PR
Copy a smart-paste token from anywhere - chat, mail, file. In
MidiEditor, with your copy of the file open, press
Ctrl+V while the matrix view has focus. The Review
dialog opens automatically.
The dialog lists every change as a hunk - events added, removed, or modified, grouped by track and channel. Each hunk has a checkbox; uncheck to skip. When you click Apply, only the selected hunks merge into your file as a single undo step. Anything you skipped stays in the bundle for next time (you can always paste the same token again to revisit them).
If the token's session ID doesn't match the file you have open, MidiEditor warns you with a "PR is from a different session" dialog - useful catch for "I pasted into the wrong file" cases.
Token formats
Both forms start with the unique midiedit-pr://v1: scheme so
Ctrl+V can route them to the Review dialog instead of
falling through to a normal paste:
midiedit-pr://v1:<sessionId>:inline:<base64-zlib>- the bundle is encoded directly into the token. Roughly 1.4× the bundle's compressed size in characters.midiedit-pr://v1:<sessionId>:link:<url>- the token holds only a URL pointing at the bundle file. The file itself must be reachable when the recipient pastes - otherwise the Review dialog reports a download error and the token is harmless to discard.
The recipient never has to know which form was used - the Review dialog handles both transparently.
History tab
The Collab History tab (right side panel, next to Tracks / Channels / Protocol / Event) shows every commit on the current file's local history. Each row is one save: timestamp, author, hunk counts. Expanding a row reveals the per-hunk summary - useful for verifying a PR's contents before sharing it, or for understanding how the file got into its current state after a few merges.
The history lives in a small .midiedit-collab.json
sidecar file next to the .mid. Sharing the sidecar is
optional - in a Live Session it gets shipped automatically;
in async PRs the bundle carries only the slice you chose.
Troubleshooting
- "Token doesn't start with
midiedit-pr://v1:" - the token had surrounding whitespace, line breaks, or markdown backticks (e.g. when pasted from a Discord code block). MidiEditor auto-trims those before checking, so pasting```midiedit-pr://v1:...```works as well as the bare token. If you still see this, the source copy lost characters - ask the sender to re-share. - "PR is from a different session" - the file you have open isn't the same logical file the PR was created from. Open the right file (or accept that you're cross-merging with the warning's context).
- "Could not decode the smart-paste token" - truncated payload (the token got cut off in transit, e.g. by a 2000-char chat limit). Ask the sender to use the link-token form instead.
- "Cherry-pick failed" - one of the hunks couldn't find its target event in the current file (likely the file already moved past the PR's parent commit through other edits). The bundle stays valid; try again after pulling other changes, or only check the hunks that still apply.