Skip to main content

Crate weirdnet_songnotes

Crate weirdnet_songnotes 

Source
Expand description

SongNotes collaboration on top of weirdnet_collab: the roles, permissions, links and consent requests of a SongNotes session.

  • roles::roles is the role table: Host, Editor, Engineer, Viewer and Listener, with the gates (the audio owner’s consent for recording and routing, a local switch for talking).

  • perm lists the permission names.

  • link parses and writes weirdnet-songnotes://join/<token> and weirdnet-songnotes://collab/<project>/<panel>.

  • Session is the facade an app uses: start a session, share a link, join, ask “can I?”, turn a “needs consent” answer into a request the audio owner can accept.

  • service is the /songnotes/collab protocol every SongNotes app speaks to a host: join, standing, the project view with people, presence and audit, and “I am in this app”.

  • stage is the stage-app side of a collab-managed session: the strip, gates with locked states and Open in Collab links, and a host-signed certificate to enforce from while the host is not answering. local is the registry of apps on one machine and the local control channel that opens the collab app at a panel.

  • transport is the session clock and transport: the host is the clock master, followers learn their offset and the plan (start, tempo on bar boundaries), and may ask for changes.

  • talk is the talkback policy: voices, host mutes and the stream kind that keeps talkback out of music takes.

Standalone host mode is a Session with one host, the Viewer role as the default and host approval on the link (Session::standalone).

Re-exports§

pub use link::LinkError;
pub use link::Panel;
pub use roles::EDITOR;
pub use roles::ENGINEER;
pub use roles::HOST;
pub use roles::LISTENER;
pub use roles::VIEWER;
pub use roles::roles;
pub use service::Activity;
pub use service::Here;
pub use service::Person;
pub use service::ProjectView;
pub use service::Standing;

Modules§

link
The two SongNotes links: join a session, and open a panel of a project.
live
A live session between stage apps: one host holds the state (a song, a mix: bytes the app defines) and members read it. Members are read-only in the first release, so the host refuses every edit a member proposes. The host keeps a standby handover signed to the next member, who takes over if the host can no longer be reached; a host that leaves on purpose hands over at once. A kicked or banned member’s next request is refused, which ends its session.
local
SongNotes apps on one machine (C5): a registry the apps find each other through, and the local control channel /songnotes/local a stage app uses to get the fresh view and certificate from the collab app, to open it at a panel and to push its status.
perm
The SongNotes permission catalog.
roles
The SongNotes roles and their presets.
service
The SongNotes collab protocol, /songnotes/collab: what any SongNotes app asks the host of a project. The collab app serves it on the host; stage apps (drum machine, monitor, controller) use client to join, read where they stand, report which app the person is in and read who else is here.
stage
The stage-app side of a collab-managed session, shared by the drum machine, the monitor and the controller (C5): a thin presence strip, gates that show a locked state with an Open in Collab link, and enforcement that keeps working while the host or the collab app is closed, from a Cert the host signed.
talk
Talkback policy (C6): who is talking, who the host muted, and where each voice is published.
transport
The session clock and transport (S4): the session host is the clock master, and every other app follows it. Transport and tempo travel on the session’s /songnotes/transport protocol, not through audio routing.

Structs§

ConsentRequest
A question to an audio owner: may this person record or connect to your audio?
Ctx
What a caller asks about besides who and what.
Explained
A decision with its chain.
Keypair
Identity keypair of a node.
Permission
A permission such as project.edit; the app defines the catalog.
ProjectId
A project: the one scope permissions stop at.
RoleId
A role such as host, editor or viewer; the app defines the set.
Session
One session as seen from this node: a project, and the key this node signs with.
UserId
An identity: a Weirdnet peer id, as text. It is the key for contacts, blocks and bans.

Enums§

Approval
How a redeemed invite becomes membership.
Decision
The answer.
Duration
How long a grant lasts.
GrantStreams
Which of the owner’s streams a grant covers.
Joined
What happened to someone who used a link.
SessionError
Why a session call failed.
Step
One step of the reasoning, in the order the rules ran.