Skip to content

feat(player): light the code as it plays, with an example for every voice - #31

Merged
spacedevin merged 3 commits into
mainfrom
feat/code-lighting-and-all-voices
Sep 2, 2026
Merged

feat(player): light the code as it plays, with an example for every voice#31
spacedevin merged 3 commits into
mainfrom
feat/code-lighting-and-all-voices

Conversation

@spacedevin

Copy link
Copy Markdown
Owner

What

Two commits already on this branch:

  • feat(player): light the code as it plays. <deck-player> finds the highlighted block beside it and, on each step, marks the step under the playhead in every steps lane and tints the lines of each track sounding on it. The highlighter emits data-step and data-track; the element toggles dk-now / dk-live. Lanes are modulo their own length. Both classes come off on pause.
  • docs(examples): an example for every voice. docs/EXAMPLES.md now has a complete, playable song for all 33 voices (was 22), so test:examples covers the whole catalog.

Follow-up

#30 stacks on this branch and brings the READMEs, llms.txt, manifests and contributor docs in line with it. Merging this first lets #30 retarget to main; merging #30 into this branch first works too.

Verified

  • npm test and npm test -w @spacedevin/deck-player pass
  • Site built and the sample on the home page plays with the code lighting

spacedevin and others added 3 commits September 1, 2026 12:19
The element animated a progress bar and nothing else. Deckard and the promo videos light the step
under the playhead and the instrument that is sounding, which is most of what makes a step
sequencer readable, and the site had none of it.

The highlighter now emits the positions it already knew about: data-step on each step in a lane,
and data-track on every line, counting track headers in source order — the order parseSong builds
channels in, so a trigger's bus maps straight back to the lines that describe it.

<deck-player> finds the highlighted block beside it and, on each step, marks the step under the
playhead in every lane and tints the lines of each track sounding on it. Lanes are modulo their
own length, so a 16-step and a 32-step lane sit at different places in their own patterns, which
is what the sequencer does with them. Both classes come off on pause, so a block at rest reads
exactly as before, and a <deck-player> with no code beside it finds nothing and lights nothing.

The element owns the audio and the page owns the markup; they meet only at those two attributes.
Coverage was 22 of 33. The gaps were noiseBurst, fmTone, aether, formantVocal, chiptune, cymbal,
obSync, laserSync, patch, and the two speech voices.

Adds sections for percussion and metal, two-operator FM, drifting textures, sung vowels, the
generic chip voice, the rest of the sync family, and a hand-wired patch graph — the last being the
one voice with no fixed architecture, where the gen_block names its own oscillators, filters and
envelopes.

ttsVocal and meSpeakVocal are documented rather than pretended to be ordinary. Both reach outside
the audio graph — the Web Speech API and the meSpeak engine's assets — so they need host support
and render as silence offline. Saying so is more useful than a Play button that does nothing.

The intro no longer claims the player only synthesizes three generators faithfully; it carries the
whole catalogue now, and nothing on the page is substituted.

33/33 voices now have an example. Every block was checked for substitutions and for building a
real graph; ten of them, covering the voices written from scratch here, were rendered to audio
through scripts/render-wav.mjs to confirm they sound rather than merely parse.
…ibutors (#30)

The last three merges shipped @spacedevin/deck-synths, made the player play
the whole 33-voice catalog, added the WAV renderer and lit the code as it
plays. The docs still described the two-package world: the player README
said most voices fall back to a plain oscillator, its AGENTS.md said it
still carried its own generators, and the synths package was not on the
site or in llms.txt at all.

- site/build.mjs: Synths and Contributing sections, so llms.txt and
  llms-full.txt pick them up; blurb says three packages
- README: community-facing rewrite with badges, a packages table, a quick
  start (element, code, parse, WAV), and a Contributing section
- player README / AGENTS: the catalog is deck-synths, nothing is
  substituted, code lighting is documented, the cleanup contract is stated
  as the code has it
- synths README gains the voices table and a new AGENTS.md
- manifests: ./rendering export, homepage, bugs, keywords, sharper
  descriptions; versions and peer ranges untouched
- new CONTRIBUTING.md, issue templates (bug, feature, new voice) and a PR
  template
@spacedevin
spacedevin merged commit b03c9fe into main Sep 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant