Repository navigation
feat: Notes & Chords lab - #32
Merged
Merged
Conversation
…se and summary Lift pixel_projection out of the sorting viz into render so the notes viz can share it.
…pers Share the AudioContext factory and the stub context between the sorting and notes labs.
…ip non-finite pitches
…strip and a 3D cube for chords
…ame cannot flash the dots; playhead fades too
…d slider, tuning toggle and sound
…ne note's label is just its name
… cover the fourth lab
- The story reads the ratio the way the readout does (2 : 3) and names the fifth. - LabShell's overlay no longer swallows canvas pointer events; NotesLab drops its :has() workaround. - The strip's segment count is capped like the trail's, and its time block holds while the figure is smeared so chords with long periods do not re-phase every frame at audio rates. - Each voice's gain is gated by its own pitch, so a note below the root is not voiced while sub-audible. - Full picker chips are aria-disabled (still focusable); a teardown test; lazy 3D resources; README tree line; testing.md re-measured.
…says when the swings are still too slow VOICE_LEVEL was sized like one sorting blip (which sum across 28 lanes); one to three sustained sines at that level peaked near -24 dBFS after the compressor, which reads as silence on laptop speakers. At 0.8 shared across the notes the output sits near -11 dBFS at the default volume. A hint beside the Sound button now explains the silence below about 30 swings a second.
…o its defaults - Deselecting the last note is allowed: the rule and viz accept an empty list (the stage is left clear and the page shows "Pick a note to start"), Real pitch is disabled, and the link spells it n=none. - The Restart button becomes Reset: one note (C4), pure ratios, half a swing a second, from the first swing, playing. - A config push reads the new summary at once rather than on the next frame.
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.
Summary
A fourth lab, Notes & Chords (
#/notes), built from the "every note is a vibration" explainer:#/notes?n=60,67&t=equal. A home tile shows C4 + G4 closing in two swings.Design:
docs/superpowers/specs/2026-10-04-notes-and-chords-design.md. Plan:docs/superpowers/plans/2026-10-04-notes-and-chords.md.Shared changes
pixel_projectionmoves from the sorting viz intorender/camera_2d.rs.web/src/lib/audio/context.ts,web/src/lib/test/stubAudio.ts).LabShell's overlay no longer swallows canvas pointer events (pointer-events: none; the sorting grid's buttons already opt back in).buildQuerykeeps raw commas in share links.Tests
cargo test --all-featureswasm-pack test --chrome --headlessnpm test(vitest)cargo fmt --check,cargo clippy,npm run checkBrowser-checked at 1280 px and 375 px, light and dark: one/two/three notes, Real pitch, Sound (one context, one oscillator per note), Piano labels, share links, the home tile's Done state.