Status: design (round 167r, 2026-11-01); phase P1 implemented in round 168a (see "Decisions" and §9 P1); live
sessions (P2) over the LYNX SHARE relay implemented in round 169b (§9 "P2 as built"). This is a LYNX-own feature: FL
Studio 2026 has no live collaboration (see §0). Code references point at the tree as of origin/main 4a5f74fc.
Like hosting a game: the host opens a project and picks Session › Start online session; LYNX SHARE shows an
invite code such as LYNX-7F3K-Q9WM. A friend picks Session › Join online session, pastes the code, the host
clicks Accept, and the friend's LYNX SHARE downloads the project and its samples in the background. From then on
both work in the same project at once. Each person gets his own area (his channels, Playlist tracks and mixer
inserts, in his colour) and records with his own audio interface and his own plugins, locally: nobody plays over
the network, so nothing a person records is delayed or glitched by the internet. What travels is the edits and the
finished takes. A part made with a plugin the other person does not own is heard by the others as audio that the
owner's computer renders for them. When the session ends, the host has the complete project on his disk.
What it is not: a real-time jam. Two people playing in time over the internet would hear each other 30–100 ms late (more across continents), which is unplayable for music. LYNX SHARE takes the opposite approach: every take is recorded against the local playback, on the local clock, and placed on the shared timeline to the sample.
Static check of FL Studio 2026's own binaries (no FL launch; strings only, as the rounds' REA rules allow for "does this exist" questions):
| Binary | Strings (ASCII + UTF-16) | Collaboration-related hits |
|---|---|---|
FL64.exe |
3 251 | none |
FLEngine_x64.dll |
237 135 | collab: 0, invite: 0, webrtc / STUN / ICE / SDP: 0 |
FLMManaged.dll |
79 376 | only the Microsoft Graph SDK's own types (DriveItemInviteRequest, InviteParticipantsOperation…) bundled for OneDrive access, no FL feature |
What FL's network features are, from the same strings: FL Cloud (ToolsFLCloudAccountActionExecute,
ToolsFLCloudPluginsActionExecute, ToolsFLCloudMasteringActionExecute, ToolsFLCloudDistributionActionExecute,
UploadSamplesToCloudActionExecute, FileSaveAndBackupToCloudActionExecute, TCloudStorageBackupsFolderNodeHelper:
sounds, plugins, mastering, distribution, project backup storage), SoundCloud upload (TSoundCloudUploader) and FL
Studio Remote / Image-Line Remote (ILRemoteServer, "Enable connecting to the FL Studio Remote app on iOS and
Android": a phone as a controller on the LAN). None of them lets two people work in one project. Method and counts:
docs/analise/REA_rodada167r.md.
So Online Sessions are LYNX-own, like the mixer Mono button: the workflow is designed for LYNX, not copied.
AudioEngine owns the Song (src/core/Song.h); only the UI thread touches it.
Every change goes through AudioEngine::editSong (std::function<void (Song&)>, bool undoable)
(src/engine/AudioEngine.cpp ~2159; about 470 call sites in the UI) or through an engine method that changes
song directly; all of them end in publishSong(), which bumps songStamp and builds an immutable RackState
for the audio thread (SnapshotExchange<RackState>). publishSong() is therefore the one choke point where every
change to the song is visible.undoStack / redoStack are std::deque<Song>; one mouse press = one step
(lastUndoPress). core/History.h names a step by comparing two snapshots (describeChange).Note::channel, Clip::pattern / track / channel / automation,
ChannelDef::mixerTrack / group, MixerSend, EffectSlot::sidechain / sendTracks, AutomationTarget::index /
slot, Automation::source, PlaylistTrack::mixerTrack / channel, ChannelLoop::channel, MidiLink /
InitialValue targets. Song::removeChannel, removePattern, removeAutomation, RackOps::moveChannels,
MixerOps::moveTracks renumber them.engine/ProjectFile.*, toJson / fromJson, currentVersion = 1, additive keys,
defaults omitted, values clamped when read). ProjectFile::mixerTrackToVar already serialises one insert alone.PluginRef::state (base64) is filled by
AudioEngine::capturePluginStates() before a save; the live state is inside the plugin instance.ExportJob (engine/Exporter.h) builds a private AudioEngine with
its own instruments and plugin instances on the UI thread and renders on a background thread. "Consolidate track"
(trackmodes::makeConsolidateSong / applyConsolidate) already renders a solo copy of the song and swaps the
result in as an audio clip.Rewriting 470 edit sites into operations is not realistic, and an opaque lambda cannot be replayed on another machine. Instead the session layer observes the result of each edit and replicates entity states:
ChannelDef, Pattern, Automation, Arrangement and Clip get a
std::uint64_t uid; Song gets projectId (random 128-bit, the project's lineage) and nextUid. A
uids::normalize (Song&) pass after every edit (in editSong and publishSong) gives a fresh uid to any entity
whose uid is 0 or repeats an earlier one in the same list — so the 470 call sites need no change: a duplicated
channel is a copy with the same uid, the pass renames the later one. Uids are saved in .lynx (needed by the
phase 1 "merge part" too) and assigned to .flp imports by the same pass. A uid is participantTag << 40 | counter
so two people can create entities at the same time without collisions.maxMixerTracks) and Playlist rows are numbered slots
in FL and LYNX, not list items. They keep their index on the wire. Operations that renumber them
(MixerOps::moveTracks, moving Playlist tracks, deleting inserts in the middle) are host-only during a session
(greyed for guests with the hint "Only the host can reorder inserts during a session")..lynx JSON with index references replaced by uids. A new Song::forEachIndexRef (kind, fn)
visitor collects in one place the references that removeChannel & co. already know about; a test fills every
reference field of a Song and checks the visitor reaches each one (so a field added later cannot be forgotten
silently). Derived fields are not sent: Clip::crossfadeIn/Out (recomputed by clipops::updateCrossfades),
MixerTrack::flInput, ForeignPlugin leftovers.| Entity | Key | Body |
|---|---|---|
| Globals | — | bpm, beatsPerBar, swing, masterPitch, info, project switches (autoCrossfades, playTruncatedNotes, fastDeclick, panTriangular, cleanMixer, substitutesBypassed, performanceMode), channelGroups |
| Channel | uid | the ChannelDef JSON (plugin state may be an attached blob, §4.3) |
| Pattern header | uid | name, length, colour, loop settings, event lanes |
| Pattern notes slice | (pattern uid, channel uid) | the notes of one channel in one pattern |
| Insert | index | ProjectFile::mixerTrackToVar |
| Playlist row | index | PlaylistTrack |
| Clip | uid | the Clip (arrangement uid, track row, refs as uids) |
| Automation | uid | the Automation |
| Arrangement | uid | name, loop, markers (tempo / time signature / punch markers live here) |
| Links | — | midiLinks, initialValues (small lists, replaced whole) |
The notes slice is the key to working in the same pattern without stepping on each other: FL-style patterns hold notes of many channels; the host's notes for his channels and the guest's notes for his channels are different entities and merge without conflict.
currentPattern, currentArrangement
(the wire form stores every arrangement's clips by arrangement uid regardless of which one is open — the
playlist/arrangements[i].clips swap of Song::selectArrangement is undone on the way out and redone on the way
in), mode (pattern/song), loopStart/loopEnd, Playlist row height/collapsed, selections, open windows,
zoom, info.workSeconds (host only).Every peer (the host too) runs a SessionReplica attached to its AudioEngine:
confirmed C (host revision r) ── + pending local patches P1..Pn ──> working song W (= engine.song)
publishSong() sets a dirty flag. A 30 Hz UI timer (and the end of every mouse gesture) diffs W
against a shadow copy entity by entity (operator== per entity; patterns compare their note vectors; a full diff of
a large project is well under 1 ms), and turns the differences into one patch: PROPOSE {clientSeq, baseRev = r,
entities…}. A knob drag therefore sends ~30 small patches per second, coalesced, never one per mouse move.followPatternLengths moves clips when a pattern's length
changes; Song::removeChannel deletes the channel's notes and audio clips everywhere). The host re-runs the
same Song function on the primary change and accepts the ripple when it matches what it computed itself;baseRev,
that entity is rejected (the others in the same patch still apply). Entities are small and owned by one person
(§2), so this only happens when two people with rights edit the same thing within the same ~100 ms;uids::normalize, followPatternLengths,
clipops::updateCrossfades — derived data is recomputed, never trusted), increments the revision, appends the
commit to its session journal (§8.3) and broadcasts COMMIT {rev, origin, clientSeq, patch}.C' = C + commit, W' = C' + P1..Pn (re-applying the pending
merge patches entity by entity), then engine.applyRemote (W'). On the commit of one's own Pi: drop it from the
pending list. On REJECT {clientSeq, entities, reason}: drop it, recompute W, and the hint bar says what was
undone ("Pattern 3: Pedro changed it at the same time — your edit was undone"). The user's change never silently
vanishes.AudioEngine::applyRemote (Song): like setSong without clearing the
history, without modified = false, keeping the local view fields, and through the normal publishSong() so
RackState::build reuses the voices and plugin instances of unchanged channels (lastPublishedShape). A changed
PluginRef::state of a plugin that is open here is pushed into the live instance (setStateInformation) instead of
recreating it.The whole-song undoStack would undo other people's work, so in a session the engine switches to a
SessionHistory: each local gesture stores, per entity it touched, the entity's JSON before and after. Undo
builds a patch that restores the before state of each entity whose current state still equals its after state
(nobody changed it since); entities someone else changed since are skipped and named in the hint bar ("Can't undo
Pattern 3: Pedro edited it since"). Redo is the same in reverse. Undo and redo are ordinary proposals to the host.
The History panel (ui/HistoryPanel) lists only one's own steps (named with describeChange on the entity pair),
with others' edits as grey, non-clickable lines ("Pedro: Notes in Pattern 3"). Leaving the session keeps the history
as normal whole-song snapshots again.
SNAPSHOT {rev, wire song (gzip), participants, ownership} and then live commits
from rev on. A large project's JSON is a few MB, under 1 MB compressed. Media follows separately (§3).RESUME {participantId, lastRev, pending…}; the host keeps the
last 4 096 commits (or 30 min) in memory and on disk: within that window it replays the missing commits, otherwise
it sends a fresh snapshot, and the pending patches go through the normal conflict check against their old
baseRev.The handshake carries protocolVersion, the LYNX version and build commit. Phases 2–3 require the same LYNX
SHARE version on every computer: the rendering of LYNX's own engines changes between versions, and a guest whose
LYNX lacks a field would still keep it (merge patches, §1.2.6) but could not play it. A mismatch is refused with a
clear message: "Pedro uses LYNX SHARE 0.1.22, you use 0.1.23. Both must use the same version — Help › Check for
updates." Later the rule can relax to "same protocol version" with a warning. (The Microsoft Store build updates
through the Store, so a Store user and a GitHub user can differ for a few days — the message says so.)
Each participant has an id (a hash of his long-term public key, §6.4, so he is the same person when he reconnects), a display name and a colour. Roles:
| Role | Can |
|---|---|
| Host | everything; accepts joiners; grants permissions; owns the globals and the Master; ends the session |
| Editor (default for an accepted friend) | create things (they become his), edit his own area, record, chat |
| Listener | hear, follow the host's transport, see presence, chat; no edits (downloads the media and the stand-ins only) |
Each entity has an owner (a participant id), stored with the session and saved in the .lynx as an optional
session block (participants + owner per uid/index), so a later session with the same people restores the areas:
| Thing | Owner | Notes |
|---|---|---|
| Channel | its creator | a guest's new channel takes a free insert from his reserved insert range (below) |
| Notes of channel C in pattern P | the owner of C | anyone can write notes for his own channels into any pattern; that slice is his |
| Pattern header (name, length, colour, loop, event lanes) | its creator | the host owns the patterns that existed before the session |
| Mixer insert | the participant whose range it is in / who claimed it | effects, fader, pan, EQ, sends, input, record arm: the owner. Master (0): host |
| Routing into someone else's insert | needs Edit everything | a guest may send to the Master and to his own inserts |
| Playlist rows | reserved ranges (below) | a guest's rows form a track group named after him, in his colour (PlaylistTrack::grouped header) |
| Clip | the owner of the row it is on | moving a clip to another person's row needs rights on both |
| Automation clip | the owner of its target (channel/insert) | tempo automation is a global |
| Globals: tempo, time signature, swing, master pitch, project settings, markers, arrangements list | host | grantable as Tempo & project settings |
| Renumbering (move inserts / rows / channels order) | host | see §1.2.2 |
Reserved ranges avoid two people grabbing the same insert or row at the same moment: when a guest joins, the
host assigns him a block of inserts (e.g. 40–59, after the highest insert in use, grown on demand) and a block of
Playlist rows (e.g. the 16 rows after the last used one, in his group). In a session Song::claimFreeInsert,
trackmodes::freeMixerTrack and the take-track choice (takes:: "a new track after the last one used") look in the
participant's own range first.
Edit own area (on for editors) · Edit everything (off) · Tempo & project settings (off) · Save a copy at the end (default: open question Q1) · Role (editor / listener). Turning a permission off never deletes anything.
Trying to edit something one does not own does nothing and the hint bar says "Owned by Ana — ask her for access"; the host gets a one-click Give Pedro access to Pattern 3 in the participant list.
Media are content-addressed: id = BLAKE2b-256 of the file bytes (streaming; Monocypher, §6.4; core/Sha256.h
only hashes a whole buffer). On the wire, sample paths (ChannelDef::samplePath, SampleZone, EffectSlot::
samplePath, audio clips' channels) become media:<id>/<original file name>; each peer maps an id to a local file.
Before downloading anything a peer checks whether it already has the bytes:
Data folder
(engine/FlStudio already locates the installation), compared by size and hash — FL's factory packs are then
never downloaded when both people have FL;MEDIA_MANIFEST {id, size, kind, name, chunk hashes} lets the
receiver verify every chunk, resume after a drop at the first missing chunk, and fetch chunks from any peer that
has them (in a 3-person session the second guest can get samples from the first).platform::cacheFolder ("Sessions")/<session id>/ plus a
shared content-addressed store cacheFolder ("SessionMedia")/<aa>/<id>.<ext>. On Windows cacheFolder is
%APPDATA%\LYNX\… (roaming); big media do not belong in a roaming profile, so the implementation adds
platform::localCacheFolder (%LOCALAPPDATA%\LYNX, the Store package's LocalCache) for these. Test runs use
LYNX_PROFILE_DIR as for every other path.<project>/Session media/<participant name>/, and the host's Song points at them — so after
the session the project is complete and self-contained, and File › Export › Project data files
(ProjectPackage::exportZip) works on it as usual.core/CacheBudget.h, default 20 GB, Session settings); Leave
session asks "Keep the downloaded files for next time?"; Settings › General › Clear session files empties it.When someone joins, and whenever a third-party plugin is added, the peers exchange only the plugins the project
uses (never the whole plugin list — privacy): PLUGIN_QUERY [{format, uniqueId, deprecatedUid, name,
manufacturer, version}] → PLUGIN_ANSWER [{have, version}]. The match is by format + unique id (+ name and vendor
as fallback), the way PluginHost::findForeign already matches FL's plugins — not by PluginRef::id: JUCE's
createIdentifierString contains a hash of the plugin's file path, which differs between two computers. Cross-format
matches (owner VST3, peer VST2 of the same plugin) count as "have, different format": the state may not carry over
(adoptFlPlugins' withoutState case), so they default to the stand-in.
For every part that needs a plugin a peer does not have (same plugin and same version = he plays it himself):
InstrumentKind::standIn (never saved, created by the session's local projection of
the Song) plays the stems from the Scheduler's pattern clip starts. Song side (phase 1, also saved):
ChannelDef::standIns {pattern uid → media id, source hash, length} and MixerTrack::standIn, so a project sent
to someone (P1) and the host's final project keep the renders as a fallback.ExportJob-style engine and its own plugin instances created from the state (never the live instances the
musician is playing). Paused while the owner plays or records; resumed at stop. Plugins that refuse a second
instance (some licence systems) fall back to rendering with the live instance when the transport is stopped.ChannelDef::pluginState / EffectSlot::state) — are LYNX code:
with the same LYNX version they sound identical on every computer and need no stand-in. The exception is an engine
that reads files from the local FL installation (e.g. BooBass's DLL tables checked by sha256Hex): it is treated
like a plugin ("needs FL Studio's data"), and FL's binaries are never transferred.A plugin only the host has, used by a guest (round 190ai): see "P5-A1 as built" in §9.
Third-party states are opaque blobs (PluginRef::state, ForeignPlugin::state): stored, hashed, forwarded,
never parsed or decompiled. Parameter moves of a hosted plugin do not touch the Song, so the owner's LYNX captures
the state (PluginHost's captureState) 2 s after the last parameter change or when the plugin window closes, and
sends it as an entity change. A state over 64 KiB (sample-based instruments can be MBs) travels as a media blob
referenced by hash, not inline in the patch.
Each computer plans its own delay compensation (core/Pdc.h) for what it plays. Stems are rendered
latency-compensated (as exports are), so a stand-in has no latency of its own and lines up on the peer; the owner's
plugin latency only affects the owner's local PDC plan. A peer that has the plugin plays it with its own reported
latency, compensated locally. Nothing about latency crosses the network.
MixerTrack::inputChannel), sets count-in / punch as
always. Punch ranges come from arrangement markers (punchRanges (markers)), which are host-owned globals; in a
session a guest's own time selection acts as his local punch range (local view state, not a marker), so he
does not need the host to place markers for him.core/TakeRecording.h: header rewritten every second, ring
that never loses the timeline) and placed with the existing compensation (takes::Latency = round trip + manual +
Master PDC; takes::place → start/offset/offsetFraction on the shared tick timeline, to the sample; loop passes
and punch parts as today). Ticks are the shared coordinate: the clip lands exactly where he played it on everyone's
computer, whatever their sample rate or audio driver.PROPOSE: new audio clip channel + clip on his row), published at
once; the file is hashed and uploaded in the background. Others see the clip immediately as "arriving 34 %" and
hear it when it has arrived.Drop mid-take: nothing happens to the take — it is local. It uploads when the connection is back (§8.1).
Following along. By default every transport is independent. Follow host transport (presence bar toggle) starts / stops / locates this peer's playback when the host's does (±network delay, irrelevant for listening), for "listen to this" moments. It is not used while recording.
As built (round 169b): the relay first. Live sessions go through the LYNX SHARE relay (
wss://relay.lynx-share.com, SHARE_API.md §3) over one WebSocket per computer; LAN-TCP and ICE (below) are not built. Why, in this order:
- It works for everyone on day one. A WebSocket to port 443 passes every home router, carrier-grade NAT, mobile hotspot and company firewall that lets a browser out; TCP to a host's port needs port forwarding or UPnP, and ICE hole punching fails for 10–20 % of connections (§9.1) — exactly the cases a first test with a friend hits, with nothing LYNX can do about it.
- Nothing new to ship or trust. The operating system's own TLS and WebSocket (WinHTTP on Windows; the system libcurl ≥ 7.86 on Linux / macOS, loaded at run time) — no libjuice, KCP, miniupnpc or listening socket, no Windows Firewall prompt, no new attack surface on the user's computer (nobody can connect to it).
- Privacy: the participants never learn each other's IP address (only the relay sees them), which a direct connection always reveals (§6.5).
- It costs nothing extra. The relay runs on the VPS the project already has (the user's decision 5 kept the free path; the VPS is not a new bill) and a session is small: edits are a few KB, media go once per person. The relay is blind: it routes by a one-byte peer number and never sees the key (§6.4 as built).
- The session protocol does not care. The messages (§6.2 as built) ride on a
livelink::Connection; a direct LAN / ICE link can later carry the same sealed frames, as an optimisation for big media on one network.The cost: every frame makes two hops (≈ 2 × the one-way latency to the relay, ~30–80 ms in Brazil), which only delays when an edit appears on the others' screens — takes are always recorded locally (§5).
UI / SessionReplica / MediaStore / StandIns
│ messages (§6.2) on 3 logical streams: state (reliable, ordered) · media (reliable, low priority) · presence (unreliable)
SessionLink ── Noise_XXpsk3 encryption + framing (§6.4)
│
┌─────┴────────────────────────────────┐
TcpLink (P2: LAN / direct IP) IceLink (P3: UDP via ICE + reliable stream) RelayLink (P4: TURN)
TcpLink: JUCE StreamingSocket (no new dependency). LAN discovery by a UDP broadcast beacon (JUCE
DatagramSocket, port 47800) so the Join dialog lists "Ana's session on this network"; Direct IP (host:port)
for people who forward a port. Optional automatic port mapping with miniupnpc (BSD-3) so "direct" works through
many home routers without opening ports by hand.IceLink: libjuice (MPL-2.0, plain C, no dependencies, ICE + STUN + TURN client, Windows/macOS/Linux)
does the NAT traversal / UDP hole punching; on top, a reliable ordered stream with KCP (MIT, one C file) for
the state and media streams, raw datagrams for presence. Both build with the zig/MinGW cross toolchain like the other
C libraries in third_party/.SessionLink interface. ENet (MIT) — a fine reliable-UDP library but it owns its socket, which conflicts with
ICE's hole-punched socket. JUCE alone has no NAT traversal.THIRD_PARTY.md.Framed: u32 length | u8 type | u8 stream | payload; JSON payloads (the same juce::var code as .lynx), gzip
above 4 KiB; media chunks binary.
| Group | Messages |
|---|---|
| Handshake | HELLO {protocol, lynxVersion, build, name, colour, caps} · KNOCK (host UI: accept/deny) · WELCOME {participantId, role, permissions, ranges, session} · DENY {reason} · BYE {reason} · PING/PONG |
| State | SNAPSHOT {rev, song, participants, owners} · PROPOSE {clientSeq, baseRev, patch} · COMMIT {rev, origin, clientSeq, patch} · REJECT {clientSeq, entities, reason} · RESUME {participantId, lastRev} |
| Session | ROLE, GRANT/REVOKE {participant, permission, entity?}, RANGES {inserts, rows}, END |
| Media | MEDIA_MANIFEST {id, size, kind, name, chunkHashes} · MEDIA_HAVE [ids] · MEDIA_WANT {id, chunks} · MEDIA_CHUNK {id, index, bytes} |
| Plugins | PLUGIN_QUERY · PLUGIN_ANSWER · STANDIN_READY {entity, pattern?, media, sourceHash} · STANDIN_REQUEST {entity} |
| Presence | PRESENCE {playhead, playing, recording {insert, from}, focus {window, entity}, selection} (5 Hz, unreliable) · CHAT {text} · TRANSPORT {play/stop/locate} (follow mode) |
lynx-share.com is Hostinger Single Web Hosting: static files plus PHP (the crash-report API
website/api/crash.php / _common.php already runs there, storing files outside public_html, rate-limiting by a
salted daily hash of the address). Shared hosting has no long-lived processes or WebSockets, and PHP requests are
time-limited, so the rendezvous is a tiny mailbox over HTTPS with long polling, which is all ICE needs (a few
messages per join):
| Endpoint | Does |
|---|---|
POST /api/session/open.php {protocol} |
creates a room; answers {room: "7F3K", hostToken, expires} (room id from the server, 4 base-32 chars; the token proves later calls are the host's) |
POST /api/session/post.php {room, from, to, blob} |
drops one message (≤ 8 KB) into a participant's mailbox |
GET /api/session/poll.php?room&me&after=seq |
returns waiting messages, holding the request up to ~20 s if there are none (bounded below the host's PHP time limit — to be measured before P3, not deployed now) |
POST /api/session/close.php {room, hostToken} |
deletes the room |
website/api/ and deploys them with the usual
scripts/deploy-site.sh when the user says so.As built (round 169b) — simpler than the PAKE + Noise plan below, because the relay (not a direct socket) is the only way in and every peer is let in by the host by hand:
- Invite code
LYNX-RRRRR-RRRRR-SSSS-SSSS-SSSS-SSSS: the relay's room id (10 characters a-z 2-7) and an 80-bit secret (16 characters) the host's LYNX SHARE makes with the system's random generator and never sends anywhere. Typing is forgiving (case, spaces, dashes, a pasted link; 0/1/8 read as o/i/b).- Keys: Argon2id (Monocypher, 8 MiB, 3 passes, a fixed salt) of the secret → a master key; BLAKE2b keyed with it gives the relay room token (domain "relay room token") and the session key (domain "session key:" + room). The host creates the room with that token (
POST /v1/rooms {"token"}), so the relay checks tokens without ever getting the secret, and nobody can get from the token to the key (different domains of a hash, and an 80-bit secret behind Argon2id is out of reach of offline guessing).- Frames:
[0x4C][1][nonce 24][MAC 16][XChaCha20-Poly1305(sender id 8, counter 8, payload)], additional data "LYNX SHARE live session v1". The sender id is random per connection; a frame whose counter is not above the last one from that sender is dropped (replay); a frame changed on the way or sealed with another key is dropped.- Limits, honestly: everyone with the code shares one key, so a participant could pose as another one inside the session (they were let in by the host anyway); there is no forward secrecy (a code that leaks later decrypts a recording of the traffic — the code dies with the session); no per-install identity keys yet. A PAKE + Noise handshake (below) fixes these and fits behind the same
Sealer/Openerwhen direct links come.
LYNX-7F3K-Q9WM: 7F3K = the room id (server-side lookup), Q9WM = a 20-bit secret made by the
host's LYNX and never sent to the server. The whole code is the password of a PAKE (CPace over X25519 with
Monocypher's crypto_elligator_map as the hash-to-curve), whose result is the pre-shared key of a Noise
XXpsk3_25519_ChaChaPoly_BLAKE2b handshake. A short code is enough because a PAKE allows only one online guess
per connection attempt: the host's LYNX refuses after 5 failed handshakes and every joiner must also be accepted
by the host by hand (knock). The code dies when the session ends.ab12 ·
cd34) is shown in the knock dialog and the participant list. A friend the host marked Trusted can rejoin a
resumed session without a new code.PRIVACY.md changes from "exactly two things" to three: Online sessions (only when you start or join one) —
what is sent, to whom (the participants you accept, the lynx-share.com rendezvous, STUN servers), the IP visibility,
that nothing is stored on the server, and how files are kept/removed. The "only uses of a network API" list gains the
session sources.resources/msix/AppxManifest.xml.in declares internetClientServer and privateNetworkClientServer (a
full-trust app is not sandboxed by them, but the Store listing shows the capabilities honestly);docs/STORE.md's "the Store build's only network use is the crash report" sentence is updated.https://lynx-share.com/join#7F3K-Q9WM: the fragment never reaches the server; the page opens
lynx://join/… or shows the code to paste), "Ends when you end the session".LYNX-____-____), the sessions found on this network listed
below it, name + colour (remembered), Join → "Waiting for Ana to accept…" (cancel).Its LYNX keeps running on its working copy; a take in progress finishes and stays local; edits to its own area queue
as pending patches. The presence bar shows "Reconnecting…" (back-off 1 s → 30 s); RESUME replays (§1.5). The host
marks him grey; his parts keep playing from the last state and stand-ins.
Entity-level conflict check (§1.3): the later edit on the same entity is rejected and named in the hint bar; the earlier one wins. With areas, conflicts need two people with rights on the same entity within ~100 ms. Globals (tempo) are host-only by default, so the most disruptive conflicts cannot happen.
The host journals every commit (autosave/session-<id>.journal, appended before the commit is broadcast) next to
the periodic autosave (core/ProjectSafety.h backups). On restart LYNX offers "Resume the online session with Pedro?"
→ autosave + journal replay restore the last committed revision exactly, the room is reopened with the same code
(P3: the host token is kept with the journal), and the guests' RESUME brings them back with their pending patches.
Guests meanwhile show "Host lost — waiting for Ana (your edits are kept)".
Edits are small and always first; a peer whose state backlog exceeds a threshold gets a fresh snapshot instead of a long replay; presence is thinned for him; media obey the priority and the upload cap. A slow peer never slows the host's own editing (the host applies and commits locally first).
Disk full on a guest (downloads pause, message) · a plugin crashes on the owner's side (the last good stand-in stays) · different sample rates (stems carry their rate; the sample loader resamples) · a guest without FL Studio (FL Data samples are downloaded, FL-data-dependent engines become stand-ins) · two hosts' LYNX in test mode on one machine (§10) · clock differences (irrelevant: no shared clock is used).
Effort in LYNX rounds (one agent round ≈ one focused day), including tests, the 15 languages and docs.
| Phase | What the user gets | Main work | Effort |
|---|---|---|---|
| P1 — Send project / my part (no network) | Send project to a friend…: a .lynxpack (zip) with the project, every sample and stand-ins of the third-party plugin parts, plus the list of plugins used — the friend can open and play it even without those plugins. He records his part and uses Send my part back: a small package with only what he created (his channels, notes slices, rows, inserts, takes, his plugin states and stand-ins). Open a friend's part… merges it into the host's project, in his colour. Useful alone, over WhatsApp / Drive. |
uids + normalize + saved; forEachIndexRef; owners session block; wire/entity diff + merge (the same code P2 uses); stand-in render (per pattern, per insert) via an ExportJob engine; InstrumentKind::standIn; extends ProjectPackage::exportZip |
2–3 |
| P2 — Live session on LAN / direct IP | Start/Join on the same network or by IP (+ UPnP), live edits, areas, permissions, presence, chat, background media, live stand-ins, per-user undo, reconnect, host journal | SessionReplica, SessionHistory, applyRemote, host ordering & checks, media store & chunk transfer, TcpLink + Noise/CPace (Monocypher), plugin query, UI (menu, dialogs, presence bar, badges) |
5–6 |
| P3 — Invite code over the internet | The LYNX-7F3K-Q9WM flow from anywhere, no router setup for most connections |
libjuice + KCP IceLink, rendezvous PHP on lynx-share.com (deploy only when the user OKs), link page, lynx:// handler, PRIVACY.md / Store changes, FLAC transfer |
3 |
| P4 — Optional extras | Relay for the connections that fail; voice chat; host hand-over; mixed-version sessions | TURN (RelayLink, libjuice already speaks TURN), Opus voice (BSD-3), hand-over protocol |
3+, and the relay may cost money (§9.1) |
User-facing steps: USER_GUIDE.md. Where it differs from the plan above:
.lynxpack also opens with File › Open...; a part opened that way is merged). Each guest's colour is picked
automatically (blue, green, amber, purple) instead of a colour field.core/SessionIds (uids, normalize, the index-reference visitors), core/SessionParts (invite,
guestCopy, extract, merge, keepOnlyPart), core/StandIns (what is rendered, how it is cut, the projection
the engine plays), engine/SessionPack (render through ExportJob, package write / open / verify, plugin identity
matching, media adoption), ui/SessionDialogs. The package is its own format (not ProjectPackage::exportZip):
manifest.json + project.lynx + media/<sha256>.<ext>.InstrumentKind::standIn: stand-ins are data on the channel / insert (ChannelDef::standIns,
MixerTrack::standIns). Where the plugin is missing, the audio engine plays a projection of the song (never saved
or shown): the channel becomes hidden audio-clip channels at its pattern clips (Song mode) or its loop stem (Pattern
mode); an insert's timeline stem replaces its chain and inputs (Song mode). The original plugin and its state stay in
the project untouched.parts::merge (by uid, the guest's area only, moved inserts / rows when the host used them meanwhile),
one AudioEngine::editSong = one undo step. The P2 wire diff is not written yet; P2 can reuse merge for late joins.tests/Session168aTests.inc (uids, reference visitors, invite ranges, part round trip without clobbering,
stand-ins play like the part within 1e-4 in Song and Pattern mode, insert stand-ins, streaming SHA-256) and
--selftest online_session= (pack with a real ExportJob render, hash dedupe, open on another folder, uid
persistence through save / load, part back, adopt media, merge).engine/LiveLink: WinHTTP / libcurl),
one room of ≤ 4 peers created by the host with a token derived from the code (SHARE_API.md §3.1). Encryption: §6.4
as built.engine/LiveSessions): relay payload [1][sealed] or [2][u32 id][u16 i][u16 n][part] (frames over
512 KiB are split; ≤ 64 MiB per message). Sealed plain text: J JSON, Z gzip JSON (above 4 KiB), M a media
chunk [sha256 hex 64][u32 index][u32 count][u64 size][≤ 256 KiB]. JSON messages: hello {name, version,
protocol} · deny {reason: version|full|declined} · snapshot {rev, tag, keepFull, editEverything, song,
manifest} · propose {seq, base, patch} · commit {rev, origin, seq, patch, rejected, reason} · people {list}
· presence {playing, recording, pos} · want {sha} · resync · bye · end {keepFull}. A patch is {set:
[keys], del: [keys], song: <the carrier as .lynx JSON>}.core/LiveSession): host-authoritative entity replication exactly as §1.2–§1.4: entities by uid
(globals, session, links, order, arrangement, channel, pattern header, notes slice, automation, clip, insert,
row); patches carry the changed entities plus id-only stubs; the host's Authority checks permissions (§2.2) and
conflicts (the earlier edit wins, ripples allowed) and commits in the form every peer receives (the codec = the
JSON round trip); every peer's Replica rebases its unconfirmed edits on each commit and adopts the host's rounding.
Commits wait while the computer records (applied at the stop). A missing revision asks for a fresh snapshot.lynx-media:<sha256>/<name> tokens and the
plugin identities (P1's manifest code: resolvePlugins maps them to this computer's plugins).<session media folder>/<sha>.<ext>, then P1's
sessionpack::confine (anything else outside that folder / FL's factory data becomes a missing file), then a sha
this computer already has becomes its own file; the rest is asked for (want). Only a file this computer turned
into that hash itself is ever sent; pieces arrive in order into a .part file that must hash to the sha before it
is used; the host forwards a guest's file to the others as soon as it has it. Media wait while > 1 MiB of other
frames is queued. Folders: the host's <project>/Session media/Live session (Documents/LYNX/Session media/... when
not saved), a guest's Documents/LYNX/Projects/Received/Live sessions/.
AudioEngine keeps its own steps (before, after) and undoes with
live::selectiveRevert: only what that step changed and nobody changed since; the hint bar names what was left.bye) and keeps only their part (parts::keepOnlyPart) unless the
host allowed a full copy; the host's End sends end, closes the room (DELETE); a host that drops is seen by the
relay's leave and handled like an end. A guest that drops disappears from everyone's list; their area stays.hello.protocol must equal live::protocolVersion, else deny version (decision 2).tests/Live169bTests.inc (diff/apply by uid, permissions and ripples, conflicts, 24 seeded delayed
networks of 1–3 guests converge, codec rounding adopted, commits held while recording, undo per user, invite code
and frames); --selftest live_session= (every entity of the selftest's rich project through the .lynx JSON:
what the format does not keep, stable on a second pass, 3 peers through the real codec converge, keys);
LYNX --livetest report.txt [--relay URL]: host + 3 guests in one process over the real relay (wrong code refused,
media both ways and forwarded, everyone's edits, a refused edit undone, undo per user, a late guest, a guest
leaving, the host ending).Protocol 2 (live::protocolVersion; the same-version rule makes old and new never meet). Code: core/LiveSession
(replay log, Replica::resend / resume, Permissions::settings, chat text, follow, unplayable / toRender),
core/LiveCrypto (the host's Ed25519 identity), engine/LiveSessions (the wire, the journal, the workers),
engine/MediaPack (FLAC packs), ui/LiveChat (chat window, People and permissions), ui/LiveSessionUi (menu,
presence, the resume question).
[LIVE], [Reconnecting...], [Waiting
for the host...]). Coming back:
back; every waiting guest proves who the host is before talking to it:
seek {nonce} → host {nonce, sig} (Ed25519 over room|nonce; the public key came in the snapshot as
hostKey, the seed stays in the host's journal) — anyone with the invite code has the session key, so the key
alone cannot tell the host from a guest pretending;resume {tag, token, rev, epoch} (the token is the guest's own, from its snapshot): the host keeps the last
4096 commits (Authority::since) and replays the missing ones followed by resumed {rev}; the guest's
Replica::resend() then proposes again whatever it sent that was never confirmed, with the oldest base it
had, so the host's conflict check judges it as it would have the first time. When the commits are gone (or the
host restarted) the answer is a snapshot with resumed: true: Replica::resume() puts the guest's unconfirmed
edits on top of it — and, when the host is behind the guest (it lost commits in a crash), also the changes of
the guest's own area the host no longer has.epoch (in the snapshot and in
resume), Authority::since (rev, epoch) replays only within the guest's own epoch (a guest of an earlier run gets a
resume snapshot), and lostCommitsOf (epoch, rev) (another epoch, past the revision the journal restarted
from) tells the host that a guest saw commits it no longer has (the snapshot then says lost: true, and the guest's own-area changes are kept on top).
Found by the seeded drop/restart test (only 16 of 24 sessions converged before epochs; 24 of 24 with them).--livetest on the real relay).<profile>/Live session/journal.json (the
room, the code's secret, the host token and seed, the confirmed song at its revision, who changed each entity
last, every guest's tag / name / token / permissions / what they keep). An End deletes it; a crash leaves it. At
the next start LYNX SHARE asks "LYNX SHARE closed during your live session … Resume it?" (Resume / End it:
the room is closed and the journal deleted); a journal older than 12 h (the relay has forgotten the room) is
dropped. Resuming opens the journal's song (its project file stays the current file), reconnects and goes on
counting revisions; the waiting guests come back through seek / resume (snapshot path, their pending edits
kept). Command line: --live-resume.Permissions::settings: the globals and the arrangements' markers) / Everything / Listen only, and what they
keep at the end (per person now, decision 1). perms {...} tells the guest, whose hint bar says what changed.chat {text} to the host, which
stamps name / colour / time and sends chat to everyone (one order everywhere); 600 bytes a line, control
characters out; the last 300 lines kept, a late guest gets the last 60 in its snapshot. A line arriving while the
window is closed shows in the hint bar.transport {playing, song, pos,
bpm} when it starts / stops, when its playhead jumps (more than half a beat off where it should be) and every 2 s
while playing; a guest that follows plays, stops and jumps with it (live::follow: one beat of tolerance, the
host's playhead extrapolated at its tempo, Song / Pattern mode too), never while it records.live::unplayable: a third-party plugin missing here) — need {keys}; the host sends everyone the union
(needs). The owner of such a part, when all its plugins are here (live::toRender), renders it with P1's code
(sessionpack::render, 32-bit float WAV at 44.1 kHz, pattern stems or a timeline stem) on a background thread,
2 s after the last change and never while playing or recording, and puts the stems on the channel / insert as an
ordinary edit: they travel like any medium, and the computers that need them play them (P1's projection). A
change of the part (P1's source hash per pattern) renders it again. Computers that have the plugin do not fetch
those stems (the host notes who has them and fetches one only when a guest asks).'F' frames): its bytes before and after the samples verbatim
plus the samples as FLAC; the receiver writes back exactly the sender's bytes (the SHA-256 is checked as before).
The sender builds the pack once, checks that it unpacks to the same bytes, and sends the file as it is when FLAC
would not save 10 % (noise, 32-bit float stand-ins, MP3).tests/Live169jTests.inc (replay log and its limit; resume by replay keeps the pending edits; a resumed
edit is judged on its old base; resume by snapshot and a host that restarted behind its guests; 24 seeded sessions
over links that drop with host restarts converge and keep every offline edit; permissions changed mid-session; the
host's signature; chat text; following the transport; who renders stand-ins). --selftest live_session= adds the
FLAC packs (16 / 24-bit byte for byte, float and tiny ones raw, a damaged pack refused). LYNX --livetest report.txt
[--relay URL] [--plugin file.vst3] adds: hashing off the thread, FLAC packs, chat, following, permissions, a
guest's drop, the host's drop, live stand-ins (with --plugin), the host's crash and restart from its journal.Protocol 3 on its branch, 4 once merged with round 190ai's remote plugins (each round had made its own 3;
live::protocolVersion; a resume from another protocol is answered deny version). Code:
core/LiveSession (Replica::restored, MediaBudget, mediaSize), engine/LiveSessions (guest journal, limits,
participant records), engine/LiveLink (livelink::http), ui/LiveSessionUi (the two new dialogs),
engine/LiveTest (--livetest, --livepeer), server/app/lynx_relay.py (relay limits).
LYNX --livetest on the public relay from Windows passed on origin/main before this round
(every step). On Linux nothing worked as a host, for three reasons, all fixed here:
juce::URL
(JUCE_USE_CURL=0) and the room is opened with an HTTPS POST. livelink::http now does the relay's few HTTP
calls through the system's libcurl, loaded at run time like the WebSocket's;welcome, when the relay is near) or inside an already-read TLS record sat in
curl's buffer for ever ("Connecting to the session..." until the timeout). It now asks every 10 ms;closed event was still queued. Connection::open
drops what the previous connection left.
Two computers on two networks: LYNX --livepeer host|guest|rejoin <folder> [--relay URL] [--code CODE|@file]
runs one side of a scripted session (join, files both ways, the guest closes with an unconfirmed edit, restarts,
goes back in, both sides compare digests) and writes a report. Run both ways between this Windows PC and a Linux
server in another network: all steps pass.<profile>/Live session/guest.json (2 s at most
after a change, and once more when LYNX SHARE closes while in a session): the relay, room and code secret, its tag
and resume token, the host's public key, its permissions, the position (rev, epoch, its own next proposal
number), the song as it has it, and — when it has unconfirmed edits — the confirmed base they were made on. Closing
the window is not leaving: the host sees the guest go away (its place, area, colour and permissions stay),
exactly as when its line drops. Leave the live session (and the host's End) delete the journal. At the next
start LYNX SHARE asks "LYNX SHARE closed while you were in {host}'s live session ({when}). Go back in? You come
back as yourself, with your part and everything you had changed." — Go back in / Leave the session (the
latter tells the host with a sealed bye {tag, token}, which frees the place). A host journal wins when both
exist; a journal older than 12 h is dropped; a journal that is damaged or of another kind is ignored, never a
crash (a host that was updated meanwhile answers the rejoin with deny version). Command line: --live-rejoin.
seek / host (the host must still sign with the key from the journal), then the same
resume {tag, token, rev, epoch} a reconnect sends. Replay path: Replica::restored (seq) makes everything that
differs from the journal's base a pending edit on that base (so the host judges it as it would have before
the restart) and proposals continue after the journal's sequence number (the host ignores numbers it already
saw). Snapshot path (commits gone, or the host restarted too): Replica::resume() as in 169j.parts::invite (…, maxRecords)): an away
guest no longer blocks a knock; when the room is full of records, the guest away the longest loses its place
("{0} was away: their place in the session went to {1}"; its part stays in the project).live::MediaBudget, kept by the host and stored in its journal: 1 GB of
media per guest and 8 GB per session (received + sent, counted as the bytes that travel, so a FLAC pack
counts packed). Options: guestMediaLimit, sessionMediaLimit.
refuse): the guest's hint says
the file stays on its computer, and the host gets one question — "{name} has sent {used} of audio files into
this session; the limit for one guest is {limit}. … Raise the limit for {name}?" (Raise the limit: that guest's
limit doubles, more when the waiting files need it, never past the session's; the waiting files are fetched; Keep the limit: asked again at most every 10 minutes).limit), not left waiting; pieces of the
stopped upload that were still on their way are ignored when the host asks for the file again.limit), edits, chat and
transport go on, and the message points to Send project... for a big project.serve), so they count against the session's 8 GB and stop with everything else at
the session limit; a guest sends no audio for a hosted plugin, only notes and parameter values, which are ordinary
proposals (rate-limited by 190ai's valueLimiter, one frame each, far below the relay's 1 MiB per frame) and
count against the relay's bytes per room and per client. A guest that restarts gets the host's shared list again
with its resume, and sets its session tag before its song is opened, so a plugin the host plays is not loaded on
the guest's computer after a restart either.server/app/lynx_relay.py, all by
environment (server/env.example): 12 GiB relayed per room in all, 32 GiB per client address per 24 h, 8 open
rooms per client address (besides 10 new rooms per hour and 200 rooms in all), a room lives 72 h at most and is
closed after 12 h connected without a frame, 1 MiB per frame, 4 KiB per control message, 4 MiB/s per peer. A room
that hits a limit is closed with WebSocket code 4001; the app says "The LYNX SHARE relay closed this live
session: it reached the relay's traffic limit or stayed open too long." and does not reconnect. /health shows
the limits and how often one was hit (no addresses). The relay keeps nothing on disk, so there is nothing to fill.tests/Live190ahTests.inc — live190ah_guest_restart_comes_back_as_itself,
live190ah_guest_restart_judged_on_the_journal_base, live190ah_guest_restart_while_the_host_restarted_too,
live190ah_replicas_converge_with_guest_restarts (24 seeded sessions over links that drop, with guest and
host restarts from their journals), live190ah_media_budget,
live190ah_more_participant_records_than_people_online. --livetest adds: both sides' digests equal, the guest
limit asked and raised, a guest's crash and rejoin as itself, its close and rejoin, Leave the session at the
question, the journal gone after the end, a session at its session limit. Relay: server/tests/test_security.py
(RelayLimitTests), server/tests/smoke.py (limits in /health, an over-long control message, a frame above
1 MiB).Today the host is four things at once: the Authority (order, revisions, epoch), the Ed25519 identity guests check
on every reconnect, the relay room's host token, and the only complete project + media store. Hand-over moves all
four, and guests must be able to tell a legitimate new host from anyone who merely has the invite code.
handover {to} → the chosen guest fetches every medium it still lacks (guests skip stand-ins they do not
need) and answers ready {key} with a fresh Ed25519 public key.crown {rev, digest, people[], chat, hostToken, term, cert}: the participant table with tokens, permissions
and what each keeps, the relay's host token, a term number (starts at 1, +1 per hand-over) and
cert = sign_old (room | term | newKey).digest against its confirmed base, builds an Authority at rev with a new epoch,
writes a host journal (its guest journal is deleted) and broadcasts host {term, key, cert}. Guests verify
the certificate with the key they hold, store the new key and term in their journals, and resume: there is no
replay log on the new host, so this is the snapshot path that already exists (pending edits kept).Replica, gets a guest record (its former area stays its own: areas are by
tag, and "who is host" becomes a field of the session instead of the constant session::hostTag) and writes a guest journal.heir {tag, term+1, cert}
whenever people change; the heir takes over from its own confirmed base (others may be ahead: the epoch / lost
rule of 169j already keeps their own-area changes). A host that comes back from its journal with a lower term
must not act as host: it sees host {term…} after connecting and offers to rejoin as a guest.term, heir certificate and "who is host" in both journals; conversion host ↔ guest journal;
old journals (no term) read as term 1.| What | Effort | Note |
|---|---|---|
| Direct links: ICE (libjuice) + KCP, relay as fallback (P3) | 3 rounds | Proposed for 0.1.27. Vendoring + zig/MinGW, Linux, macOS builds (1); IceLink with the relay room as signalling, no PHP mailbox needed (1); switching relay ↔ direct mid-session, privacy texts (peers then see each other's IP), tests (1). Gains latency and relay traffic; nothing breaks without it. |
| Host hand-over | 2 + 1–2 rounds | Design above. |
| PAKE / Noise instead of key-from-code (§6.4) | 1–2 rounds | Today anyone with the code can read the session; the host's signature only protects who is host. |
| Stand-ins of plugins whose state lives outside the song | 1 round | They follow the song's captured state. |
| Limits in the UI | 0.5 round | The two limits are options in code; no setting yet (the host can only raise per guest when asked). |
| A song that points at an insert past the mixer's end | 0.5 round | The app never makes one (Song::claimFreeInsert grows the mixer), but a patch that did would leave the host with fewer mixer tracks than a guest who joins later (the project loader grows the mixer, the patch path does not). Found by --livetest when two guests were let in in the other order. The host should normalise a proposal the way the loader does. |
| A guest journal on a second computer | — | By design the journal is per profile: going back in works on the computer that was in the session. |
Review: /mnt/e/lynx-work/online_host_190oh/ONLINE.md (round folder). Built:
curl_ws_send may take only part of a frame (CURLE_OK, fewer bytes) when the socket's
buffer is full; the loop stopped there and left the frame half sent, the next message failed (curl error 43), the
link closed and a guest's upload began again from its first piece, for ever. Seen on every Linux run from a home
connection to relay.lynx-share.com (27 reconnects in one --livetest); never from the VPS next to the relay. The
loop now goes on with the rest of the frame.server/deploy.sh).want {sha, from, packed} asks for the rest when the .part holds whole pieces;
the sender goes on from that piece when it still sends the same thing (its FLAC pack or the file), else from the
start, and the receiver then starts again too. An older LYNX SHARE ignores from and sends from the start, which the
receiver takes as a restart (no protocol change).Opener per session (not per connection), with a 64-frame anti-replay window per
sender (frames a little out of order are taken once): a frame recorded before a drop cannot be played back after it.Still open (ranked in ONLINE.md): the host cannot remove a guest (relay kick + knock rate limit; owner decision on a new
code), plugin-window knob changes reach the session only with the next structural edit, control frames before media in
the queue (now possible on the receiving side thanks to the window; the sending side needs one release with every
receiver on 0.1.31 or a protocol bump), test hooks (conflict end to end, --crash-after, edit latency).
Study: REMOTE_PLUGINS.md on wip/remoteplug173c (round 173c). The user's decisions (2026-11-05): start with A1; stay
on the free relay; sharing is opt-in per plugin by the host, with a licence notice, only during the session; the
state / presets of a shared plugin stay on the host; a guest sends notes and parameter values, never anything that
reaches the host's files; "listen only" guests cannot use shared plugins. Protocol 3 on its branch, 4 merged with round 190ah (live::protocolVersion). User-facing
steps: USER_GUIDE.md.
It is not real-time playing. The guest edits; the host's computer renders the part with its plugin (the live stand-in machinery of round 169j: 2 s after the last change, in the background, never while the host plays or records); the stems travel as media and the guest hears them. Playing the host's plugin live is A2 / after direct links.
core/Song.h, PluginRef): playedBy — the participant whose computer plays the plugin (0: everyone
their own copy) — and values, (parameter index, value 0..1) pairs sorted by index. A hosted reference has the
host's plugin id (so it resolves on the host without any matching), no state, and its sound is the plugin's
default state plus values. Both are saved with the song ("playedBy", "values": [i, v, i, v…]) so the journal
and the wire carry them; both are cleared when the session ends.core/RemotePlugins (the pure rules: Shared / Param, clean, setValue / cleanValues,
sanitize, valueEdits, Limiter, Outbox, toRender, uses, endSession), engine/LiveRemotePlugins.cpp
(the manager's part: sharing, the two messages, the host's running instances, the states the editor shows),
engine/PluginHost (describeForSharing, applyValues / readValues, setSessionTag / playedElsewhere),
ui/LiveRemoteUi (the host's list, the guest's menus and parameter editor).shared {plugins} goes to
every guest who may edit ("listen only" guests get an empty list). At most 32 plugins at once. The list shows who
uses each one ("Used by Rui: Glass Keys"). It is not written to the journal: a host that restarts shares nothing
until it ticks again — sharing really ends with the session.remoteplug::makeRef), so the session's permissions apply unchanged (§2.2: own area only, unless
the host allowed more; a listener's edits are refused). No new guest → host message exists.PluginHost::isInstalled is false for a reference
played by someone else — also when the same plugin is installed there, playedElsewhere — so it is never loaded on a
guest), so it is in its need list as for any missing plugin. Round 169j's rule is "the owner of a part renders
it"; remoteplug::toRender adds: the participant a part's plugin is played by renders it for its owner, while
that plugin is shared and every plugin of the part is installed there. The renderer is a property of the part,
not of "the host" (hand-over, later, needs no change here). The host itself plays the part live with its own
instance, like any channel.values on its own channel entity through remoteplug::Outbox — slider moves
are collected and written at most every 200 ms, never as undo steps; a write the session undid is written again (up
to 5 times): the host's stems land on the same channel entity, so a value in flight at that moment is refused as a
conflict (§1.3) — found by remote190ai_a_tweak_survives_the_stems_landing. The host puts the values on its
running instance (hostedTick, 4 times a second, only what changed) and every new instance gets them after its
state (PluginHost::instantiate), so the render engines get them too; the source hash covers them (they are in the
channel's JSON), so a changed value renders again like a changed note.captureHostedValues: every automatable parameter that differs from a fresh instance's; a value within 0.002 of
the song's keeps the song's) and reaches the guests as values — the guest's sliders move. AudioEngine::
capturePluginStates skips hosted references: no state is ever put in the song for them during a session.remoteplug::sanitize in onPropose): playedBy can only be the host, the state
and any .flp record are dropped, values are clamped to 0..1, one per index, at most 1024. Parameter edits are
rate-limited per guest (remoteplug::Limiter: 40 value changes a second, 120 at once): a proposal over the limit is
refused whole (reason: rate, "Too many parameter changes at once") and undone on the guest. Values of a plugin
that is not shared are not applied.hostedState: Add notes to hear it /
Updating... / Up to date); the host also says which parts it is rendering for their owners (rbusy {keys}), which
covers timeline stems (inserts, parts with song-level automation), whose hash depends on each computer's own
sample paths. {host} is away: the last render plays while the host's connection is down; No longer shared: the
last render plays after the host un-ticks the plugin (sliders off; nothing new is rendered; ticking it again
renders the part as it is now).endHosted): a guest keeps what the keep policy says — their own part, or a full copy — with the
audio stand-ins only: playedBy and values are cleared, there never was a state. On the host the marker is
cleared, the plugins' real states are captured into the song (the project is complete and sounds as it did), then
the values are cleared.tests/Remote190aiTests.inc (bounds of values and of what arrives; a guest uses the host's plugin and
the host renders it, channel and insert; the state never crosses and only the host plays; the session's
permissions; the rate limit; a tweak survives the stems landing; the end leaves the stems only). --selftest
live_session= adds "hosted plugin ok" (the two fields through the wire form). LYNX --livetest report.txt --plugin
file.vst3 adds, over the real relay: nothing shared before the host shares; a guest cannot share; the parameter
list reaches the guests; the host renders the guest's part and the guest's editor goes "updating" → "up to date";
the render is the plugin's sound; no state on any computer; a parameter change renders again and is on the host's
running plugin; the host's own change comes back as values; a state sent by a guest is dropped; 400 changes at once
are refused; "listen only" gets no list; un-sharing leaves the last stems; sharing again renders; what both sides
keep at the end. LYNX --remoteshot prefix writes pictures of the two panels with sample data.tests/): uid normalisation (duplicates, imports, every create path through a random
edit fuzzer); forEachIndexRef coverage; entity diff ⇄ merge round trip (apply(diff(a, b), a) == b on the demo
songs and fuzzed songs); permission checks incl. ripples; conflict rejection; selective undo; Noise/CPace against the
spec vectors; chunk manifest / resume; source-hash stability.LossyLink decorator
(delay 0–300 ms, jitter, 5 % loss, reordering, disconnects), random edit scripts on all sides: at the end every
replica's wire JSON equals the host's, and no accepted edit is lost.LYNX_PROFILE_DIR + LYNX_TEST_MODE=1 per instance, loopback TCP,
a --session-script command line (host and join, scripted edits, a scripted take from a WAV input, end, compare
the host's saved project with the expected one) — the same style as --selftest. P3 adds the rendezvous against a
local php -S server, never the live site.docs/MANUAL_TESTING.md.The open questions of §10 are answered; where this section and the text above differ, this section wins.
to.keepFull) and the guest's LYNX SHARE honours it after Send my part back (it keeps only his part
unless the host allowed a full copy). LYNX SHARE is open source, so this is a courtesy the program keeps, not DRM;
the Send dialog says so.lynxVersion in the manifest) and open in any later version.session::maxParticipants = 4
(core/SessionIds.h); raising it later must not need more than changing that constant.LYNX_PROFILE_DIRs (host and guest).