A DSL-driven system for saving and loading UI/visibility states, allowing performers to prepare starting configurations and recall them during performance.
state(save:clean_start) // Save current visibility states
state(load:clean_start) // Load and apply to all clients
state(load:clean_start, sync:false) // Load locally only
state(load:clean_start, auto:true) // Auto-load on startup
SVG elements with state cue IDs:
<g id="button(click:1) state(save:rehearsal)">...</g>
<g id="button(click:1) state(load:rehearsal)">...</g>
Per-project state files:
scores/polygonfield/states/clean_start.json
scores/polygonfield/states/rehearsal.json
{
"version": 1,
"name": "clean_start",
"created": "2026-04-02T20:00:00Z",
"states": {
"polygon1": { "visible": false },
"polygon2": { "visible": true },
"mixer_faders": { "visible": false }
}
}
ui_state.json per projectstate(save:name) / state(load:name) DSLstate.js cue handlerGET/POST /api/state/:project/:namestate_load_sync messageCould extend to capture:
public/js/cues/state.js (new) - cue handlerpublic/js/cues/animShared.js - hook visibility changespublic/js/system/socket.js - sync message handlersserver.js - state file endpointspublic/js/parser/parser.js - recognize state() expressions// Save broadcast (informational)
{ type: "state_saved", project: "polygonfield", name: "clean_start" }
// Load sync (all clients apply)
{ type: "state_load", project: "polygonfield", name: "clean_start", states: {...} }
auto:true parameterstate(reset:true) could restore default visibility