generated from coulomb/repo-seed
Code as live time-based audio performance; the far live end of the live<->snapshot axis (no faithful static form; static = source + marked recording). The honesty test for graceful degradation. Enrichment-only (UC-54/55). Marks T5 done — all 8 batch tasks complete. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
119 lines
6.8 KiB
Markdown
119 lines
6.8 KiB
Markdown
# Strudel.cc — live-coding REPL — deep dive (findings)
|
|
|
|
**Date:** 2026-06-14 · **Source:** SHARD-WP-0004 T5 · **Subject:** Strudel.cc (the
|
|
JavaScript port of TidalCycles) — a browser **live-coding REPL** where code is a **running
|
|
musical performance**.
|
|
|
|
## Why this dive
|
|
|
|
The closing, lowest-priority dive — and the **extreme** of the live↔snapshot axis. Where
|
|
Processing (T4) renders *visual* output at view time, Strudel renders **time-based audio**
|
|
that only exists *while running and evolving*. It is the limit case for "can a page be a live
|
|
computation?" — the answer where **static projection is least faithful**. Enrichment-only;
|
|
feeds UC-54/55 and hardens the snapshot-degradation rule.
|
|
|
|
## 1. Code as a live, evaluated performance
|
|
|
|
- **Strudel** ports **TidalCycles**' pattern language to JavaScript, running entirely in the
|
|
**browser** (Web Audio). You write **pattern expressions** (e.g. `note("c e g")`,
|
|
`sound("bd sd")` with transformations) and **evaluate them live**; the sound updates
|
|
**without stopping** — the essence of *live coding*.
|
|
- The artifact is **terse source text** (a pattern); the "content" is the **sound it
|
|
produces over time**. There is **no document, no output cell, no file of results** —
|
|
output is **ephemeral, temporal, and performative**.
|
|
- A Strudel "page" (a shared REPL link / snippet) is **source + the implicit promise of a
|
|
running evaluation**. The source is tiny and diffable; the experience is not capturable as
|
|
text.
|
|
|
|
## 2. The limit of static projection
|
|
|
|
Strudel pushes past Processing on every "live" dimension:
|
|
|
|
- **Temporal & generative** — output unfolds over time and may be **non-deterministic**
|
|
(randomness, evolving state). There is no single "frame"; the faithful capture is a
|
|
**recording (audio), itself just one performance**, not the artifact.
|
|
- **Performative** — the value is partly the **act of live editing**; even a recording loses
|
|
the live-coding dimension.
|
|
- So on the **live↔snapshot axis** (named at T6), Strudel sits at the **far live end**: the
|
|
best static projection is **(a) the source** (canonical, diffable) **+ (b) an optional
|
|
audio recording snapshot**, explicitly marked as one rendering of a live/temporal artifact.
|
|
|
|
This makes Strudel the **honesty test** for the contract: shard-wiki must be able to attach
|
|
such a source, present it truthfully (here is the source; a live render needs the runtime; a
|
|
recording is one performance), and **never imply a static page captures it**.
|
|
|
|
## 3. INTENT mapping (enrichment-only — no new UC)
|
|
|
|
### Reinforcements / refinements
|
|
|
|
- **Live-evaluated, time-based content (UC-54/55).** Strudel is the extreme executable-as-
|
|
page: **source canonical, presentation = a temporal live evaluation**. Confirms the page
|
|
model must represent content whose rendered form is **time-based / generative / performative**.
|
|
- **live↔snapshot axis (T6) — far end.** Establishes the **upper bound**: some content is
|
|
**irreducibly live**; static projection degrades to **source + a recording snapshot**, with
|
|
honesty about what's lost. Generalizes Processing's "snapshot frame" to "recording of one
|
|
performance."
|
|
- **Graceful degradation (INTENT).** A backend that can't run the REPL still serves the
|
|
**source** (tiny, diffable) and any **recording** as read/projection/backup — the
|
|
limited-backend-still-usable rule, at the hardest content type.
|
|
- **Union without erasure.** Presenting a Strudel shard must surface "this is a **live
|
|
temporal artifact**; what you see/hear statically is **source / one recording**" — never
|
|
hide the liveness or imply completeness.
|
|
|
|
### Boundaries
|
|
|
|
- shard-wiki is **not an audio/REPL runtime**; default = attach the **source** + offer/store
|
|
a **recording** with provenance; live in-viewer evaluation is a gated capability (trust/
|
|
sandbox, like Processing T4). Source is canonical; everything rendered is a degrading,
|
|
view-time/temporal projection.
|
|
|
|
## 4. UC disposition (enrichment-only)
|
|
|
|
| Mechanism (findings §) | Catalog UC / thread |
|
|
|------------------------|---------------------|
|
|
| Pattern source = live, evaluated, time-based performance (§1) | UC-54 / UC-55 (enriched: time-based/generative executable content) |
|
|
| Output ephemeral/temporal/non-deterministic → no faithful static form (§2) | links live↔snapshot axis (T6), far end |
|
|
| Best static projection = source + audio recording snapshot, marked as one performance (§2) | links UC-83/UC-84 (degrading projection), UC-37 (recording as backup) |
|
|
| Limited backend still serves source + recording (§3) | links UC-37 graceful degradation |
|
|
| Live in-viewer evaluation = capability + trust/sandbox (§3) | links UC-35 |
|
|
|
|
**No new UC** — Strudel is design prior art marking the **far live end** of the projection/
|
|
liveness model; it adds no orchestration scenario, it bounds one.
|
|
|
|
## 5. Architecture notes for SHARD-WP-0002
|
|
|
|
- **T16 (projection):** anchor the **far end of the live↔snapshot axis** — content can be
|
|
**irreducibly live/temporal/generative**; the contract must allow a projection to declare
|
|
"no faithful static form; static = source + a marked recording." Combined with T4's
|
|
**materialization-timing** and **continuity** facets, the projection model now spans:
|
|
ahead-of-time materialized → view-time one-shot → view-time continuous/interactive →
|
|
**temporal/generative/performative (recording-only snapshot)**.
|
|
- **T12/T15 (page model):** **time-based / generative executable content** as a page-model
|
|
edge; source canonical, render temporal.
|
|
- **T11 (capabilities):** "live-evaluate (audio/REPL) in viewer" capability + trust/sandbox;
|
|
default off → source + recording.
|
|
|
|
## 6. Open questions
|
|
|
|
1. Does the contract carry an explicit **"irreducibly live / no faithful static form"** flag
|
|
on a projection (so the union renders the honest fallback automatically)? (The far-end
|
|
resolution of the live↔snapshot axis open question from T6.)
|
|
2. Is a **recording** modeled as a stored **derivation-projection snapshot with provenance**
|
|
(one performance, time T, source rev R), reusing the UC-84 snapshot machinery?
|
|
|
|
## 7. Sources
|
|
|
|
- `strudel.cc` (docs, REPL); **TidalCycles** (`tidalcycles.org`) — the pattern language
|
|
Strudel ports; Web Audio.
|
|
- prior: `research/260614-processing-deep-dive/` (view-time render, continuity, UC-54/55);
|
|
`research/260614-squeak-pharo-deep-dive/` (live↔snapshot axis);
|
|
`research/260614-mathematica-deep-dive/` (`Dynamic` interactive, snapshot-only).
|
|
|
|
## 8. Traceability
|
|
|
|
**No new UC** (enrichment / design prior art; the far live end). Enriched: UC-54, UC-55;
|
|
links UC-83/UC-84 (degrading projection), UC-37 (recording = backup / graceful degradation),
|
|
UC-35 (live-evaluate capability + trust). Architecture cross-refs: SHARD-WP-0002 T16 (far end
|
|
of live↔snapshot axis: irreducibly-live content, static = source + marked recording), T12/T15
|
|
(time-based/generative executable content), T11 (live-evaluate capability + sandbox).
|