Skip to content

Bundled apps

Alexander Refsum Jensenius edited this page Sep 5, 2026 · 3 revisions

Sixteen single-page apps ship with the book. They run in the browser, need no account, and send no data anywhere. Each lives in its own folder under book/apps/, and the deploy workflow copies them to /apps/ on the site.

App Chapter What it shows
training-loop 2 A tiny model's loss falling step by step as it trains
next-token-sampler 2, 4 Greedy, temperature, and top-p sampling on one distribution
diffusion-explorer 2, 5 An image dissolving into noise, and the reverse
evolve 2, 9 Breeding a drawing by choosing favourites, biomorph style
energy-estimator 3 Energy and water per query, with the assumptions exposed
provenance-inspector 3 What metadata a generated file carries, and what it proves
tokeniser-explorer 4 How a sentence splits into tokens, and why Norwegian costs more
word-vectors 4 How embeddings place related words near each other
markov-melody 6 A short melody generated from a Markov chain
agent-loop 11 An agent's plan, act, and observe loop, one call at a time
rhythm-bot 12 A tapped rhythm mapped onto a generative pattern, live
grid-viewer 5 A grid of generations that vary one knob at a time, with the settings beside each cell
frame-consistency 7 A generated clip stepped through frame by frame, with a difference view beside it
splat-viewer 8 A Gaussian splat capture orbited and thinned to show how little geometry is there
translation-sketchpad 10 A drawn line heard as pitch and loudness, or a sung contour drawn back
sensor-mapper 12 A phone or laptop sensor connected to a sound parameter

Conventions

Each app is a single index.html with inline CSS and JavaScript: no external scripts, no fetches except for its own bundled JSON, lang="en-GB", the same CSS variables and light and dark palette as the apps in Sensing Sound and Music, system font, maximum width 780 px, one intro paragraph stating what the app shows and that nothing leaves the browser. Controls are real buttons and labelled inputs, toggles carry aria-pressed, status text lives in an aria-live region, canvases scale with devicePixelRatio, and the script is one 'use strict' closure. Literal control bytes are not allowed in the file; write them as backslash-u escapes inside JavaScript strings (the HTML parser turns a literal NUL into U+FFFD).

Bundled data and licences

App Bundled data
next-token-sampler Alice (Project Gutenberg, public domain); Et dukkehjem (Norwegian Wikisource/Runeberg transcription, public domain)
tokeniser-explorer vocab.json trained on Gutenberg (public domain) and Wikipedia (CC-BY-SA 4.0) text, built by scripts/build-tokeniser-vocab.py
diffusion-explorer sample.jpg (course cover render, CC-BY-4.0)
energy-estimator none (defaults cite Luccioni et al. 2024)
word-vectors vectors.json from GloVe 6B 50d (PDDL), first 7 000 words, built by scripts/build-word-vectors.py
splat-viewer scene.splat, a synthetic still life generated by scripts/build-splat-viewer-data.py (CC-BY-4.0)
all others none

Adding an app

Create book/apps/<name>/index.html, add a row to book/apps/README.md and to this page, link it from the chapter's Explore interactively box, and run ./scripts/verify-book-build.sh to confirm it is copied into the built site. Chapters may link apps that do not exist yet by adding "(in preparation)" after the link; remove the marker when the app lands.

Clone this wiki locally