Skip to content

feat: selectable sound themes with a preview picker - #21

Merged
ttncode merged 1 commit into
mainfrom
feat/sound-themes
Oct 11, 2026
Merged

ttncode merged 1 commit into
mainfrom
feat/sound-themes

Conversation

@ttncode

@ttncode ttncode commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

Selectable sound themes. Each theme is a complete set covering every moment, so switching never leaves a gap by accident.

Moment Classic (default) Glass Wood Singing bowl Soft Silent
Start focus E5→A5 chime E6 ping C–E–G marimba C4 bowl A5 blip —
Finish focus G5–E5–C5 bell A6–E6–A5 pings G–E–C–G…C phrase two G3 strikes 3 blips —
Start break chime falling pings falling E→C low F3 strike falling blips —
Back to work bell rising pings rising C–E–G–C rising A3→D4 rising blips —
Pause / resume — / chime quiet low / high ping soft G4 / C5 — tiny blips —
Button tap — 3.2 kHz tick woodblock — — —

Design rules applied:

  • Start and finish are easy to tell apart without looking; finish is the most noticeable sound in every theme, since it pulls you back after 25 minutes.
  • Breaks get their own direction: falling pitch to relax, rising pitch for back to work.
  • Soft attacks and a gain ceiling of 0.15, so nothing startles mid-focus; "Soft" stays at about a third of that for shared spaces.
  • Taps are near-subliminal, play on any button or link, and are skipped on timer buttons that already make their own sound (data-own-sound).
  • Classic reproduces today's sounds exactly, including silent pause and taps, so nothing changes for existing users.
  • All sounds are synthesized with Web Audio: no audio files, nothing to license.

Menu → Settings → Sounds opens a picker styled like the shortcuts panel: a radio card per theme with a one-line character description and a preview chip for every moment (moments a theme keeps silent are struck through). Choosing a theme plays its start sound; the choice is stored in localStorage.

Testing

  • Lint, typecheck, unit tests and build pass.
  • Instrumented OscillatorNode.start in the browser with Wood selected: a nav button plays the woodblock tap; Start Focus plays only the C–E–G phrase (no extra tap); Pause plays G4; Resume plays C5; the session end plays the finish phrase.
  • Picker renders all six themes, previews play, and the selection persists.

Base automatically changed from fix/notification-replaced-silently to main October 11, 2026 16:58
## Summary
Selectable sound themes. Each theme is a complete set covering every moment, so switching never leaves a gap by accident.

| Moment | Classic (default) | Glass | Wood | Singing bowl | Soft | Silent |
| --- | --- | --- | --- | --- | --- | --- |
| Start focus | E5→A5 chime | E6 ping | C–E–G marimba | C4 bowl | A5 blip | — |
| Finish focus | G5–E5–C5 bell | A6–E6–A5 pings | G–E–C–G…C phrase | two G3 strikes | 3 blips | — |
| Start break | chime | falling pings | falling E→C | low F3 strike | falling blips | — |
| Back to work | bell | rising pings | rising C–E–G–C | rising A3→D4 | rising blips | — |
| Pause / resume | — / chime | quiet low / high ping | soft G4 / C5 | — | tiny blips | — |
| Button tap | — | 3.2 kHz tick | woodblock | — | — | — |

Design rules applied:
- **Start and finish are easy to tell apart without looking**; finish is the most noticeable sound in every theme, since it pulls you back after 25 minutes.
- **Breaks get their own direction**: falling pitch to relax, rising pitch for back to work.
- **Soft attacks and a gain ceiling of 0.15**, so nothing startles mid-focus; "Soft" stays at about a third of that for shared spaces.
- **Taps are near-subliminal**, play on any button or link, and are skipped on timer buttons that already make their own sound (`data-own-sound`).
- **Classic reproduces today's sounds exactly**, including silent pause and taps, so nothing changes for existing users.
- All sounds are synthesized with Web Audio: no audio files, nothing to license.

**Menu → Settings → Sounds** opens a picker styled like the shortcuts panel: a radio card per theme with a one-line character description and a preview chip for every moment (moments a theme keeps silent are struck through). Choosing a theme plays its start sound; the choice is stored in `localStorage`.

## Testing
- Lint, typecheck, unit tests and build pass.
- Instrumented `OscillatorNode.start` in the browser with Wood selected: a nav button plays the woodblock tap; Start Focus plays only the C–E–G phrase (no extra tap); Pause plays G4; Resume plays C5; the session end plays the finish phrase.
- Picker renders all six themes, previews play, and the selection persists.
@ttncode
ttncode merged commit 9d4b6ac into main Oct 11, 2026
2 checks passed
@ttncode
ttncode deleted the feat/sound-themes branch October 11, 2026 17:00
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