DocumentationLeader/member model

Leader/member model

A session has one leading device and up to forty-nine following ones. The leader decides what is played and where everyone is in it.

Session roles

The role is chosen manually at start — there is no automatic election and no vote.
RoleHow it happensWhat it does
LeaderStarts a session on the sync screenAnnounces itself, runs the server, broadcasts commands
MemberJoins a discovered sessionReceives commands and executes them
A session holds up to 50 members. The leader sees the connected list with name, instrument and latency, and can kick anyone out.

Even after members join, the leader stays in the "advertising" state — it keeps listening for more arrivals. Only members show "connected".

What the leader controls

ActionWhat happens on members
Song changeMembers move to the same song
Forced song changeThe same, but also for members who turned following off
Scroll positionScroll positions line up
Start auto-scrollMembers start scrolling from the same position at the same speed
Pause auto-scrollEveryone stops at a shared position
Auto-scroll speed changeThe new speed propagates to everyone
TranspositionMembers get the same semitone shift applied
Section changeA jump to a section is forwarded
Metronome start and stopMembers' metronomes start at the same tempo and on the same beat
Stage cueAn overlay appears on everyone else's screen — "SOLO", "LAST CHORUS", "END"

Members who turn following off stay put and can browse on their own. A forced song change is the leader's tool for pulling them back.

Catching up

When a member receives a position that differs from its own, it does not snap there — the position is closed with a smooth glide over roughly two tenths of a second. On a projector or a tablet it does not read as a jerk.

The band metronome

When the leader starts the metronome, members start at the same tempo and on the same beat.
Nothing periodic is sent. A single message goes out carrying the tempo, the beats per bar and an anchor — the absolute instant beat zero fell. Each device works out where it is from that anchor, using the clock offset measured when it joined.

The practical upshot: anyone joining mid-song receives the same anchor and comes in on the right beat. No waiting for the next bar, no catching up by ear.

Stage cues

During a song the leader can send a short cue that appears on everyone else's screen as an overlay across the lyrics — "SOLO", "LAST CHORUS", "END".

Unlike the other commands it is not scheduled to a shared instant; it is delivered as soon as it arrives. It is an instruction for people, not a synchronised action.

Only the leader can send them.

What does not sync

Two things people often expect that are not in the protocol:
  • PDF page turns. The session carries a scroll position, not a page number. On top of that, a horizontal swipe in stage mode changes the song, not the page.
  • Song MIDI commands. Everyone has their own rig, so MIDI stays on the device.
Personal fields do not sync either — transposition can be broadcast as a command, but the value stored with your song stays yours. Details in Architecture.

Join sequence

A joining member does not receive one big state message, but a series of them:

  1. welcome — identity assignment
  2. sessionInfo — session and member information
  3. Once the new member is announced, the leader sends the current song, any running auto-scroll, the active setlist and an offer of the songs in it

A member can also ask for the full state at any time.

Command timing

Every broadcast command carries:

FieldMeaning
leaderEpochMsThe leader's clock at the moment of sending
executeAtWhen to perform the action — 300 ms later by default
vProtocol version
idUnique message identifier
Devices continuously measure their clock offset with a probe/reply pair, so executeAt means the same instant everywhere. That also evens out devices with different latency.

A member that wants to reach the others does not send directly — it sends to the leader with a "relay" flag. The leader re-stamps the message with its own clock and broadcasts it. That keeps a single timeline.

Requesting content

Beyond control commands, the protocol also carries content itself. The one missing something always initiates:

WhatHow it works
SongA member requests a song by identifier, the leader sends its shared fields
SetlistA member requests the active setlist with its song list
Bulk transferThe leader offers metadata for every song in the setlist, the member asks only for what it lacks and receives them one by one with an index
PDF, MusicXML, imagesTransferred on request, never automatically
If auto-download of missing songs is on in settings (the default), the member asks by itself. Otherwise it offers a button.

Transfer limits

TypeLimit
PDFDownscaled automatically above 3 MB, refused above 10 MB
MusicXML10 MB
Image bundle25 MB

Every binary transfer is checksummed with SHA-256 so a corrupted file is detected.

Sharing between members

When the leader does not have a requested attachment, the session does not stall. Brokered member-to-member sharing kicks in:

  1. The leader asks the others who has the file.
  2. Those who do announce themselves.
  3. The requester picks a source.
  4. The file travels from the chosen member through the leader.
The file's owner gets an approval prompt ("Peter is asking for the sheet music for this song. Share?"). Approval can be turned off in settings; it is on by default.

Pre-gig check

Before you start playing, the leader can ask once and the whole band answers. The result is a list of what is about to go wrong:

FindingWhat it means
Missing songsSomebody lacks a song from the active setlist
Missing attachmentsThey have the song but no sheet music or PDF
Different setlistSomebody has a different setlist active than the leader
No setlistSomebody has none active
Low batteryThe device will not last the gig
High latencyA weak connection
No replyThe device did not answer
It is started from Sync on the leader's side. Replies are collected for 6 seconds; anyone who does not answer is listed as no reply.

Worth running when you arrive at the venue, not five minutes before the first song. Missing attachments can only be filled in while everyone is still on the same network.

Limits of the model

Leadership handover does not exist. The role cannot be passed to another device while a session runs. If the leader's battery dies or they have to leave, the session ends and a new leader has to start it again — everyone else rejoins from scratch.

Other things worth knowing:

  • A session cannot be split or merged; one band = one session = one leader.
  • If the leader disappears, members do not elect a replacement — they switch to reconnecting to the same leader.
  • Members do not talk to each other directly; even attachment sharing goes through the leader.