Skip to content

feat(tone): add a Tone Generator tool (closes #90) - #91

Merged
vibhavkatre merged 1 commit into
developfrom
feat/tone-generator
Aug 6, 2026
Merged

feat(tone): add a Tone Generator tool (closes #90)#91
vibhavkatre merged 1 commit into
developfrom
feat/tone-generator

Conversation

@vibhavkatre

Copy link
Copy Markdown
Collaborator

Summary

A simple Tone Generator built entirely on the Web Audio API — no dependencies, no licensing. Play a continuous pure tone for tuning, testing speakers, or a reference pitch.

  • Frequency by slider or exact hertz (20–20,000), or snap to a musical note + octave (equal temperament, A4 = 440). A live readout names the nearest note and how many cents sharp/flat it is.
  • Sine / square / sawtooth / triangle waveforms, volume, and A4 / 1 kHz presets. Start/stop ramp the gain so there's no click.
  • Pure pitch maths (tones.js) and the oscillator composable are unit-tested (AudioContext injected).
  • Registered as the tone-generator tool. Also removed the search dialog's 20-item cap so every tool stays reachable now that there are 21.

Verification

  • vitest 689 green (90 files; +12 for the pitch maths and generator).
  • Build clean. Verified live on :8100, light + dark: renders correctly; Play↔Stop toggles, snapping to A5 sets 880 Hz, waveform/volume controls work; no console errors. (Audio output itself is silent in headless, but node graph + state are exercised.)

Closes #90

🤖 Generated with Claude Code

A simple pure-tone generator built on the Web Audio API — no dependencies,
no licensing. Play a continuous tone for tuning, testing speakers, or a
reference pitch.

- Frequency by slider or exact hertz (20–20,000), or snap to a musical
  note + octave (equal temperament, A4 = 440); a live readout names the
  nearest note and how many cents sharp/flat it is.
- Sine / square / sawtooth / triangle waveforms, volume, and A4 / 1 kHz
  presets. Start and stop ramp the gain so there is no click.
- Pure pitch maths (`tones.js`) and the oscillator composable are
  unit-tested (the AudioContext is injected).
- Registered as the `tone-generator` tool. The search dialog no longer
  caps its list at 20 so every tool stays reachable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vibhavkatre
vibhavkatre merged commit ca912d0 into develop Aug 6, 2026
@vibhavkatre
vibhavkatre deleted the feat/tone-generator branch August 6, 2026 05:17
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.

Add a Tone Generator (Web Audio, no deps)

1 participant