Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ request is the start of the interview, not the brief. Details: `brief/INTERVIEW.
runs the autonomous build and fresh-eyes visual/audio QA; `.agents/hooks/stage_gate.py` enforces gates across
Antigravity, Claude Code, and Codex. The brief's status line carries `Stage:`.
- **Design comes before tools.** During design, stay out of the picture, sound and tool folders (`gen/`, `living/`,
`engine/`, `academies-film/`, `players/`, `dist/`, `media/`, `audio/`, `score/`, `jukebox/`, `tools/`), other
`engine/`, `academies-film/`, `players/`, `dist/`, `media/`, `audio/`, `score/`, `jukebox/`, `tools/`, `tapmarks/`), other
pieces' `proj/` folders and their `STATUS.md` files (the full list: `notes/context-plan.md`, "The restricted
list"). They open with `/toolbox` at the gate: right after the brief is approved in efficient mode (ready-made
parts); after the storyboard, stills and sound concept are approved in full creative mode (from scratch).
Expand All @@ -53,6 +53,7 @@ polished and lost.
| A new piece | `/new-piece`; `/toolbox` at its gate |
| A change to an existing piece | Its folder: `proj/cdrom/` (CS Lab Screensaver), `academies-film/` (Academies hallway film), `living/` (SSR, CS and Exploration living posters), `proj/pltw/` (PLTW promo). Each folder's `CLAUDE.md` loads by itself when you open a file there; its `STATUS.md` holds the history |
| Library or tool work | That folder: `gen/`, `audio/` + `score/`, `engine/`, `jukebox/`, `tools/` (each has a `CLAUDE.md`) |
| Marking moments in a song by tapping keys (Tap Marks), or reading its `.tapmarks.json` | `tapmarks/` (`tapmarks/CLAUDE.md` has the JSON format and how to use the marks) |
| The kit (engine parts ProofEr copies in) | `kit/README.md`; built from engine sources by `tools/build_kit.py` (never edit `kit/` by hand); its `KIT.json` format is agreed with ProofEr (`TODO.md` §0) |
| How new pieces start | `brief/`: `INTERVIEW.md`, `TEMPLATE.md`, `CRAFT.md`, `STORYBOARD.md`, `example-academies.md`, `taste/house.md` (default taste), `clients/` |
| The public face | `README.md` (keep it true when tools or builds change), `CONTRIBUTING.md`, `LICENSE`, `index.html` (the Pages landing page; `.nojekyll` must stay) |
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ Start sound for the music. Move the mouse to see the controls.
reaction-diffusion, kinetic type, Dust Type ...), **K** for the knobs. Drag sliders until it looks right, press **COPY JSON**, save it as
`gen/carts/<your-piece>.json`: that's a new piece. `gen/README.md` has the full walkthrough (including kinetic-type
music videos from a Whisper transcript), `gen/API.md` is the one-page reference for AIs.
- **Mark the moments in a song:** double-click **`tapmarks/tapmarks.html`**, drop an MP3 or WAV, press Enter and
tap keys as it plays (Space for one kind of moment, K for another ...). A timing fix snaps each tap onto the beat it
was meant for (switchable); the marks save as JSON for a music video. Also installable as an app from
[the Pages copy](https://bpmdata.github.io/EOMD/tapmarks/tapmarks.html). `tapmarks/README.md` has the details.
- **A finished film:** `academies-film/danbury-academies-player.html`, a 60-second seamless hallway loop with its own
synthesized soundtrack, all in one file.

Expand Down Expand Up @@ -162,6 +166,7 @@ the project: the reusable parts are already here, so a new piece is mostly a sho
| `score/` | Music cartridges (`*.json`) and `FORMAT.md`, which explains every field |
| `audio/` | The music engine: instruments, the arranger and one file per arranger style |
| `tools/` | The Python scripts you run (builds, MP4 export, music tools) |
| `tapmarks/` | Tap Marks: tap keys while a song plays to mark its moments, saved as JSON |
| `brief/` | How a new piece starts: the client interview, brief and storyboard templates, craft guide, house taste, client profiles, and the Academies brief as the example |
| `.agents/`, `.claude/`, `.codex/` | Skills (`new-piece`, `auto-piece`, `toolbox`), `fresh-eyes-reviewer` subagent, and cross-harness stage-gate hooks |
| `proj/<piece>/` | One piece's brief, copy and sources (`cdrom`, `pltw`, `cs`, `ex`, `ssr`, `academies`) |
Expand Down
3 changes: 2 additions & 1 deletion STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> **Visitors:** this is the project's working log, kept for the people and AI assistants working on it. For what
> EOMD is and how to use it, start with [README.md](README.md).

_Last updated: Dec 1, 2026 (kit v0.4.0, ProofEr's review fixes: drone audible on small speakers at −28 LUFS, bigger laptop type, text never over data; kit v0.3.0, ProofEr's addendum: portrait layouts, pause button, per-language text tracks, data-row sequences, drone bed, sources chapter; kit v0.2.0: the motion-essay engine for ProofEr: beat model + fixed-step clock, essay player shell, test hooks + `engine/tools/essay-qa.js`, plain-WebGL2 scene host + compositor with the lens on a GPU texture, 4 scenes, 6 transitions, HTML text with a WCAG check; demo at `players/essay-demo.html`. Nov 28: kit v0.1.0: `kit/` + `tools/build_kit.py` for ProofEr; both repos are AGPLv3, so no licence obstacle; video-essay plan in `TODO.md`; lens upgraded: 6-level glow, halation, AgX/ACES, grade, dither; engine audio fallback renders in slices and works when the worker is blocked. Nov 27: optional WebGL2 lens finish, ideas taken from the Q-Day player; before that Nov 21: CD-ROM link options `?start=`, `?go`, `?airship`; before that Nov 4: fresh-eyes review added to the design stages; Academies film: clock + timer version). Each piece's history, limits and open questions live in its
_Last updated: Dec 2, 2026 (Tap Marks, `tapmarks/tapmarks.html`: play a song, tap keys to mark moments, one row per key with the client's notes, a timing fix that snaps taps onto clear hits and can be switched off, JSON out; first part of Bryan's eventual automatic music video generator. Dec 1: kit v0.4.0, ProofEr's review fixes: drone audible on small speakers at −28 LUFS, bigger laptop type, text never over data; kit v0.3.0, ProofEr's addendum: portrait layouts, pause button, per-language text tracks, data-row sequences, drone bed, sources chapter; kit v0.2.0: the motion-essay engine for ProofEr: beat model + fixed-step clock, essay player shell, test hooks + `engine/tools/essay-qa.js`, plain-WebGL2 scene host + compositor with the lens on a GPU texture, 4 scenes, 6 transitions, HTML text with a WCAG check; demo at `players/essay-demo.html`. Nov 28: kit v0.1.0: `kit/` + `tools/build_kit.py` for ProofEr; both repos are AGPLv3, so no licence obstacle; video-essay plan in `TODO.md`; lens upgraded: 6-level glow, halation, AgX/ACES, grade, dither; engine audio fallback renders in slices and works when the worker is blocked. Nov 27: optional WebGL2 lens finish, ideas taken from the Q-Day player; before that Nov 21: CD-ROM link options `?start=`, `?go`, `?airship`; before that Nov 4: fresh-eyes review added to the design stages; Academies film: clock + timer version). Each piece's history, limits and open questions live in its
folder's `STATUS.md`; repo-wide history in `notes/history.md`._

## Pieces
Expand All @@ -18,6 +18,7 @@ folder's `STATUS.md`; repo-wide history in `notes/history.md`._
| Video essays (Q-Day / Last Boring Slide level) | Kit v0.4.0 (Dec 1; v0.3.0 + ProofEr's review fixes): the essay engine (`engine/src/essay/`, `engine/src/gl/`, `engine/src/audio/bed.js`) with ProofEr's addendum for holocaust-by-country (portrait, text tracks, data-row sequences, drone bed, sources). Demo `players/essay-demo.html` (placeholder words, made-up numbers, EN + DRAFT ES track). EOMD builds the engine; ProofEr hosts motion essays (TODO §0) | Bryan tries the new bed on phone and laptop speakers; ProofEr syncs 0.4.0; next here (`TODO.md` top): GPU letter type, sound hits, essay MP4. Not yet seen on a real GPU, phone or TV (tested in SwiftShader) |
| gen library (incl. Dust Type) | Working; `tools/gen_export.py` | Check Dust Type knobs | `gen/STATUS.md` |
| Jukebox | 15 cartridges | Redesign its look | `jukebox/STATUS.md` |
| Tap Marks (`tapmarks/`) | Built Dec 2; QA 22/22 on a click track in headless Chrome | Bryan tries it with real songs, speakers and keyboard | `tapmarks/STATUS.md` |

## Across the repo
- **CI** runs the gen build + smoke test and the audio regression CHECK (Node 22) on every push; the stage-read audit
Expand Down
10 changes: 10 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ <h2>Players</h2>
></a
>

<h2>Tools</h2>
<a class="card" href="tapmarks/tapmarks.html"
><b>Tap Marks</b
><span
>Open a song, press Enter and tap keys at the moments that matter: each key gets its own row and your notes. A
timing fix snaps taps onto the beat (or switch it off). Saves the marks as JSON. Works offline, and installs
as an app from here.</span
></a
>

<h2>Make your own</h2>
<p>
Clone the repo and point your AI coding assistant at it:
Expand Down
3 changes: 2 additions & 1 deletion notes/context-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ creative: storyboard, stills and sound concept approved). Picture and sound are
above), `tests/hashes.json`, `notes/audio-ports.md`, every `proj/*/music.js`, `proj/cdrom/track2-r2.js`,
`proj/cdrom/intro-motif.md`. (MIDI export is `tools/midi.py`, which logs the arranger's notes through Node; there
is no other MIDI code in the repo.)
- **Tools:** `tools/` (builds, renderers, calibrate, midi, porter, regress, MP4 export).
- **Tools:** `tools/` (builds, renderers, calibrate, midi, porter, regress, MP4 export), `tapmarks/` (the song
tap-marking app).
- **Other pieces:** every `proj/<piece>/` except the new piece's own, and the per-piece STATUS files.
- **Open during design:** root `CLAUDE.md`, the root STATUS index, `brief/`, `.claude/skills/new-piece/`, the new
piece's `proj/<name>/`, and files the client supplied (logo, copy, brand guide).
Expand Down
42 changes: 42 additions & 0 deletions tapmarks/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# tapmarks/: Tap Marks (mark the moments in a song by tapping keys)

Status, history and known limits: `tapmarks/STATUS.md`. How a person uses it: `tapmarks/README.md`.

## What's here
- `tapmarks.html`: the whole app, one offline file (no build step, nothing loads from the internet). Edit it in place.
- `manifest.webmanifest`, `sw.js`, `icon-192.png`, `icon-512.png`: only for installing it as an app from GitHub Pages
(`https://bpmdata.github.io/EOMD/tapmarks/tapmarks.html`). The page adds the manifest and registers `sw.js` only
when served over http/https, so a double-clicked copy never tries to load them.
- `tests/qa.js`: headless check on a made-up click track (timing fix, live key presses while playing, holds, undo,
delete, drag, on/off switch, export/import, autosave). Run it after any change to `tapmarks.html`:
`node tapmarks/tests/qa.js <outDir>` (needs Playwright; `CHROME_PATH=` points it at a Chrome or headless-shell
binary when Playwright's own browser download is blocked, as it is in cloud sessions).

## Reading a `.tapmarks.json` (for a music video or any piece)
```json
{
"format": "eomd-tapmarks", "version": 1,
"audio": {"file":"song.mp3","duration":213.421,"sampleRate":48000},
"timingFix": {"on":true,"reachMs":100,"lateByMs":0},
"keys": [ {"key":"Space","label":"snowflake splash","note":"…","color":"#ffd500","count":42} ],
"marks": [ {"key":"Space","t":12.345,"tap":12.381,"fix":"snapped","shiftMs":-36}, {"key":"H","t":40.2,"tap":40.2,"fix":"tapped","hold":1.25} ]
}
```
- `t` (seconds from the start of the decoded song) is the time to use. `tap` is when the key was pressed, as heard.
`fix`: `snapped` (moved onto a clear hit in the music), `tapped` (as pressed, or moved by the "late by" setting;
`shiftMs` says how far), `moved` (the client dragged or nudged it: their word, never adjust it).
- `hold`: present when the key was held 0.25 s or longer; the moment lasts that long.
- **Each key's `label` and `note` are the client's instructions for that key** (e.g. "reserve the really aggressive
splash and shake effect for this key"). Read them before choosing what a key's marks trigger, and follow them like
any brief text: word for word, never invented.
- Small timing corrections when you use the marks are fine, but say so, keep them obvious from the waveform, and never
touch `moved` marks. If `timingFix.on` is false the client wants their taps exactly as pressed: don't snap them.
- An MP3's decoded start can differ from another decoder's by a few ms (encoder delay). If marks will drive a player
that plays the MP3 through an `<audio>` element, spot-check one sharp hit.

## Rules
- Keep it one self-contained file: inline CSS/JS, system fonts, no CDN. If `FILES` in `sw.js` changes, bump `VERSION`.
- Keys are letters, digits and Space (marks); Enter, arrows, Home/End, Backspace/Delete, `,` `.` `-` `=`, Esc and
Ctrl/Cmd+Z/Y are controls. A new control must not take a letter, digit or Space.
- Timing: taps are stamped with `event.timeStamp` mapped through `AudioContext.getOutputTimestamp()`, so `tap` is
what was coming out of the speakers at the press. Keep that path; don't stamp from `currentTime` alone.
29 changes: 29 additions & 0 deletions tapmarks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Tap Marks

Play a song and tap keys at the moments that matter. Each key gets its own row, so Space can mean "snowflake splash"
and K can mean "the big shake". The marks save as a small `.json` file that a music video (or Claude) can read.

## Open it
- **On this computer:** double-click `tapmarks/tapmarks.html`. It works with no internet; nothing leaves the computer.
- **As an app:** open https://bpmdata.github.io/EOMD/tapmarks/tapmarks.html in Chrome or Edge and press the install
button in the address bar. It then opens from the Start menu or Dock and works offline.

## Use it
1. Drop an MP3 or WAV on the page (or press **Open song**).
2. Press **Enter** to play. Tap any letter, number or **Space** at the moments you want. Hold a key to mark a long
moment.
3. In each key's box under the waveform, write what that key means, and any notes ("save the really aggressive
splash and shake for this key").
4. Fix mistakes: **Backspace** takes back the last mark; click a mark to pick it, then drag it, nudge it with `,` and
`.`, or press **Delete**. **Ctrl+Z** undoes. Arrow keys jump back and forward; click the waveform to jump there.
5. Press **Save marks** to download `<song>.tapmarks.json`. Marks are also kept in the browser for each song, so
closing the page loses nothing. **Load marks** opens a saved file again.

## Timing fix
Everyone taps a little late or early. With **Timing fix** on, each tap moves onto the clear hit in the music (a drum, a
sharp attack) within the snap reach (100 ms to start with), and stays where you pressed when there's no clear hit. Your
press is always kept, and you can see it: a faint tick and a line show where you actually pressed, and the small
yellow marks under the waveform are the hits it can snap to. The bar under the waveform says how late your taps
usually land. Turn **Timing fix** off and every mark is exactly where you pressed.

All the keys are listed under **Keys and help** on the page.
43 changes: 43 additions & 0 deletions tapmarks/STATUS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Tap Marks: status

_Last updated: Dec 2, 2026 (first version)._

## What it is
Bryan's spec (Dec 2, his words): "a program that allows you to load in an mp3 or wav file and as it's playing hit
various keys to indicate important moments ... 'put a snowflake splash every time i hit the spacebar'"; "a program
with a full gui"; timing corrections for human input delay that are "minor and transparent for things that are
obvious looking at the waveform"; "pause and rewind or delete a mistaken press"; for keys, "you can type in what its
supposed to indicate, like 'we should reserve the really aggressive splash and shake effect for this key'"; "The
timing fix thing should also be something you can toggle off". Architecture left to Claude; built as a browser app
(one offline HTML, installable from Pages). It is the first part of his eventual automatic music video generator.

## Built (Dec 2)
- Open by drop or picker; decodes with Web Audio; plays through an `AudioBufferSourceNode`; speeds 1×, 0.75×, 0.5×
(slower is lower in pitch).
- Whole-song strip (click/drag to jump) + zoomable waveform following the playhead + one row per key; each key row
has a label, notes, a colour, a count, a tap button (for touch) and Delete key.
- Taps stamped from the key event's own time through `getOutputTimestamp()` (what the speakers were playing).
Holds of 0.25 s or more are recorded.
- Timing fix: spectral-flux onsets, each placed to ~0.5 ms on the amplitude envelope; "clear" = 2× its half-second
neighbourhood and 4% of the loudest hit. A tap snaps to the best clear hit within ± reach (default 100 ms); none →
stays put. Raw press kept; on/off switch; reach and "my taps land late by" settings; median lateness shown.
- Pick, drag, nudge (`,` `.`), delete (Delete, right-click), Backspace takes back the last mark, undo/redo (200
steps; typing in key boxes isn't undone), double-click hands a moved mark back to the timing fix.
- Export/copy/import JSON (format in `tapmarks/CLAUDE.md`); per-song autosave in localStorage (try/catch).

## Tested (cloud, headless Chrome 131, `tapmarks/tests/qa.js`: 22 of 22 pass)
- Click track: every click found within 0.0 ms of where it was made, no false hits; taps 30–90 ms off snap exactly;
taps with nothing near stay put; reach 40 ms leaves a 60 ms-off tap alone; switch off → exactly as pressed.
- Real key presses while playing (aimed 40 ms late): stamps read 41–44 ms late, all snapped onto the clicks; a held
key recorded 0.40 s; drag, double-click, Backspace, undo, notes, export/import and reopen-restore all work.
- Separate check: a 4-minute stereo 44.1 kHz track decoded in 0.4 s and analysed in 2.0 s; 27 of 28 jittered taps
(−20 to +100 ms) landed within 3 ms of the kick, the last 3 ms off.

## Not tested yet (Bryan)
- Real speakers and a real keyboard: whether the stamps match what he hears, above all on Bluetooth headphones
(the browser may under-report their delay; the "late by" setting covers it).
- Real songs: whether "clear hit" picks what he'd pick in dense mixes, and whether 100 ms is the right reach.
- Installing from Pages (needs the PR merged and Pages to publish).

## Ideas not built (not asked for)
- Snapping to a beat grid or tempo; reading marks into a gen cartridge; a loop-a-section mode.
Binary file added tapmarks/icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tapmarks/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions tapmarks/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Tap Marks",
"short_name": "Tap Marks",
"description": "Play a song and tap keys to mark the moments that matter.",
"start_url": "tapmarks.html",
"scope": "./",
"display": "standalone",
"background_color": "#121212",
"theme_color": "#121212",
"icons": [
{ "src": "icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "icon-512.png", "sizes": "512x512", "type": "image/png" }
]
}
34 changes: 34 additions & 0 deletions tapmarks/sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Tap Marks offline cache (only used when the page is served over https, e.g. GitHub Pages).
// Network first, so an installed copy picks up a new tapmarks.html whenever it's online. Bump VERSION if FILES change.
const VERSION = 'tapmarks-v1';
const FILES = ['tapmarks.html', 'manifest.webmanifest', 'icon-192.png', 'icon-512.png'];

self.addEventListener('install', (e) => {
e.waitUntil(caches.open(VERSION).then((c) => c.addAll(FILES)));
self.skipWaiting();
});

self.addEventListener('activate', (e) => {
e.waitUntil(
caches
.keys()
.then((keys) =>
Promise.all(keys.filter((k) => k.startsWith('tapmarks-') && k !== VERSION).map((k) => caches.delete(k)))
)
);
self.clients.claim();
});

// network first (so a new version shows up when online), the cached copy when offline
self.addEventListener('fetch', (e) => {
if (e.request.method !== 'GET') return;
e.respondWith(
fetch(e.request)
.then((r) => {
const copy = r.clone();
if (r.ok) caches.open(VERSION).then((c) => c.put(e.request, copy));
return r;
})
.catch(() => caches.match(e.request, { ignoreSearch: true }))
);
});
Loading
Loading