diff --git a/papers/SCORE.md b/papers/SCORE.md index b694685e9e..f0954ddbaf 100644 --- a/papers/SCORE.md +++ b/papers/SCORE.md @@ -30,6 +30,130 @@ cd papers/joss-kidlisp && pandoc paper.md --citeproc --pdf-engine=xelatex -o pap Published at `papers.aesthetic.computer` and `papers.prompt.ac`. +## Targets + +Upcoming conferences and journals to submit to. + +### Still Open — Deadlines Ahead + +| Venue | Type | Deadline | Funding | Conference Date | Status | +|-------|------|----------|---------|-----------------|--------| +| [ACM C&C 2026](https://cc.acm.org/2026/) | **Demos** | **Apr 16, 2026** | TBD | Jul 13–16, London | **GO** | +| [ICCC 2026](https://computationalcreativity.net/iccc26/) | Short Papers | **Apr 24, 2026** | TBD (email organizers) | Jun 29–Jul 3, Coimbra, Portugal | **GO** | +| [IEEE ICIR 2026](https://icir.ieee.org/) | Late-Breaking / Demos | TBD (check site) | Check w/ organizers | Jun 25–26, Pisa, Italy | **Plan** | +| [Prix Ars Electronica 2026](https://ars.electronica.art/prix/en/) | Interactive Art + | **Mar 9, 2026** 2PM CET | €10,000 prize; free entry | Sep 9–13, Linz, Austria | **GO — 5 days** | +| [S+T+ARTS Prize 2026](https://ars.electronica.art/starts-prize/en/) | Science/Tech/Arts | **Mar 9, 2026** 2PM CET | €40,000 total prize | Sep 9–13, Linz | **GO — 5 days** | + +### Deadlines Passed (Track for Next Year) + +| Venue | Type | Deadline | Funding | Conference Date | Status | +|-------|------|----------|---------|-----------------|--------| +| [NIME 2026](https://nime2026.org/) | Papers, Music, Workshops | ~~Feb 12~~ / ~~Mar 5~~ passed | Hybrid option (present remotely) | Jun 23–26, London | Missed | +| [xCoAx 2026](https://xcoax.org/) | Papers, Artworks, Performances | ~~Feb 15~~ passed | None announced (€350 reg) | Jul 8–10, Torino | Missed | +| [ACM CHI 2026](https://chi2026.acm.org/) | Posters / Demos | ~~Jan 22~~ passed | [Gary Marsden Travel Awards](https://sigchi.org/resources/gary-marsden-travel-awards/) | Barcelona | Missed | +| [ACM C&C 2026](https://cc.acm.org/2026/) | Papers / Artworks | ~~Feb 5~~ passed | TBD | Jul 13–16, London | Missed | +| [ISEA 2026](https://isea-2026.isea-international.org/) | Papers, Art, Demos | TBD | Hybrid/online for artists | Apr 10–19, Dubai | Research | +| [SIGGRAPH 2026](https://s2026.siggraph.org/) | Art Gallery / Art Papers | Closed | [Underrepresented Communities Grant](https://www.siggraph.org/) | Jul 19–23, Los Angeles | Missed | + +### IEEE ICIR 2026 — Intelligent Reality + +**What:** IEEE 5th International Conference on Intelligent Reality — convergence of physical/digital worlds, AI, XR, Digital Twins, IoT, Robotics, Wearables. + +**Fit for AC:** Aesthetic Computer sits at the intersection of creative computing, extended reality, and AI-augmented authoring. Relevant topic areas: +- Emerging Technologies for Intelligent Reality (AI, ML) +- Extended Reality (XR) — AC's spatial/embodied pieces +- Hardware, Software, and Devices for Intelligent Reality +- Simulation and Digital Twins +- Computer Vision and Graphics + +**Submission options:** +1. **Full Paper (4–6 pages)** — AC as a platform for Intelligent Reality authoring: runtime architecture, KidLisp as an AI-friendly creative language, real-time multi-user sessions, embodied input (pen/hand/gamepad) +2. **Short Paper (2–4 pages)** — Focused contribution, e.g. KidLisp + LLM co-authoring for generative art, or the session-server architecture for collaborative XR +3. **Demo / Performance** — Live AC demo (later deadline TBD) + +**Key dates:** +- Round 1 submission: ~~Feb 14, 2026~~ (passed) +- Late-Breaking Papers / Demos / Performances: later deadlines — check [icir.ieee.org](https://icir.ieee.org/) +- Camera-ready: Apr 19, 2026 (R1) +- Early bird registration: Apr 15, 2026 +- Conference: Jun 25–26, 2026 + +**Submission portal:** [EDAS](https://edas.info/N34775) + +**Next steps:** +- [ ] Check late-breaking / demo / performance deadlines on ICIR site +- [ ] Decide paper angle (full paper vs. short paper vs. demo) +- [ ] Draft outline +- [ ] Adapt existing arXiv AC paper content to IEEE format (4–6 pages) +- [ ] Email organizers re: travel support + +### Prix Ars Electronica 2026 — Interactive Art + + +**What:** The world's most prestigious media art competition since 1987. Category "Interactive Art +" focuses on interactive works with technological/scientific innovation, new forms of human-tech communication, and sociopolitical relevance. + +**Fit for AC:** AC is an interactive art platform. KidLisp as creative language, pen/hand/gamepad embodied input, URL-as-instrument interaction model, real-time multi-user sessions. Perfect fit for Interactive Art +. + +**Prize:** Golden Nica + **€10,000**. Free to enter. Submission is online only. + +**Deadline:** **March 9, 2026, 2 PM CET** (extended) + +**Submit at:** [ars.electronica.art/prix/en/opencall](https://ars.electronica.art/prix/en/opencall/) + +**Also:** S+T+ARTS Prize 2026 (science/technology/arts intersection) — deadline ~~Mar 9, 2026~~ — €40,000 total prize. [Entry details](https://ars.electronica.art/starts-prize/en/open-call/entry-details/) + +**Festival:** Sep 9–13, 2026, Linz, Austria + +### ACM C&C 2026 — Demos Track (OPEN) + +**What:** ACM Creativity & Cognition. Theme: "Creativity for Change." London, Jul 13–16. Central Saint Martins, University of the Arts London. + +**Fit for AC:** Creative computing platform, AI-augmented authoring, KidLisp as end-user creative programming. Demos track is ideal — show AC live. + +**Deadline:** **April 16, 2026** (Demos). Notification: May 7. Camera-ready: May 21. + +**Next steps:** +- [ ] Prepare demo submission by Apr 16 +- [ ] Check if Gary Marsden Travel Awards apply to C&C (it's a SIGCHI conference) + +### ICCC 2026 — Computational Creativity + +**What:** 17th International Conference on Computational Creativity. Coimbra, Portugal, Jun 29–Jul 3. + +**Fit for AC:** KidLisp + LLM co-authoring is literally computational creativity. The AI-human creative loop, generative art through a Lisp dialect, the AC runtime as a creativity support environment. Strong fit. + +**Short Papers deadline:** **April 24, 2026**. Notification: May 11. Camera-ready: May 27. + +**Full Papers:** ~~Mar 8~~ passed. + +**Next steps:** +- [ ] Draft ICCC short paper: KidLisp as a computational creativity environment +- [ ] Email iccc26@computationalcreativity.net re: travel support + +### IEEE ICIR 2026 — Late-Breaking / Demos + +See details above. Check for late-breaking deadlines on [icir.ieee.org](https://icir.ieee.org/). + +### Venues to Track for 2027 + +- **NIME** — AC as musical instrument interface. Hybrid option. Track 2027 dates. +- **xCoAx** — "Aesthetics & X" — perfect alignment. Torino was €350 reg. +- **ACM CHI** — Gary Marsden Travel Awards cover everything. Demos track ideal. +- **SIGGRAPH** — Art Gallery / Emerging Tech. Underrepresented Communities Grant. + +## Funding Sources (General) + +| Source | Type | Amount | Notes | +|--------|------|--------|-------| +| [Gary Marsden Travel Awards](https://sigchi.org/resources/gary-marsden-travel-awards/) | Travel grant | Flights, lodging, meals, registration | For SIGCHI conferences (CHI, C&C, etc.). Early-career / financial need | +| [SIGGRAPH Underrepresented Communities Grant](https://www.siggraph.org/) | Registration + mentorship | Registration waiver | For SIGGRAPH attendance | +| [Creative Capital Award](https://creative-capital.org/) | Project grant | Up to $50,000 | For original artistic works. Tech/multidisciplinary welcome | +| [Foundation for Contemporary Arts](https://www.foundationforcontemporaryarts.org/) | Emergency Grant | Varies | For artists presenting at specific events | +| [Processing Foundation](https://processingfoundation.org/) | Fellowships | Varies | Creative coding community. AC is in this lineage | +| NIME Diversity Grants | Travel/registration | Varies | Check with nime2026.org | +| IEEE Conference Travel Grants | Travel | Partial | Available at many IEEE conferences for students/researchers | +| [Prix Ars Electronica](https://ars.electronica.art/prix/en/) | Prize | €10,000 (Golden Nica) | Interactive Art + category. Free entry. Annual. | +| [S+T+ARTS Prize](https://ars.electronica.art/starts-prize/en/) | Prize | €40,000 total | EU Commission prize for science/technology/arts. Annual. | + ## Author Jeffrey Alan Scudder — ORCID: [0009-0007-4460-4913](https://orcid.org/0009-0007-4460-4913) diff --git a/papers/ars-electronica-2026/demoplay-architecture-report.md b/papers/ars-electronica-2026/demoplay-architecture-report.md new file mode 100644 index 0000000000..44544b3e31 --- /dev/null +++ b/papers/ars-electronica-2026/demoplay-architecture-report.md @@ -0,0 +1,311 @@ +# Demoplay Architecture Report +## "Test Suite for Aesthetic Computer" — Prix Ars Electronica 2026 Video + +### Concept + +A choreographed, automated performance of Aesthetic Computer — structured like a classical music test suite. The system plays itself: navigating between pieces, triggering interactions, speaking narration via TTS, and recording the entire session as video. No manual input during recording. The demoplay IS the artwork. + +--- + +## Existing Infrastructure (What We Already Have) + +### 1. Merry Pipeline — Timed Piece Sequencing + +**Files:** `disks/merryo.mjs`, `disks/merry.mjs`, `disks/prompt.mjs` (lines 1062–1372) + +The merry system already chains pieces with precise timing: + +``` +/merry:5-tone:3-clock:4-wand +``` + +This plays `tone` for 5s → `clock` for 3s → `wand` for 4s → returns to prompt. + +**Key capabilities:** +- `system.merry` state object tracks pipeline progress, piece index, elapsed time +- UTC-synchronized timing (multiple devices stay in sync) +- Crossfade support via `fadeDuration` +- Preloads all pieces before starting (`preloadPieces()`) +- Can record to video via `markAsTaping: true` +- Loop mode (`merryo`) or single-pass (`merry`) +- `stopMerryPipeline()` for clean exit + +**Limitation for demoplay:** Merry only *shows* pieces for a duration — it doesn't *interact* with them. We need synthetic input during each piece's time slot. + +### 2. Robo — Synthetic Input Automation + +**File:** `disks/robo.mjs` (1,559 lines) + +Robo generates synthetic pen events (touch, draw, lift) to automate brush execution at 120fps. It loads a target brush internally and plays back generated paths. + +**Key capabilities:** +- `Robo` class in `disk.mjs` — available in every piece's API +- `robo.touch(x, y)`, `robo.draw(x, y, px, py)`, `robo.lift(x, y)` +- Events have `device: "robot"` — distinguishable from human input +- Speed control via `robotState.speed` multiplier +- Path queue system with frame-locked timing +- Grid-based path generation + +**What this gives demoplay:** We can script drawing actions, tap interactions, and gesture sequences that play automatically within each piece. + +### 3. Artery — Chrome DevTools Protocol Automation + +**Files:** `artery/artery.mjs` (2,012 lines), `artery/artery-tui.mjs` (7,667 lines) + +External test automation via CDP (Chrome DevTools Protocol): + +```javascript +const client = new Artery(); +await client.connect(); +await client.jump('notepat'); +await client.sendKeyEvent({ key: 'a' }); +``` + +**Key capabilities:** +- Connect to running AC instance via CDP +- `jump(pieceName)` — navigate to any piece +- `sendKeyEvent()` — synthetic keyboard events +- `evaluate(jsCode)` — execute JS in page context +- `activateAudio()` — enable audio context + +### 4. Bach Prelude Test — Musical Timing Template + +**File:** `artery/test-notepat-bach-prelude.mjs` + +700+ MIDI events played through synthetic key presses with precise timing: + +```javascript +const MIDI_EVENTS = [ + { key: "d", ticks: 120 }, + { key: "a", ticks: 120 }, + { key: "+f#", ticks: 120 }, + // ... +]; +``` + +Each event: press key → hold for 70% of duration → release → gap for 30%. + +**What this gives demoplay:** The exact pattern for scripting timed keyboard interactions. We can compose a "score" of interactions the same way. + +### 5. TTS — `/api/say` + `speak()` Function + +**Endpoint:** `system/netlify/functions/say.js` +**Client:** `system/public/aesthetic.computer/lib/speech.mjs` + +```javascript +speak("Welcome to Aesthetic Computer", "female:18", "cloud", { + provider: "openai", + volume: 1, + speed: 1, + preloadOnly: false, + skipCompleted: false // sends speech:completed event when done +}); +``` + +**Key capabilities:** +- OpenAI TTS (`tts-1`) with 6 voices: alloy, echo, fable, onyx, nova, shimmer +- Google Cloud TTS as alternative +- Caches to CDN (Digital Ocean Spaces) — instant replay after first generation +- `preloadOnly: true` — preload all speech samples before performance starts +- `speech:completed` event — know when narration finishes before proceeding +- Pitch, speed, pan, volume controls +- `targetDuration` — time-stretch audio to fit exact timing + +### 6. Tape Recording — Video Capture + +**File:** `disks/common/tape-player.mjs` + +Frame-by-frame video + synchronized audio: +- Records ImageBitmap array + Web Audio AudioBuffer +- Supports VHS-style visual effects +- Play/pause/seek with audio sync +- Merry pipeline already has `isTaping` flag for recording entire sequences + +--- + +## What Needs to Be Built: The Demoplay Piece + +### Architecture: `disks/demoplay.mjs` + +A new piece that combines merry (sequencing) + robo (synthetic input) + speak (narration) + artery patterns (keyboard automation) into a single scored performance. + +### The Score Format + +A demoplay score is an array of **movements** (like a classical piece), each containing **measures** of timed actions: + +```javascript +const SCORE = [ + { + movement: "I. The Prompt", + narration: "No menus. No files. Just a prompt.", + measures: [ + { action: "wait", duration: 1000 }, + { action: "type", text: "notepat", speed: 80 }, // ms per char + { action: "key", key: "Enter" }, + { action: "wait-for", event: "piece:loaded" }, + { action: "speak", text: "Three hundred and fifty four pieces.", voice: "female:18" }, + { action: "wait-for", event: "speech:completed" }, + { action: "keys", sequence: [ + { key: "d", hold: 200 }, + { key: "a", hold: 200 }, + { key: "f", hold: 200 }, + ]}, + { action: "wait", duration: 2000 }, + { action: "jump", to: "prompt" }, + ] + }, + { + movement: "II. Pieces", + narration: "Each one a world.", + measures: [ + { action: "type", text: "line", speed: 60 }, + { action: "key", key: "Enter" }, + { action: "wait", duration: 500 }, + { action: "robo", path: "diagonal", duration: 2000 }, + { action: "wait", duration: 500 }, + { action: "jump", to: "prompt" }, + // ... more pieces + ] + }, + // ... more movements +]; +``` + +### Action Types Needed + +| Action | Description | Existing Support | +|--------|-------------|-----------------| +| `wait` | Pause for N ms | setTimeout / frame counting | +| `wait-for` | Wait for event (speech:completed, piece:loaded) | act() event system | +| `type` | Type text into prompt char by char | Synthetic keyboard via robo/artery | +| `key` | Press a single key | Robo class / sendKeyEvent | +| `keys` | Sequence of timed key presses | Bach prelude pattern | +| `jump` | Navigate to piece | jump() API — exists | +| `speak` | TTS narration | speak() + speech:completed — exists | +| `robo` | Automated drawing/interaction | Robo class — exists | +| `card` | Display text card overlay | New — render in paint() | +| `fade` | Visual transition | Merry fade system — exists | +| `record-start` | Begin tape recording | Merry taping flag — exists | +| `record-stop` | End tape recording | stopMerryPipeline — exists | + +### Implementation Approach + +**Option A: In-Process Piece (Recommended)** + +A `demoplay.mjs` piece that runs inside AC itself: +- Uses `system.merry`-style pipeline for sequencing +- Uses `Robo` class for synthetic input +- Uses `speak()` for narration +- Renders text cards via `paint()` +- Records via tape system +- Score is a .mjs or .json file + +**Pros:** Everything runs in-browser, captures at native quality, audio syncs perfectly, can use all AC rendering (glaze effects, etc.) + +**Cons:** Need to handle piece transitions carefully — when you `jump()` to another piece, the demoplay piece's code stops running. Need a conductor that persists across jumps. + +**Solution:** Use `system.demoplay` (like `system.merry`) — a persistent state object on the system/BIOS level that survives piece transitions. The BIOS checks `system.demoplay` each frame and advances the score. + +**Option B: External Artery Script** + +An artery script that drives AC from outside via CDP: +- Full control over timing and navigation +- Can capture via screen recording +- Bach prelude test already proves this works + +**Pros:** Simpler — no need to modify BIOS/disk. Score is just a Node.js script. + +**Cons:** Audio capture is harder (need system audio recording), visual quality depends on screen resolution, no access to AC's internal rendering/glaze. + +**Option C: Hybrid** + +Artery script orchestrates high-level movements (jump between pieces, trigger recording). Each piece has a `demoplay` mode that auto-plays its own internal choreography when it detects `system.demoplay` is active. + +### Recommended: Option A with BIOS-level conductor + +The conductor lives in the BIOS (or as a system-level module), survives piece transitions, and executes the score. Each frame: + +``` +1. Check system.demoplay.currentAction +2. If action is complete → advance to next action +3. If action is "speak" → call speak(), wait for speech:completed +4. If action is "key" → dispatch synthetic keyboard event +5. If action is "robo" → queue robo path +6. If action is "jump" → call jump(), mark action complete when piece loads +7. If action is "card" → set overlay text for paint() to render +``` + +### Files to Create/Modify + +| File | Change | +|------|--------| +| `disks/demoplay.mjs` | New — entry piece, loads score, starts conductor | +| `lib/demoplay-conductor.mjs` | New — score executor, survives piece transitions | +| `bios.mjs` | Modify — check `system.demoplay` each frame, call conductor | +| `lib/disk.mjs` | Modify — expose `system.demoplay` to pieces, add conductor hooks | +| `disks/demoplay-scores/ars-2026.mjs` | New — the actual score for Ars Electronica video | + +### Estimated Effort + +| Component | Effort | Notes | +|-----------|--------|-------| +| Score format + parser | Small | JSON/JS object, straightforward | +| Conductor (action executor) | Medium | Core logic — ~300-500 lines | +| BIOS integration | Small | Hook into frame loop + piece transition | +| Text card overlay | Small | paint() overlay in bios or demoplay piece | +| Synthetic typing in prompt | Medium | Need to inject keystrokes into prompt's input | +| Robo path scripting | Small | Robo class already exists | +| TTS preloading + sequencing | Small | speak() + preloadOnly already exist | +| Tape/recording integration | Small | Merry taping system already exists | +| The actual score composition | Large | Creative work — writing the "music" | + +**Total new code:** ~800-1200 lines across 3-4 files, plus the score itself. + +--- + +## The Score: "Test Suite No. 1 in A.C. Major" + +### Structure (Classical Form) + +| Movement | Duration | Content | Mood | +|----------|----------|---------|------| +| I. Overture — The Prompt | 0:00–0:25 | Prompt appears, first command typed, first piece loads | Anticipation | +| II. Exposition — Pieces | 0:25–1:00 | Rapid tour through 8-10 pieces, 3-4 sec each | Energy, variety | +| III. Development — KidLisp | 1:00–1:35 | Code appears, art generates, human-AI collaboration | Wonder | +| IV. Interlude — Social | 1:35–1:55 | Chat, moods, profiles, multi-user | Warmth | +| V. Cadenza — Flow State | 1:55–2:20 | Fast fluent navigation, the instrument played at speed | Virtuosity | +| VI. Coda | 2:20–2:30 | Return to prompt, blinking cursor, title card | Resolution | + +### TTS Narration Style + +Sparse, poetic, timed to the "rests" between movements. The voice speaks like a test suite announcing itself: + +> "Test one. The prompt." +> "Test two. Three hundred and fifty four pieces." +> "Test three. A language a child can read." +> "Test four. Social infrastructure." +> "Test five. Flow state." +> "All tests passed." + +The clinical language of a test suite, delivered with the gravity of a classical performance. The juxtaposition IS the statement. + +--- + +## Next Steps + +1. **Decide on architecture** — Option A (in-process) vs B (artery) vs C (hybrid) +2. **Prototype the conductor** — Minimal version that can: jump, wait, type, speak +3. **Write the score** — The creative composition of the performance +4. **Record** — Run the demoplay, capture to video +5. **Submit** — Upload to Prix Ars Electronica by Mar 9 + +### Timeline (5 days) + +| Day | Task | +|-----|------| +| Mar 4 (today) | Architecture decision, start conductor prototype | +| Mar 5 | Conductor working, basic score playing | +| Mar 6 | Full score composed, TTS narration recorded/cached | +| Mar 7 | Recording passes, polish transitions | +| Mar 8 | Final cut, prepare submission materials (description, images, bio) | +| Mar 9 | Submit before 2 PM CET | diff --git a/papers/ars-electronica-2026/demoplay.md b/papers/ars-electronica-2026/demoplay.md new file mode 100644 index 0000000000..f634873a78 --- /dev/null +++ b/papers/ars-electronica-2026/demoplay.md @@ -0,0 +1,123 @@ +# Aesthetic Computer — Demoplay Script +# ~3 minute video for Prix Ars Electronica 2026 + +## Concept + +No voiceover narration. No slides. The video IS the instrument being played. +Text cards appear between scenes — short, poetic, typeset in AC's font. +Sound comes from the pieces themselves. The video feels like watching someone play music. + +--- + +## Scene 1 — The Prompt (0:00–0:20) + +**CARD:** "No menus. No files. Just a prompt." + +A phone screen. The AC prompt blinks. A finger types: `notepat` +The screen transforms into a grid of colored pads. The user taps out a melody. +Sound fills the frame. Cut to: + +The prompt again. Types: `wand` +A drawing tool appears. A stroke of color trails the finger. + +The prompt again. Types: `prompt` +We're back. The instrument resets. The cycle is the interface. + +--- + +## Scene 2 — Pieces (0:20–0:55) + +**CARD:** "354 pieces. Each one a world." + +Rapid montage — 2-3 seconds each, cut on the beat of a notepat rhythm: +- `line` — geometric drawing +- `plot` — pixel placement +- `chat` — live messages appearing +- `spray` — spray paint tool +- `mood` — posting a mood to the social feed +- `whistlegraph` — a collaborative drawing game +- Custom user pieces from @handles + +Each piece fills the whole screen. No chrome, no UI decoration. Pure interaction. + +--- + +## Scene 3 — KidLisp (0:55–1:30) + +**CARD:** "A language a child can read." + +Split screen: left side shows KidLisp code being typed, right side shows the visual output updating live. + +``` +(each i 12 + (circle:filled (/ screen:w 2) + (/ screen:h 2) + (* i 20) + (color i 100 200))) +``` + +Concentric colored circles bloom on screen. + +Then: a child (or beginner) typing in the prompt, asking an AI to help write a KidLisp piece. The AI responds with code. The code runs. Art appears. The human tweaks a number. The art changes. Back and forth — human and machine improvising together. + +**CARD:** "16,000 programs written. Many by beginners." + +--- + +## Scene 4 — Social (1:30–2:00) + +**CARD:** "Social infrastructure inside the runtime." + +Two phones side by side. Both on the same piece. One person draws, the other sees it appear in real time. They're making something together. + +Cut to: the mood feed. Short text posts, timestamps, handles. A social network that lives inside a creative instrument. + +Cut to: a profile page. Someone's published pieces listed. Tap one — it loads instantly. You're inside their creation. + +--- + +## Scene 5 — The Pack (2:00–2:20) + +**CARD:** "One file. No server. Works forever." + +Someone types `pack` in the prompt. A single HTML file downloads. They open it offline — the piece runs perfectly. They email it. They put it on a USB stick. They mint it on-chain. + +The piece survives outside the platform. It's a self-contained artwork. + +--- + +## Scene 6 — The Instrument (2:20–2:50) + +**CARD:** "Software as instrument." + +Back to the prompt. Now the user moves fast — they've memorized commands. They type rapidly: +`notepat` → play a quick rhythm → +`prompt` → `wand` → draw a fast sketch → +`prompt` → `moods` → post a thought → +`prompt` → navigate to `@someone/piece` → explore someone else's work + +The speed is the point. No loading screens, no navigation trees. Just fluency. The person and the machine are in flow. + +--- + +## Scene 7 — End (2:50–3:00) + +**CARD:** "Aesthetic Computer" +**CARD:** "aesthetic.computer" +**CARD:** "Open source. Browser-native. Mobile-first." + +Fade to the prompt, blinking. + +--- + +## Production Notes + +- **Screen capture**: Use actual AC on a real phone + desktop browser +- **Audio**: All sound from the pieces themselves (notepat, speaker pieces, etc.) +- **Typography**: Text cards in YWFT Processing (AC's custom font) +- **Editing rhythm**: Cut on musical beats from the notepat sequence in Scene 1 +- **No voiceover**: Let the instrument speak for itself +- **Resolution**: 1920x1080 or 4K, landscape primary with phone footage portrait-in-landscape +- **Color**: AC's native palette — the pink/purple brand colors appear naturally + +## Duration Target: 2:50–3:00 diff --git a/papers/ars-electronica-2026/description.md b/papers/ars-electronica-2026/description.md new file mode 100644 index 0000000000..389e42fa22 --- /dev/null +++ b/papers/ars-electronica-2026/description.md @@ -0,0 +1,17 @@ +# Prix Ars Electronica 2026 — Interactive Art + +# Project Description (max 2,000 characters) + +Aesthetic Computer is a mobile-first runtime and social network for creative computing that treats the programming interface as a musical instrument. Instead of an IDE, code editor, or app store, users encounter a single text prompt. They type short, memorizable commands to launch interactive programs called "pieces" — drawing tools, sound instruments, games, generative artworks, and social spaces — all running in the browser on any device. + +The interaction model inverts conventional software design. There are no menus, no file browsers, no onboarding flows. Users discover commands through exploration, build muscle memory through repetition, and improvise by recombining pieces fluently — the same way a musician learns an instrument. Each URL is a playable surface: aesthetic.computer/notepat, aesthetic.computer/prompt, aesthetic.computer/wand. + +The platform includes KidLisp, a minimal Lisp dialect designed for generative art that doubles as a natural interface for human-AI co-authoring. Over 16,000 KidLisp programs have been written — many by children and beginners collaborating with language models to create visual art through code they can read and understand. + +Social infrastructure is built into the runtime itself: user handles, real-time chat, mood posts, and live profiles exist as part of the system, not as external services. Multi-user sessions allow collaborative drawing, music-making, and shared creative experiences in real time. + +The system comprises 63,000 lines of open-source runtime code, 354 built-in pieces, 265 user-published works, and 2,800+ registered users. It runs entirely in the browser with no installation. A pack system bundles any piece into a single offline HTML file for distribution via email, USB, or blockchain. + +Aesthetic Computer proposes that creative software can be organized around memorization and improvisation rather than navigation and configuration — and that this produces a fundamentally different relationship between people and computation. + +--- +Character count: ~1,870 (under 2,000 limit) diff --git a/papers/arxiv-ac/ac.tex b/papers/arxiv-ac/ac.tex index 19f455d304..b3151ac663 100644 --- a/papers/arxiv-ac/ac.tex +++ b/papers/arxiv-ac/ac.tex @@ -32,6 +32,7 @@ \usepackage{fancyhdr} \usepackage{hyperref} \usepackage{graphicx} +\usepackage{svg} \graphicspath{{figures/}} \usepackage{ragged2e} \usepackage{microtype} @@ -174,7 +175,7 @@ \twocolumn[{% \begin{center} -{\acbold\fontsize{24pt}{28pt}\selectfont\color{acdark} Aesthetic\acdot Computer '26}\par +\includesvg[height=1.2em]{pals}\enspace{\acbold\fontsize{24pt}{28pt}\selectfont\color{acdark} Aesthetic\acdot Computer '26}\par \vspace{0.2em} {\aclight\fontsize{11pt}{13pt}\selectfont\color{acpink} A Mobile-First Runtime for Creative Computing}\par \vspace{0.6em} diff --git a/papers/arxiv-ac/figures/pals.svg b/papers/arxiv-ac/figures/pals.svg new file mode 100644 index 0000000000..7dfa10952d --- /dev/null +++ b/papers/arxiv-ac/figures/pals.svg @@ -0,0 +1,3 @@ + diff --git a/papers/arxiv-kidlisp/figures/pals.svg b/papers/arxiv-kidlisp/figures/pals.svg new file mode 100644 index 0000000000..7dfa10952d --- /dev/null +++ b/papers/arxiv-kidlisp/figures/pals.svg @@ -0,0 +1,3 @@ + diff --git a/papers/arxiv-kidlisp/kidlisp.tex b/papers/arxiv-kidlisp/kidlisp.tex index dd362b7074..943c61f460 100644 --- a/papers/arxiv-kidlisp/kidlisp.tex +++ b/papers/arxiv-kidlisp/kidlisp.tex @@ -32,6 +32,7 @@ \usepackage{fancyhdr} \usepackage{hyperref} \usepackage{graphicx} +\usepackage{svg} \graphicspath{{figures/}} \usepackage{ragged2e} \usepackage{microtype} @@ -155,7 +156,7 @@ \twocolumn[{% \begin{center} -{\acbold\fontsize{24pt}{28pt}\selectfont\color{acdark} KidLisp '26}\par +\includesvg[height=1.2em]{pals}\enspace{\acbold\fontsize{24pt}{28pt}\selectfont\color{acdark} KidLisp '26}\par \vspace{0.2em} {\aclight\fontsize{11pt}{13pt}\selectfont\color{acpink} A Minimal Lisp for Generative Art}\par \vspace{0.6em} diff --git a/papers/joss-ac/paper.md b/papers/joss-ac/paper.md index ed37036c1b..4d5de1fa2f 100644 --- a/papers/joss-ac/paper.md +++ b/papers/joss-ac/paper.md @@ -106,12 +106,8 @@ The `publish` command uploads a piece under the user's `@handle`. The `source` c The platform's 2,801 registered users, 16,244 KidLisp programs, 4,404 paintings, and 18,020 chat messages constitute a dataset for studying creative computing practices in a mobile-first, social context. The prompt-as-instrument interaction model offers a case study in alternative programming interfaces. -# AI usage disclosure +# Assemblage -The AC runtime was primarily written by the author. Claude (Anthropic) was used as a development assistant for debugging, test writing, and documentation. This paper was drafted with AI assistance. - -# Acknowledgements - -Thanks to the AC community for creating the corpus and providing feedback, and to the 14 contributors to the open-source repository. +Written and produced by Jeffrey Alan Scudder. Tools used in the making of Aesthetic Computer and this paper include: JavaScript, Node.js, Vim, various LLMs (Claude, GPT, Gemini, etc.), fish shell, Git, Firefox, and a lot of coffee. Thanks to the AC community for creating the corpus and providing feedback, and to the 14 contributors to the open-source repository. # References diff --git a/papers/joss-kidlisp/paper.md b/papers/joss-kidlisp/paper.md index 022eebbd99..250029cd89 100644 --- a/papers/joss-kidlisp/paper.md +++ b/papers/joss-kidlisp/paper.md @@ -170,12 +170,8 @@ The corpus of 16,000+ programs with hit counters, timestamps, and author attribu The platform's chaos mode --- which produces deterministic visual output from arbitrary text input --- represents an unusual approach to error handling in creative environments that may interest programming language researchers. -# AI usage disclosure +# Assemblage -The KidLisp evaluator was primarily written by the author. Claude (Anthropic) was used as a development assistant for debugging, test writing, and documentation. This paper was drafted with AI assistance. - -# Acknowledgements - -Thanks to the 59 KidLisp authors on Aesthetic Computer for creating the corpus and providing feedback on language design. +Written and produced by Jeffrey Alan Scudder. Tools used in the making of KidLisp and this paper include: JavaScript, Node.js, Vim, various LLMs (Claude, GPT, Gemini, etc.), fish shell, Git, Firefox, and a lot of coffee. Thanks to the 59 KidLisp authors on Aesthetic Computer for creating the corpus and providing feedback on language design. # References diff --git a/system/public/aesthetic.computer/bios.mjs b/system/public/aesthetic.computer/bios.mjs index de94edcf56..d380ada7b3 100644 --- a/system/public/aesthetic.computer/bios.mjs +++ b/system/public/aesthetic.computer/bios.mjs @@ -1063,14 +1063,14 @@ async function boot(parsed, bpm = 60, resolution, debug) { resumeTapePlayback, seekTapePlayback; - let audioContextResuming = false; // Flag to track when AudioContext resume is in progress - let audioContextResumeTimestamps = {}; // Store resume timestamps separately - let lastAudioResumeAttemptAt = 0; // Debounce repeated resume() calls from duplicate touch/pointer gestures - const AUDIO_RESUME_DEBOUNCE_MS = 250; - const AUDIO_RESUME_STUCK_MS = 1500; - let dawAudioResumed = false; // Track if we've already auto-resumed AudioContext for DAW mode - let tapeSyncPosition = null; // Position to sync tape audio to (0-1), set by video piece - let currentTapePosition = 0; // Current tape playback position (0-1), updated by main loop + let audioContextResuming = false; // Flag to track when AudioContext resume is in progress + let audioContextResumeTimestamps = {}; // Store resume timestamps separately + let lastAudioResumeAttemptAt = 0; // Debounce repeated resume() calls from duplicate touch/pointer gestures + const AUDIO_RESUME_DEBOUNCE_MS = 250; + const AUDIO_RESUME_STUCK_MS = 1500; + let dawAudioResumed = false; // Track if we've already auto-resumed AudioContext for DAW mode + let tapeSyncPosition = null; // Position to sync tape audio to (0-1), set by video piece + let currentTapePosition = 0; // Current tape playback position (0-1), updated by main loop // Make resume timestamps accessible globally window.audioContextResumeTimestamps = audioContextResumeTimestamps; @@ -2670,60 +2670,60 @@ async function boot(parsed, bpm = 60, resolution, debug) { } } - function stopBackgroundMusic() { - currentBackgroundTrack = null; - backgroundMusicEl.src = ""; - } - - function resumeAudioContext(reason = "unspecified", { force = false, onResumed } = {}) { - if (!audioContext) return; - if (audioContext.state === "running") { - onResumed?.(); - return; - } - - const now = performance.now(); - if (!force && now - lastAudioResumeAttemptAt < AUDIO_RESUME_DEBOUNCE_MS) return; - if (audioContextResuming) return; - - audioContextResuming = true; - lastAudioResumeAttemptAt = now; - const resumeStartTime = now; - let finished = false; - - const release = () => { - if (finished) return; - finished = true; - clearTimeout(stuckTimer); - audioContextResuming = false; - }; - - const stuckTimer = setTimeout(() => { - if (finished) return; - console.warn( - `🎵 AudioContext resume timeout after ${AUDIO_RESUME_STUCK_MS}ms (${reason})`, - ); - release(); - }, AUDIO_RESUME_STUCK_MS); - - audioContext - .resume() - .then(() => { - const resumeEndTime = performance.now(); - window.audioContextResumeTimestamps.requestedAt = resumeStartTime; - window.audioContextResumeTimestamps.completedAt = resumeEndTime; - onResumed?.(); - }) - .catch((error) => { - console.warn( - `🎵 AudioContext resume failed (${reason}):`, - error?.message || error, - ); - }) - .finally(() => { - release(); - }); - } + function stopBackgroundMusic() { + currentBackgroundTrack = null; + backgroundMusicEl.src = ""; + } + + function resumeAudioContext(reason = "unspecified", { force = false, onResumed } = {}) { + if (!audioContext) return; + if (audioContext.state === "running") { + onResumed?.(); + return; + } + + const now = performance.now(); + if (!force && now - lastAudioResumeAttemptAt < AUDIO_RESUME_DEBOUNCE_MS) return; + if (audioContextResuming) return; + + audioContextResuming = true; + lastAudioResumeAttemptAt = now; + const resumeStartTime = now; + let finished = false; + + const release = () => { + if (finished) return; + finished = true; + clearTimeout(stuckTimer); + audioContextResuming = false; + }; + + const stuckTimer = setTimeout(() => { + if (finished) return; + console.warn( + `🎵 AudioContext resume timeout after ${AUDIO_RESUME_STUCK_MS}ms (${reason})`, + ); + release(); + }, AUDIO_RESUME_STUCK_MS); + + audioContext + .resume() + .then(() => { + const resumeEndTime = performance.now(); + window.audioContextResumeTimestamps.requestedAt = resumeStartTime; + window.audioContextResumeTimestamps.completedAt = resumeEndTime; + onResumed?.(); + }) + .catch((error) => { + console.warn( + `🎵 AudioContext resume failed (${reason}):`, + error?.message || error, + ); + }) + .finally(() => { + release(); + }); + } function startSound() { if (audioStarting) return; @@ -2784,7 +2784,7 @@ async function boot(parsed, bpm = 60, resolution, debug) { // Resume immediately to capture the user gesture window. // On iOS Safari, AudioContext may start "suspended" even during a gesture — // calling resume() synchronously here ensures we don't lose the gesture. - resumeAudioContext("startSound-initial", { force: true }); + resumeAudioContext("startSound-initial", { force: true }); // 🎵 AUDIO CONTEXT LOGGING - Track timing characteristics // console.log(`🎵 AUDIO_CONTEXT_CREATED: sampleRate=${audioContext.sampleRate}, state=${audioContext.state}, baseLatency=${audioContext.baseLatency?.toFixed(6) || 'N/A'}s, outputLatency=${audioContext.outputLatency?.toFixed(6) || 'N/A'}s`); @@ -3485,25 +3485,25 @@ async function boot(parsed, bpm = 60, resolution, debug) { audioStarting = false; } - function enableAudioPlayback(skip = false) { - try { - if (backgroundMusicEl.paused && currentBackgroundTrack !== null) { - backgroundMusicEl.play().catch(error => { - // Audio playback failed, probably due to browser policy - console.log("Background music play failed (user gesture required):", error.message); - }); - } - if ( - !skip && - audioContext && - ["suspended", "interrupted"].includes(audioContext.state) - ) { - resumeAudioContext("gesture-enableAudioPlayback"); - } - } catch (error) { - console.log("Audio playback initialization failed:", error.message); - } - } + function enableAudioPlayback(skip = false) { + try { + if (backgroundMusicEl.paused && currentBackgroundTrack !== null) { + backgroundMusicEl.play().catch(error => { + // Audio playback failed, probably due to browser policy + console.log("Background music play failed (user gesture required):", error.message); + }); + } + if ( + !skip && + audioContext && + ["suspended", "interrupted"].includes(audioContext.state) + ) { + resumeAudioContext("gesture-enableAudioPlayback"); + } + } catch (error) { + console.log("Audio playback initialization failed:", error.message); + } + } //enableAudioPlayback(true); window.addEventListener("pointerdown", () => enableAudioPlayback()); @@ -5327,40 +5327,40 @@ async function boot(parsed, bpm = 60, resolution, debug) { } // Handle audio context resume request from video piece - if (type === "audio-context:resume-request") { - if (!window.acPACK_MODE) console.log("🎵 BIOS received audio context resume request:", content); - if ( - audioContext && - ["suspended", "interrupted"].includes(audioContext.state) - ) { - if (!window.acPACK_MODE) console.log("🎵 BIOS resuming audio context from user gesture"); - resumeAudioContext("video-resume-request", { - force: true, - onResumed: () => { - if (!audioContext) return; - if (!window.acPACK_MODE) - console.log( - "🎵 BIOS audio context resumed, new state:", - audioContext.state, - ); - // Notify video piece of successful resume - if (!window.acPACK_MODE) - console.log( - "🎵 BIOS sending updated AudioContext state after resume:", - { state: audioContext.state, hasAudio: true }, - ); - send({ - type: "tape:audio-context-state", - content: { - state: audioContext.state, - hasAudio: true, - }, - }); - }, - }); - } else if (audioContext) { - if (!window.acPACK_MODE) console.log("🎵 BIOS audio context already running:", audioContext.state); - // Send current state back to video piece + if (type === "audio-context:resume-request") { + if (!window.acPACK_MODE) console.log("🎵 BIOS received audio context resume request:", content); + if ( + audioContext && + ["suspended", "interrupted"].includes(audioContext.state) + ) { + if (!window.acPACK_MODE) console.log("🎵 BIOS resuming audio context from user gesture"); + resumeAudioContext("video-resume-request", { + force: true, + onResumed: () => { + if (!audioContext) return; + if (!window.acPACK_MODE) + console.log( + "🎵 BIOS audio context resumed, new state:", + audioContext.state, + ); + // Notify video piece of successful resume + if (!window.acPACK_MODE) + console.log( + "🎵 BIOS sending updated AudioContext state after resume:", + { state: audioContext.state, hasAudio: true }, + ); + send({ + type: "tape:audio-context-state", + content: { + state: audioContext.state, + hasAudio: true, + }, + }); + }, + }); + } else if (audioContext) { + if (!window.acPACK_MODE) console.log("🎵 BIOS audio context already running:", audioContext.state); + // Send current state back to video piece send({ type: "tape:audio-context-state", content: { @@ -16914,7 +16914,7 @@ async function boot(parsed, bpm = 60, resolution, debug) { if (!o || !o.img) { // During reframes, if overlay data is missing but we have a cached version, use it // EXCEPT for tapeProgressBar, merryProgressBar, durationProgressBar, durationTimecode, qrOverlay and bumperOverlay which should never use cached versions - if (content.reframe && window.framePersistentOverlayCache[name] && name !== "tapeProgressBar" && name !== "merryProgressBar" && name !== "durationProgressBar" && name !== "durationTimecode" && name !== "qrOverlay" && name !== "qrCornerLabel" && name !== "qrFullscreenLabel" && name !== "authorOverlay" && name !== "bumperOverlay") { + if (content.reframe && window.framePersistentOverlayCache[name] && name !== "tapeProgressBar" && name !== "merryProgressBar" && name !== "demoplayCard" && name !== "durationProgressBar" && name !== "durationTimecode" && name !== "qrOverlay" && name !== "qrCornerLabel" && name !== "qrFullscreenLabel" && name !== "authorOverlay" && name !== "bumperOverlay") { paintOverlays[name] = window.framePersistentOverlayCache[name]; return; } @@ -16950,6 +16950,13 @@ async function boot(parsed, bpm = 60, resolution, debug) { currentKey += `_${performance.now()}`; // Force unique key every time } + // For demoplay card, completely disable ALL caching (opacity changes every frame) + if (name === "demoplayCard") { + overlayCache.lastKey = null; + delete window.framePersistentOverlayCache[name]; + currentKey += `_${performance.now()}`; + } + // For merry progress bar, completely disable ALL caching to ensure every frame is painted if (name === "merryProgressBar") { overlayCache.lastKey = null; // Force regeneration every frame @@ -16997,6 +17004,7 @@ async function boot(parsed, bpm = 60, resolution, debug) { if ( name !== "tapeProgressBar" && name !== "merryProgressBar" && + name !== "demoplayCard" && name !== "durationProgressBar" && name !== "durationTimecode" && name !== "qrOverlay" && @@ -17124,7 +17132,7 @@ async function boot(parsed, bpm = 60, resolution, debug) { // Don't cache QR overlay painters to allow animation // Don't cache tapeProgressBar, merryProgressBar or durationProgressBar painters either - force regeneration every frame // Don't cache authorOverlay or bumperOverlay as they change per piece - if (isHudOverlay && name !== "qrOverlay" && name !== "qrCornerLabel" && name !== "qrFullscreenLabel" && name !== "authorOverlay" && name !== "bumperOverlay" && name !== "tapeProgressBar" && name !== "merryProgressBar" && name !== "durationProgressBar") { + if (isHudOverlay && name !== "qrOverlay" && name !== "qrCornerLabel" && name !== "qrFullscreenLabel" && name !== "authorOverlay" && name !== "bumperOverlay" && name !== "tapeProgressBar" && name !== "merryProgressBar" && name !== "demoplayCard" && name !== "durationProgressBar") { window.framePersistentOverlayCache[name] = paintOverlays[name]; } } @@ -17190,6 +17198,7 @@ async function boot(parsed, bpm = 60, resolution, debug) { buildOverlay("qrFullscreenLabel", content.qrFullscreenLabel); buildOverlay("authorOverlay", content.authorOverlay); // 👤 Author attribution for KidLisp pieces buildOverlay("merryProgressBar", content.merryProgressBar); // 🎄 Merry pipeline progress bar + buildOverlay("demoplayCard", content.demoplayCard); // 🎬 Demoplay text card overlay buildOverlay("tapeProgressBar", content.tapeProgressBar); buildOverlay("durationProgressBar", content.durationProgressBar); buildOverlay("durationTimecode", content.durationTimecode); @@ -17630,6 +17639,20 @@ async function boot(parsed, bpm = 60, resolution, debug) { } } + // 🎬 Demoplay text card overlay + if (content.demoplayCard) { + if (paintOverlays["demoplayCard"]) { + paintOverlays["demoplayCard"](); + } else { + buildOverlay("demoplayCard", content.demoplayCard); + if (paintOverlays["demoplayCard"]) { + paintOverlays["demoplayCard"](); + } + } + } else { + delete paintOverlays["demoplayCard"]; + } + // 🎄⏰ Merry UTC debug overlay (top-right) - DISABLED // Useful for verifying that `mo`/`merryo` pipelines are aligned to the same UTC authority as `clock`. // if (!window.currentRecordingOptions?.cleanMode && content.merryUTC) { diff --git a/system/public/aesthetic.computer/disks/demoplay-scores/ars-2026.mjs b/system/public/aesthetic.computer/disks/demoplay-scores/ars-2026.mjs new file mode 100644 index 0000000000..d450fe3892 --- /dev/null +++ b/system/public/aesthetic.computer/disks/demoplay-scores/ars-2026.mjs @@ -0,0 +1,91 @@ +// Test Suite No. 1 in A.C. Major +// Score for Prix Ars Electronica 2026 + +export const meta = { + title: "Test Suite No. 1 in A.C. Major", + voices: ["female:18"], +}; + +export const score = [ + { + movement: "I. The Prompt", + card: { text: "Test one.\nThe prompt.", duration: 3000, fade: 500 }, + actions: [ + { action: "speak", text: "Test one. The prompt.", voice: "female:18" }, + { action: "wait-for", event: "speech:completed" }, + { action: "wait", ms: 500 }, + { action: "type", text: "notepat", speed: 80 }, + { action: "wait", ms: 300 }, + { action: "key", key: "Enter" }, + { action: "wait", ms: 3000 }, + { action: "keys", sequence: [ + { key: "d", hold: 250 }, + { key: "a", hold: 250 }, + { key: "f", hold: 250 }, + { key: "d", hold: 250 }, + { key: "a", hold: 250 }, + { key: "f", hold: 250 }, + ]}, + { action: "wait", ms: 2000 }, + { action: "key", key: "Escape" }, + { action: "wait", ms: 500 }, + ], + }, + { + movement: "II. Pieces", + card: { text: "Test two.\nThree hundred and\nfifty four pieces.", duration: 3000, fade: 500 }, + actions: [ + { action: "speak", text: "Test two. Three hundred and fifty four pieces.", voice: "female:18" }, + { action: "wait-for", event: "speech:completed" }, + { action: "wait", ms: 500 }, + { action: "type", text: "line", speed: 60 }, + { action: "wait", ms: 200 }, + { action: "key", key: "Enter" }, + { action: "wait", ms: 2000 }, + { action: "jump", to: "prompt" }, + { action: "wait", ms: 500 }, + { action: "type", text: "plot", speed: 60 }, + { action: "wait", ms: 200 }, + { action: "key", key: "Enter" }, + { action: "wait", ms: 2000 }, + { action: "jump", to: "prompt" }, + { action: "wait", ms: 500 }, + ], + }, + { + movement: "III. KidLisp", + card: { text: "Test three.\nA language a child\ncan read.", duration: 3000, fade: 500 }, + actions: [ + { action: "speak", text: "Test three. A language a child can read.", voice: "female:18" }, + { action: "wait-for", event: "speech:completed" }, + { action: "wait", ms: 3000 }, + ], + }, + { + movement: "IV. Social", + card: { text: "Test four.\nSocial infrastructure.", duration: 3000, fade: 500 }, + actions: [ + { action: "speak", text: "Test four. Social infrastructure.", voice: "female:18" }, + { action: "wait-for", event: "speech:completed" }, + { action: "wait", ms: 3000 }, + ], + }, + { + movement: "V. Flow", + card: { text: "Test five.\nFlow state.", duration: 3000, fade: 500 }, + actions: [ + { action: "speak", text: "Test five. Flow state.", voice: "female:18" }, + { action: "wait-for", event: "speech:completed" }, + { action: "wait", ms: 3000 }, + ], + }, + { + movement: "VI. Coda", + card: { text: "All tests passed.", duration: 4000, fade: 1000 }, + actions: [ + { action: "speak", text: "All tests passed.", voice: "female:18" }, + { action: "wait-for", event: "speech:completed" }, + { action: "wait", ms: 2000 }, + ], + }, +]; diff --git a/system/public/aesthetic.computer/disks/demoplay.mjs b/system/public/aesthetic.computer/disks/demoplay.mjs new file mode 100644 index 0000000000..41aadb824a --- /dev/null +++ b/system/public/aesthetic.computer/disks/demoplay.mjs @@ -0,0 +1,315 @@ +// demoplay, 2026.3.04.17.00 +// A conductor for automated AC performances — "Test Suite for Aesthetic Computer" + +let dp; // Reference to system.demoplay (set in boot, used in closures) + +async function boot({ + system, + jump, + send, + speak, + preloadPieces, + params, + colon, + sound, + net, +}) { + // Load score module (default or from params) + const scoreName = params?.[0] || "ars-2026"; + let scoreModule; + try { + scoreModule = await import(`./demoplay-scores/${scoreName}.mjs`); + } catch (e) { + console.error("🎬 Demoplay: Failed to load score:", scoreName, e); + jump("prompt"); + return; + } + + const { score, meta } = scoreModule; + if (!score || score.length === 0) { + console.error("🎬 Demoplay: Empty score"); + jump("prompt"); + return; + } + + // Extract all piece names and speech texts from the score for preloading + const pieceNames = new Set(); + const speechTexts = []; + + for (const movement of score) { + for (const action of movement.actions) { + if (action.action === "jump") pieceNames.add(action.to); + if (action.action === "speak") { + speechTexts.push({ + text: action.text, + voice: action.voice || meta?.voices?.[0] || "female:18", + }); + } + } + } + + // Initialize conductor state on the shared system object + system.demoplay = { + score, + meta, + running: true, + movementIndex: 0, + actionIndex: 0, + card: null, // { text, opacity, fadeIn, fadeOut, startTime } + syntheticKeyboard: [], + eventCallback: null, // Set by wait-for actions + }; + + dp = system.demoplay; + + // Stop function (called on Escape) + system.stopDemoplay = () => { + console.log("🎬 Demoplay: Stopped"); + if (system.demoplay) { + system.demoplay.running = false; + delete system.demoplay; + } + delete system.stopDemoplay; + send({ type: "url-freeze", content: { freeze: false } }); + // Reset leaving flag so jump works + jump("prompt"); + }; + + // Freeze URL during performance + send({ type: "url-freeze", content: { freeze: true } }); + + // Preload pieces + if (pieceNames.size > 0) { + console.log("🎬 Demoplay: Preloading pieces:", [...pieceNames]); + await preloadPieces([...pieceNames]); + } + + // Preload TTS + if (speechTexts.length > 0) { + console.log("🎬 Demoplay: Preloading", speechTexts.length, "speech samples"); + const promises = speechTexts.map(({ text, voice }) => + speak(text, voice, "cloud", { preloadOnly: true }), + ); + await Promise.all(promises); + } + + console.log( + "🎬 Demoplay: Starting score:", + meta?.title || scoreName, + `(${score.length} movements)`, + ); + + // Start the performance + advanceAction(system, jump, send, speak, sound, 0, 0); +} + +function advanceAction(system, jump, send, speak, sound, mvtIdx, actIdx) { + const dp = system.demoplay; + if (!dp || !dp.running) return; + + const { score } = dp; + + // Movement boundary check + if (mvtIdx >= score.length) { + // Score complete + console.log("🎬 Demoplay: Score complete"); + system.stopDemoplay?.(); + return; + } + + const movement = score[mvtIdx]; + + // If we've exhausted this movement's actions, show card for next movement and advance + if (actIdx >= movement.actions.length) { + advanceAction(system, jump, send, speak, sound, mvtIdx + 1, 0); + return; + } + + // Show movement card at start of each movement + if (actIdx === 0 && movement.card) { + const card = movement.card; + dp.movementIndex = mvtIdx; + dp.card = { + text: card.text, + opacity: 0, + fadeIn: card.fade || 500, + fadeOut: card.fade || 500, + duration: card.duration || 3000, + startTime: Date.now(), + }; + console.log(`🎬 Movement ${mvtIdx}: "${movement.movement}" — card for ${card.duration}ms`); + + // Wait for card duration, then start actions + setTimeout(() => { + if (!dp.running) return; + dp.card = null; + executeAction(system, jump, send, speak, sound, mvtIdx, actIdx); + }, card.duration); + return; + } + + executeAction(system, jump, send, speak, sound, mvtIdx, actIdx); +} + +function executeAction(system, jump, send, speak, sound, mvtIdx, actIdx) { + const dp = system.demoplay; + if (!dp || !dp.running) return; + + const action = dp.score[mvtIdx].actions[actIdx]; + dp.movementIndex = mvtIdx; + dp.actionIndex = actIdx; + + const next = () => + advanceAction(system, jump, send, speak, sound, mvtIdx, actIdx + 1); + + console.log( + `🎬 [${mvtIdx}:${actIdx}] ${action.action}`, + action.text || action.to || action.ms || action.key || "", + ); + + switch (action.action) { + case "wait": + setTimeout(next, action.ms || 1000); + break; + + case "wait-for": { + const timeout = action.timeout || 10000; + const startTime = Date.now(); + dp.eventCallback = (eventName) => { + if (eventName === action.event) { + dp.eventCallback = null; + next(); + } + }; + // Timeout fallback + setTimeout(() => { + if (dp.eventCallback) { + console.warn( + `🎬 wait-for "${action.event}" timed out after ${timeout}ms`, + ); + dp.eventCallback = null; + next(); + } + }, timeout); + break; + } + + case "jump": + jump(action.to); + // Small delay to let piece load + setTimeout(next, action.delay || 300); + break; + + case "speak": + speak( + action.text, + action.voice || dp.meta?.voices?.[0] || "female:18", + "cloud", + { skipCompleted: false, ...action.opts }, + ); + next(); // Advance immediately — use wait-for speech:completed to sync + break; + + case "type": { + // Type text character by character into the prompt + const text = action.text; + const speed = action.speed || 80; + let i = 0; + const typeChar = () => { + if (!dp.running) return; + i++; + send({ + type: "keyboard:text:replace", + content: { text: text.slice(0, i), cursor: i }, + }); + if (i < text.length) { + setTimeout(typeChar, speed); + } else { + next(); + } + }; + typeChar(); + break; + } + + case "key": + // Inject a synthetic keyboard event + dp.syntheticKeyboard.push({ + name: "keyboard:down:" + action.key.toLowerCase(), + key: action.key, + repeat: false, + shift: action.shift || false, + ctrl: action.ctrl || false, + alt: action.alt || false, + }); + setTimeout(next, action.delay || 100); + break; + + case "keys": { + // Sequence of timed key presses + const seq = action.sequence || []; + let idx = 0; + const playKey = () => { + if (!dp.running || idx >= seq.length) { + next(); + return; + } + const k = seq[idx]; + dp.syntheticKeyboard.push({ + name: "keyboard:down:" + k.key.toLowerCase(), + key: k.key, + repeat: false, + shift: k.shift || false, + ctrl: k.ctrl || false, + alt: k.alt || false, + }); + idx++; + setTimeout(playKey, k.hold || 200); + }; + playKey(); + break; + } + + case "robo": { + // Play a sequence of robo pen events + const path = action.path || []; + let idx = 0; + const playStep = () => { + if (!dp.running || idx >= path.length) { + next(); + return; + } + const step = path[idx]; + // Robo steps are dispatched via syntheticRobo (processed in makeFrame) + dp.syntheticRobo = dp.syntheticRobo || []; + dp.syntheticRobo.push(step); + idx++; + setTimeout(playStep, step.delay || 16); // ~60fps default + }; + playStep(); + break; + } + + case "card": { + dp.card = { + text: action.text, + opacity: 0, + fadeIn: action.fade || 500, + fadeOut: action.fade || 500, + duration: action.duration || 3000, + startTime: Date.now(), + }; + setTimeout(() => { + if (dp.running) dp.card = null; + next(); + }, action.duration || 3000); + break; + } + + default: + console.warn("🎬 Unknown action:", action.action); + next(); + } +} + +export { boot }; diff --git a/system/public/aesthetic.computer/lib/disk.mjs b/system/public/aesthetic.computer/lib/disk.mjs index 44489d73b5..90d6553ecd 100644 --- a/system/public/aesthetic.computer/lib/disk.mjs +++ b/system/public/aesthetic.computer/lib/disk.mjs @@ -11387,6 +11387,12 @@ async function makeFrame({ data: { type, content } }) { return; // Don't proceed with navigation } + // 🎬 Stop demoplay on Escape + if (data.key === "Escape" && typeof $commonApi.system.stopDemoplay === "function") { + leaving = false; + $commonApi.system.stopDemoplay(); + return; + } // Stop merry pipeline for both Escape and Backspace let merryOriginalCommand = null; if (data.key === "Escape" || data.key === "Backspace") { @@ -12638,6 +12644,12 @@ async function makeFrame({ data: { type, content } }) { //} // } + // 🎬 Inject demoplay synthetic keyboard events + if ($commonApi.system.demoplay?.syntheticKeyboard?.length) { + const synth = $commonApi.system.demoplay.syntheticKeyboard.splice(0); + content.keyboard = [...(content.keyboard || []), ...synth]; + } + // Ingest all keyboard input events by running act for each event. content.keyboard?.forEach((data) => { Object.assign(data, { @@ -12732,6 +12744,13 @@ async function makeFrame({ data: { type, content } }) { console.warn("️ ✒ Act failure...", e); } }); + // 🎬 Forward actAlerts to demoplay conductor for wait-for actions + if ($commonApi.system.demoplay?.eventCallback) { + actAlerts.forEach((action) => { + const name = typeof action === "string" ? action : action.name; + if (name) $commonApi.system.demoplay.eventCallback(name); + }); + } //if (actAlerts.length > 0) console.log(actAlerts, booted); actAlerts.length = 0; // Clear act alerts. } @@ -14294,6 +14313,55 @@ async function makeFrame({ data: { type, content } }) { } } + // 🎬 Demoplay text card overlay + if ($commonApi.system.demoplay?.card) { + const card = $commonApi.system.demoplay.card; + const elapsed = Date.now() - card.startTime; + const totalDur = card.duration; + const fadeIn = card.fadeIn || 500; + const fadeOut = card.fadeOut || 500; + + // Calculate opacity with fade in/out + let opacity = 1; + if (elapsed < fadeIn) { + opacity = elapsed / fadeIn; + } else if (elapsed > totalDur - fadeOut) { + opacity = Math.max(0, (totalDur - elapsed) / fadeOut); + } + card.opacity = opacity; + + const sw = screen.width; + const sh = screen.height; + const cardPainting = $api.painting(sw, sh, ($) => { + $.unmask(); + // Semi-transparent background + $.ink(0, 0, 0, Math.floor(opacity * 180)); + $.box(0, 0, sw, sh); + // White text, centered + $.ink(255, 255, 255, Math.floor(opacity * 255)); + const lines = card.text.split("\n"); + const lineHeight = 10; + const startY = Math.floor((sh - lines.length * lineHeight) / 2); + lines.forEach((line, i) => { + $.write(line, { center: "x", y: startY + i * lineHeight }); + }); + }); + + if (cardPainting?.pixels?.length > 0) { + sendData.demoplayCard = { + x: 0, + y: 0, + img: { + width: cardPainting.width, + height: cardPainting.height, + pixels: cardPainting.pixels, + }, + }; + } + } else if (sendData.demoplayCard) { + delete sendData.demoplayCard; + } + // Tack on the tape progress bar pixel buffer if necessary. if (!$api.rec.cleanMode && ($api.rec.tapeProgress || ($api.rec.recording && $api.rec.tapeTimerDuration))) { const progress = $api.rec.tapeProgress || 0; @@ -15593,6 +15661,12 @@ async function makeFrame({ data: { type, content } }) { transferredObjects.push(merryPixelsCopy.buffer); } + if (sendData.demoplayCard) { + // 🎬 Create a copy for transfer to avoid detaching the demoplay card buffer + const demoplayPixelsCopy = new Uint8ClampedArray(sendData.demoplayCard.img.pixels); + transferredObjects.push(demoplayPixelsCopy.buffer); + } + if (sendData.lanBadge) { // 🔗 Create a copy for transfer to avoid detaching the LAN badge buffer const lanBadgePixelsCopy = new Uint8ClampedArray(sendData.lanBadge.img.pixels); diff --git a/system/public/papers.aesthetic.computer/index.html b/system/public/papers.aesthetic.computer/index.html index 679c9ee1ca..7174a21332 100644 --- a/system/public/papers.aesthetic.computer/index.html +++ b/system/public/papers.aesthetic.computer/index.html @@ -20,20 +20,33 @@ --bg: #1a1a2e; --text: #e8e8e8; --dim: #888; - --pink: #ff6b9d; + --pink: #cd5c9b; --cyan: #4ecdc4; - --purple: #b48cff; + --purple: #7850b4; --box-bg: rgba(255,255,255,0.03); --box-border: rgba(255,255,255,0.1); } - body.light-mode { + @media (prefers-color-scheme: light) { + :root:not(.dark-mode) { + --bg: #f5f5f5; + --text: #1a1a2e; + --dim: #666; + --pink: #b4489a; + --cyan: #0891b2; + --purple: #7850b4; + --box-bg: rgba(0,0,0,0.03); + --box-border: rgba(0,0,0,0.12); + } + } + + :root.light-mode { --bg: #f5f5f5; --text: #1a1a2e; --dim: #666; - --pink: rgb(205, 92, 155); + --pink: #b4489a; --cyan: #0891b2; - --purple: #7c3aed; + --purple: #7850b4; --box-bg: rgba(0,0,0,0.03); --box-border: rgba(0,0,0,0.12); } @@ -168,12 +181,28 @@ padding: 0.3em 0.6em; border-radius: 4px; } + + .pals-logo { + width: 24px; + height: 24px; + vertical-align: middle; + margin-right: 0.4em; + } + + .header-title { + display: flex; + align-items: center; + gap: 0.4em; + }