Light the code as it plays, and cover every voice - #29
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.
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.
Follows #28. Two things it left undone.
The player animated a progress bar and nothing else
Deckard and the promo videos light the step under the playhead and the instrument that is sounding
— most of what makes a step sequencer readable — and the site had none of it.
The highlighter now emits positions it already knew about:
data-stepon each step in a lane, anddata-trackon every line, countingtrackheaders in source order. That is the orderparseSongbuilds 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 theplayhead 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, the page owns the markup, and they meet only at those two attributes.
Verified by stepping the playhead and reading back what lit:
and by screenshotting a real playing block in a headless browser: at step 0 the kick's step is
boxed, its five lines are tinted, and the hat's lines are not — its step 0 is a rest.
An example for every voice
Coverage was 22 of 33. Missing 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
patchgraph — the one voicewith no fixed architecture, where the
gen_blocknames its own oscillators, filters and envelopes.ttsVocalandmeSpeakVocalare documented rather than pretended to be ordinary. Both reachoutside 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 synthesizes only three generators faithfully. It carries the
whole catalogue now, and nothing on the page is substituted.
Verification
blocks, failing on
window is not definedin Node — exactly the limitation the new sectiondocuments.
scripts/render-wav.mjsto confirm they sound rather than merely parse — including thehand-wired
patchgraph at −8.4 dBFS peak.