feat(player): light the code as it plays, with an example for every voice - #31
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 everystepslane and tints the lines of each track sounding on it. The highlighter emitsdata-stepanddata-track; the element togglesdk-now/dk-live. Lanes are modulo their own length. Both classes come off on pause.docs(examples): an example for every voice.docs/EXAMPLES.mdnow has a complete, playable song for all 33 voices (was 22), sotest:examplescovers 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 tomain; merging #30 into this branch first works too.Verified
npm testandnpm test -w @spacedevin/deck-playerpass