Skip to content

Repository files navigation

Web Show Control (WSC)

A compact, binary, transport-agnostic protocol for real-time control of performance and show systems.

WSC provides a single wire format that carries DMX channel data, linear timecode, discrete cue commands, typed parameter writes, and opaque binary tunnels — all forwardable to industry downstream protocols (Art-Net, sACN, OSC, MIDI, Modbus, and others) by a gateway node.


Repository Structure

wsc/
├── README.md ← you are here
│
├── core/ ← normative protocol specification
│ ├── README.md
│ └── spec/
│ ├── 01-architecture.md
│ ├── 02-packet-format.md
│ ├── 03-address-system.md
│ ├── 04-message-types.md
│ ├── 05-transport-descriptor.md
│ ├── 06-session.md
│ ├── 07-error-handling.md
│ ├── 08-versioning.md
│ └── CHANGELOG.md
│
├── bindings/ ← language bindings (wire format only, no I/O)
│ ├── README.md
│ └── js/
│ └── sdk/ ← @asls/wsc-sdk
│
└── implementations/ ← runnable clients and gateways
├── README.md
└── js/
├── README.md
├── client/ ← browser / Node.js WebRTC client
└── server/ ← Node.js gateway

Protocol at a Glance

PropertyValue
Protocol version1.1.0
Header size19 bytes (fixed)
Byte orderBig-endian
Primary transportWebRTC DataChannel (reference implementation)
Max payload65 535 bytes

Message types

TypeCodeDescription
STREAM_CHANNELS0x1000Bulk channel values — DMX universes, kinetics, indexed arrays
STREAM_TIMECODE0x1003Linear timecode — SMPTE / MTC
CONTROL_CUE0x2000Lifecycle action (GO, STOP, PAUSE…) on an addressed target
CONTROL_PARAM0x2001Typed named-parameter write
TUNNEL_RAW0xE000Opaque binary passthrough to a downstream system
STATE_QUERY0xF000Request state from the remote peer
STATE_ANSWER0xF001Response to a query
STATE_ERROR0xF004Protocol or routing error

Downstream protocols (selection)

Art-Net · sACN · DMX512 · RDM · KiNET · MIDI · MIDI 2.0 · MIDI Show Control · MIDI Timecode · OSC · NDI · VISCA · Modbus · CANopen · EtherCAT · PROFINET · GPI/GPO · Tally · HTTP · WebSocket · MQTT · RAW


Documentation

Protocol Specification

The normative specification is in core/. Start here to understand the wire format, addressing scheme, and session model before writing a binding or implementation.

DocumentSummary
01 — ArchitectureComponents, data flow, deployment topology
02 — Packet FormatWire layout, header, flags
03 — Address SystemHierarchical token addressing
04 — Message TypesAll 8 types with payload schemas
05 — Transport DescriptorDownstream routing, compatibility matrices
06 — SessionConnection lifecycle, keepalive, sequencing
07 — Error HandlingError codes, receiver obligations
08 — VersioningSemver rules, reserved ranges
CHANGELOGProtocol version history

Bindings

Bindings implement the WSC wire format in a specific language with no I/O.

LanguagePathStatus
JavaScript / TypeScriptbindings/js/Stable

Bindings overview and contribution guide

Implementations

Implementations provide runnable clients and gateways built on top of a binding.

LanguagePathStatus
JavaScriptimplementations/js/Stable

Implementations overview and contribution guide


Getting Started

To run a gateway and connect a client — go to the JavaScript implementation:

To use WSC in your own project — install the binding and follow the quick-start:

To port WSC to a new language — read the spec, then the bindings contribution guide:

To understand the wire format — start with:


Design Principles

Transport-agnostic. The wire format does not mandate a transport. The reference implementation uses WebRTC DataChannel; others may use TCP, WebSocket, or serial.

Stateless gateway routing. Every forwarded packet carries a complete Transport Descriptor. The gateway holds no per-client routing state.

Compact by design. The 19-byte fixed header and token-based address encoding keep packets small enough for 44 Hz+ DMX streaming without fragmentation.

Separation of concerns. Bindings (wire format) and implementations (transport + session) are separate packages. Porting to a new language requires only implementing the binding.

Unified control path. Cue actions and parameter writes share the Control range (0x2000 – 0x2FFF) and route through the same gateway module, simplifying dispatcher logic.


License

See COPYING.

About

A compact, web-based, binary, transport-agnostic protocol for real-time control of performance and show systems.

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages