← Collaboration overview

🏠 LAN Live Session

Two or more PCs on the same network can co-edit a MIDI file in realtime. UDP multicast handles peer discovery, TCP carries the data, and the host's file auto-transfers to anyone who joins. Edits flow in every direction every 200 ms.

PC 1 - Host
Edits Live, ships diffs every 200 ms
PC 2 - Joiner
Sees host's edits within ~200 ms

Two screen captures recorded simultaneously on a real LAN session. Notes typed on either side land on the other within a tick.


When to use it

LAN Live Session is the right pick when everyone's on the same network - band rehearsal room, office, home Wi-Fi, classroom, even a VPN that forwards multicast. No internet required, no third-party server in the path, lowest possible latency. The host's PC acts as the central hub (host-star topology) and accepts up to 8 simultaneous joiners.

For users on different networks (across the internet), pick WAN Live Session instead - same UX, same features, just routed via WebRTC + a tiny rendezvous worker.


Quick start

  1. Host opens a MIDI file, picks Collab → Start LAN Live Session…. A 4-character pairing code appears.
  2. Each joiner picks Collab → Join LAN Live Session…. The host shows up in the discovery list automatically.
  3. Joiner either double-clicks the host entry or types the 4-character code if discovery is blocked on their network.
  4. The host's file transfers automatically. The status bar on both sides flips to LIVE [Local] · N peer(s) and edits start flowing.

Hosting

LAN Live Session start dialog showing the 4-character pairing code, copy code / copy invite buttons, and a peer list
The Start dialog - share the code or click Copy invite for a paste-ready message.

The Start dialog gives you a 4-character code (excluding ambiguous letters and digits like I, L, O, 0, 1) plus two buttons:

The dialog also shows a peer list that grows live as joiners arrive. The status bar in the main window mirrors the count: LIVE [Local] · 1 peer when the first joiner is in, 2 peers next, and so on.

By default, hosting starts with the Work on a copy safety net turned on. Your file is duplicated to Documents/MidiEditor_AI/shared/<name>_shared.mid and the editor switches to that copy. Your original on disk stays untouched.


Joining

LAN Live Session join dialog showing the discovery list and a manual-IP fallback field
The Join dialog - pick a discovered host or use Manual IP if multicast is blocked.
Client view of an active LAN Live Session with the LIVE indicator and peer label
Client side of an active session - the LIVE indicator shows the host's name and peer count.

The Join dialog scans the local network via UDP multicast and lists every host that's currently sharing. Double-click the entry, or type the 4-character code if you got it via voice / chat.

Some networks (managed switches, hotel Wi-Fi, certain VPN configurations) block multicast. If the host doesn't appear in the list, expand Connect manually, paste the host's IP and port shown in the host's Start dialog, and the join goes direct via TCP.

Modal asking the joiner to confirm receiving the host's MIDI file
When you join, the host's file transfers to your machine into Documents/MidiEditor_AI/shared/.

The first time you join a session you confirm the file transfer in a modal. The host's .mid arrives as <name>_shared.mid next to the existing shared folder. From here on the editor edits the shared copy - if you had your own version of the file open, it stays untouched on disk.


What's synced

MidiEditor with an active LAN Live session: matrix view, peer labels, and LIVE [Local] indicator
An active LAN session in the editor - LIVE indicator, peer count, and the realtime sync running quietly in the background.

What's deliberately not synced:


Returning peers & reconciliation

Live sessions are tolerant of leave-and-rejoin. If a peer drops (Wi-Fi hiccup, app restart) and rejoins the same session, MidiEditor compares the local commit history against the host's and either fast-forwards the rejoiner (if their state is a subset of the host's) or surfaces a diverged-history dialog where the host can pick which edits to accept.

For most short interruptions you'll never see a dialog - the returning peer just catches up. The diverged dialog only appears when the rejoining peer made offline edits that the host doesn't have.


Review mode (host approves edits)

By default, edits from any peer apply on every other peer immediately. For situations where the host wants veto power - teaching scenario, testing an AI agent's output, untrusted joiner - toggle Collab → Review mode. Incoming hunks queue up instead of applying; the host cherry-picks via the Review dialog (same UI as the async PR review) before they take effect.


Leaving cleanly

Pick Collab → Leave Live Session on either side. Everyone else sees the peer count tick down and the editor returns to solo mode. The shared file in Documents/MidiEditor_AI/shared/ stays on disk so you can re-open it later or save a Save-As copy back to your real working location. Originals (the file you started from before hosting / joining) stay untouched if work-on-copy was on.


Troubleshooting

"Host can't see me" / "Connection refused"

Same root cause as the WAN firewall issue: Windows Defender (or third-party antivirus) silently blocks the app's UDP multicast announcements and TCP sockets without a popup prompt. Add MidiEditorAI.exe to the firewall allow-list for both Private and Public:

  1. Windows Security → Firewall & network protection → Allow an app through firewall
  2. Add MidiEditorAI.exe, check both Private + Public
  3. If you have third-party AV, add an exception there too

See the WAN troubleshooting page for the full walkthrough - the fix is identical.

"Host doesn't appear in the discovery list"

"Ghost notes after sync"

Symptom: the file plays notes that aren't visible in the editor, or the end-tick keeps resetting after a delete-measures operation. This was a sync-loop fixed in v1.7.0 - the receiver now removes events past a shrunken end-tick atomically with the file-length change. If you ever see this on v1.7.0 or later, please file an issue with the midieditor_ai.log that's saved next to the executable.

"Live sync paused - last edit was too large to send"

Single hunks frame exceeded the 16 MiB negotiated max-message-size on the wire. Save the file (Ctrl+S), then split your edit into smaller chunks (e.g. apply the same tool twice on half the events each time). The status message clears as soon as the next sync tick has a fits-in-budget diff.

Other