subsequence.web_ui ================== .. py:module:: subsequence.web_ui .. autoapi-nested-parse:: Browser dashboard for a running composition. Serves a read-only web UI that shows the live state of a composition — tempo, current chord, section, pattern grids, and conductor signals — over a local HTTP + WebSocket pair. Started via ``composition.web_ui()``. Module Contents --------------- .. py:class:: WebUI(composition: Any, http_port: int = 8080, ws_port: int = 8765, ws_host: str = '127.0.0.1', http_host: str = '127.0.0.1') Background Web UI Server. Delivers composition state to connected web clients via WebSockets without blocking the audio loop, and serves the static frontend assets via HTTP. Both servers bind to localhost (127.0.0.1) by default. Pass an explicit ``http_host`` / ``ws_host`` (e.g. "0.0.0.0") to opt into LAN exposure: the dashboard is read-only (inbound WebSocket messages are discarded) but it broadcasts full composition state, so only expose it on a trusted network. Prepare the dashboard servers without starting them; call start() to go live. .. py:method:: start() -> None Launch the dashboard: HTTP server for the frontend, WebSocket server for live state. .. py:method:: stop() -> None Shut down both servers cleanly so ports and threads don't leak.