Semantic Stage — how it all meshes

This is the semantic bridge the whole avatar estate was building toward: a live system that understands what the conversation means, chooses a visual representation, and expresses it through animated sketch lines, ASCII/glyph fields, dots, color and morphing forms — while the voice only drives energy, never content. Everything below is running now at voice.netshow.ai/alive-site/semantic-stage.html.

Open the Semantic Stage dashboard → Freestyle Stage (the ancestor)

01The three clocks — the law that makes it real-time

0.5–5 Hz

Semantic clock

Decides what the scene means. Phrase and topic events become compact, validated VisualPlanPatch JSON.

  • the live model's emit_scene_patch tool
  • phrase auto-pilot on the transcript
  • your direct commands (“show me…”, “go back”)
  • mock scripts ($0 tour)
10–60 Hz

Audio clock

Decides how strongly it moves. The certified AvatarEngine turns the live stream into envelope + 14 visemes + blink/gaze/brow.

  • mouth rides the raw envelope (beat-critical)
  • everything else is attack/release smoothed
  • word fan-out anchors visual beats
60 fps

Frame clock

Deterministic local rendering only. Seeded boil, minimum-jerk morphs, glyph transport — no LLM, no fetch, no randomness in the loop.

  • Sk+1 = ApplyPatch(Sk, Vk)
  • F(t) = Render(S(t), A(t), Q(t), C)

The one rule that makes it intelligent AND stable: audio may shake the scene, only meaning may change it.

02The live loop — who talks to whom

OpenAI Realtime session
mint via POST /api/web-call/session → WebRTC. LiveAgentSource owns transport (frozen estate).
AvatarEngine (certified)
analysis-only stream tap → tick() → envelope, visemes, blink, gaze. AEC-safe.
Transcript deltas
response.output_audio_transcript.delta → AliveBridge wordSinks (word clock) + captions.
User turns
input_audio_transcription.completed → visual command parser.
Director lanes
model tool call · phrase auto-pilot · user command · mock script. Priority: you > model > auto-pilot.
validatePatch()
untrusted-data boundary: whitelists, clamps, whole-field drop, revision dedup, rate windows. Exactly-once tool replies.
Scene compiler
SubjectResolver → procedural archetypes / curated figures / diagram grammar / honest stylized fallback → placed SceneState.
Morph planner (once per patch)
role+centroid stroke correspondence · orientation pick · glyph transport assignment · seeded stagger.
Hybrid renderer (60fps)
bg → glyph cells → particles → boiling 2-pass ink → labels → state auras → beat impulses → alert.
Dynamics
five energies (activation/motion/glow/detail/focus) from voice state + level; articulation of any face on stage.

Interruption law: one frame — barge-in cancels every unplayed beat, zeroes articulation, keeps the scene. Session loss → the world stays alive and settles calm. The LLM is never in the frame loop.

03What it rides on — nothing was rebuilt that already worked

Existing pieceWhereWhat the stage takes from it
AliveBridgealive-site/alive-bridge.jssession lifecycle, five states, caption stream, wordSinks fan-out, ontool page-tool hook, interrupt law — consumed, never edited
LiveAgentSourceavatar-lab/js/sources.jsmint → mic → WebRTC → data channel → barge → /end beacon (frozen, certified)
AvatarEngineavatar-lab/js/engine.jsthe whole audio-feature bus: envelope, MFCC visemes, blink/gaze/brows — analysis-only tap
Figure registry (12 beings)alive-site/freeform-figures.jsevery curated colored-ASCII archetype parses straight into the glyph layer as a morphable subject, open face zone included
Freestyle-stage lawsalive-site/freestyle-stage.htmlsession.update tool merge, dc tap pattern, exactly-once tool replies, rate windows, caption letterbox, $0 tour pattern
Sketch-line taste ladderHybridFace / sketch-studio2-pass jittered ink, per-stroke boil phases (~90 ms), tapered width, seeded everything — frozen ink reads stiff, so nothing is frozen

04The new engine — nine modules, one contract

semantic/sem-core.js
seeded RNG, value noise, minimum-jerk, attack/release smoothing, path resample/match, spatial-hash assignment, color, glyph ramps
semantic/sem-scene.js
CompiledSubject contract (strokes/cells/particles/labels with semantic roles), colored-art parser, placement + SceneState
semantic/sem-archetypes.js
procedural library: presenter rig, mountain, tree, beach, space, fire, city, circuit, Einstein, diagrams, figures, honest fallback
semantic/sem-morph.js
morph planner + evaluator: stroke correspondence, ink reveal, dissolve, stable-identity glyph transport — planned once, evaluated cheap
semantic/sem-render.js
hybrid canvas painter: boiling 2-pass ink, batched glyph cells, particles, labels, state auras, beat impulses, alert overlay
semantic/sem-stage.js
the runtime: patch → compose → morph lifecycle, five-state dynamics, articulation of any face on stage, beats, scene memory
semantic/sem-patch.js
VisualPlanPatch schema + validator + the emit_scene_patch tool definition
semantic/sem-director.js
director lanes: phrase auto-pilot, user-command parser, model tool handler, live-bridge wiring (ride pattern, zero estate edits)
semantic/sem-mock.js
$0 deterministic mock: the scripted tour with word streams, synthetic envelope, interruption + alert + session-loss drills

suite: test-alive-site/semantic-stage.cjs — 60 checks green (units · scene shots · morph determinism · runtime · tool transport)

05What it can become today

presenter (live face) mountaintreebeach / ocean space / starsfirecitycircuit einstein · stylized ghostdragonwhalewizard robotowlcatclown martianold-ladyold-manscientist flow diagramcomparisontimelinecause & effect

Every figure keeps an open face zone where the live sketch eyes, brows and mouth keep articulating with the voice — the freestyle-stage magic, now morphable. Unknown subjects get an honest stylized treatment, never a fake likeness. Any scene can hold the presenter beside it (hybrid mode).

06The morph mathematics (the signature move)

Matched strokes — resampled to 48 points, orientation chosen by correspondence error, interpolated with minimum jerk:

e(u) = 10u³ − 15u⁴ + 6u⁵   ·   pᵢ(t) = (1−e)·pᵢᴬ + e·pπ(i)

Matching is deterministic: cost = centroid distance + length mismatch + layer distance − role affinity (exact role −0.45, same family −0.22). Unmatched outgoing ink lingers then dissolves; unmatched incoming ink draws itself progressively — background layers first.

Glyph cells travel as stable-identity particles (spatial-hash nearest assignment, capped at 1600 transports), swap characters exactly once mid-flight, lerp color continuously, and stagger on seeded delays — no shimmer, ever. The continuity rule is carried by roles: hair strokes become ridge lines, contours become branches, foam becomes clouds.

07Acceptance scoreboard (the master prompt's ladder)

CriterionStatus
Semantic events change the subject without restarting the pagePROVEN
Avatar → mountain → tree → person → beach → diagram → avatar morph chainPROVEN (mock tour + shots)
Audio changes motion/articulation but never chooses contentPROVEN (suite-pinned)
Word-anchored beats land on their words; interruption cancels future beats, keeps scenePROVEN (suite-pinned)
No per-frame LLM calls; deterministic seeded rendering; shot-mode reproducibilityPROVEN (pixel-identical reloads)
Glyph fields temporally stable; sketch lines boil on purpose, never rerandomizePROVEN
Five states + alert overlay + graceful session lossPROVEN
Arbitrary subjects beyond presets (desert+camel, whale underwater, dreamed forms)PROVEN (V2: composition + draw primitives + needs-draw nudge; suite-pinned)
Expressive emotional face (squint/sass/surprise, gestures, sentiment)PROVEN (V2 expression engine; shots + suite)
Named person → reference-resolved exact likenessSTYLIZED PATH ONLY (honest fallback; reference compiler is the next lane)
SDF silhouette morphs for unrelated closed shapesCOVERED BY stroke+transport in v1; SDF lane documented, not built
Live model firing emit_scene_patch in a paid callTRANSPORT PROVEN WITH FAKE DC — first paid drill awaits Michael's word (spend gate)

08V2 — THE DREAM UNLOCK (2026-07-17, same day)

Michael's verdict on v1: "it's preset, it's in a box… you got to release that capability of dreaming." V2 removes the box with three layers, all live now:

1 · COMPOSEentities:[{kind, at:{x,y,w}, motion}] places up to four beings INSIDE any scene with deterministic motion (walk/swim/fly/drift): a camel crossing the desert, the whale swimming under the water — the exact scenes v1 couldn't make. 18 fleet-authored entities (camel, horse, dog, fish, bird, boat, butterfly, person, house, car, rocket, jellyfish, turtle, crab, snake, flower, cactus, kite) + 5 new environments (desert, underwater, meadow, storm, sunset) + every v1 preset doubles as an entity.

2 · DREAMdraw:[…] primitives let the model AUTHOR anything from its own visual memory: control-point strokes (auto-smoothed), rings, glyph blobs, texture bands, dot fields — validated, capped, compiled into the same living ink as the presets. The mock tour dreams a hot-air balloon live; the model gets the identical path.

3 · THE NUDGE — an unknown kind never dead-ends: the tool replies needs-draw with authoring instructions and opens the dream window; when a visitor asks for an unknown being, the stage whispers a system note telling the model to draw it. The lockout is structurally impossible now.

Plus the emotional face: a six-channel expression engine (joy, sass, squint, surprise, concern, curiosity) with a real blink machine, saccades, speech-accent brow flicks, sentiment hearing, and gestures (wink, tongue, brow-raise, nod) — settable by the model (expression/gesture patch fields), by phrase sentiment, by voice state (thinking squints), and by dashboard chips.

V4 — THE REFERENCE VISUAL CORTEX (the real unlock): "see the image, don't produce the image." For ANY kind with no preset — a lion, Donald Trump, the Eiffel Tower — the stage now resolves ONE small reference image (Wikipedia thumbnails: keyless, CORS-open, encyclopedic), looks at it ONCE on the semantic clock, flood-mattes the background (per-side medians + protected center), and emulates the subject as living glyph cells — honestly labeled with its source. Nothing is rejected anymore: unknown kinds apply instantly as a name-card and morph into the conjured emulation seconds later; the model is told "keep talking, it's forming." The V3 needs-draw rejection (which taught the model to retreat to presets) and the mid-response response.create pileups (the slowness) are both gone; the tool schema and stage briefing are ⅓ their old size. Persona requests conjure the person locally and the model speaks in character.

V3 — THE VISUAL CORTEX SEED (same day, after the Caesar test failed live): the model's NATIVE dream language is glyph art, not coordinates. art on any subject/entity accepts {#RRGGBB}-painted ASCII (the proven become_form format) and compiles into a first-class subject; with faceBox, the LIVE animated face rides the portrait's open zone — so "take me back to Rome, I want to talk to Caesar" = colosseum backdrop + a Caesar portrait the model authors itself + its own living face inside, speaking in character. Persona intents ("talk to / meet / pretend to be X") are detected and nudged as BECOME instructions; place intents ("take me to X") widen the command grammar. The 🏛 chip and the mock tour carry a curated Caesar as the deterministic proof.

09Next lanes (in leverage order)