Add Metronome tool - #9
Merged
Merged
Conversation
A single-file, fully offline metronome for the Focus / Rhythm category. - Accurate Web Audio scheduler (lookahead timing) — no audio files, so it works under the app's strict CSP with nothing loaded over the network. - Tempo 40–240 BPM via slider, +/- steps, and tap tempo, with Italian tempo markings (Largo … Prestissimo). - Selectable beats per measure (1/2/3/4/6) with an accented downbeat. - Swinging pendulum + beat lights, volume control, spacebar start/stop. - State (BPM, beat, volume) persists in a namespaced localStorage key. - Follows the Hillnote design system: azure primary, mist canvas, Manrope display, 24px card radius. Respects prefers-reduced-motion. Registered in tools.json and bumped catalogVersion to 20. Added the 800x500 catalog screenshot. `npm run validate` passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TkFJkP998Dczd14Bx5vBWb
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 is this tool?
Metronome — a single-file, fully offline metronome for the Focus / Rhythm category. Set a tempo, choose a beat, and practise to an accurate click. It's for musicians, but also anyone who works or focuses better to a steady pulse. Nothing in the catalog currently covers rhythm or tempo, so this fills a clear gap in the "fun / focus" space.
Highlights:
+/−steps, and tap tempo, with Italian tempo markings (Largo … Prestissimo).localStoragekey (metronome:v1).prefers-reduced-motion.Checklist
metronome/index.htmlwith all CSS + JS inline.fetch, orimport(audio is synthesised in-browser via the Web Audio API).screenshots/metronome.webp(vianpm run screenshot metronome).tools.json(dirmatches the folder name).catalogVersion(19 → 20).version: 1.npm run validatepasses locally (26 tools, catalogVersion 20).Notes for reviewers
setIntervaltick (25 ms) schedules audio events ~120 ms ahead againstAudioContext.currentTime, so tempo stays accurate even if the main thread is busy. Visuals (beat lights, pendulum) are driven off the same scheduled-note queue inrequestAnimationFrame, so they stay in sync with the audio rather than drifting.ambient-soundsproduces sound without any network egress.Generated by Claude Code