Waveform Generator (Oscillator)
Play and plot sine, square, sawtooth and triangle waves from 20–20000 Hz in your browser, and download the WAV.
What the oscillator plays and plots
One periodic wave — sine, square, sawtooth or triangle — at the frequency and duration you set, synthesised sample by sample in this tab. Press Play and the samples reach your speakers through a WebAudio graph built on that tap; the same samples draw the canvas plot and encode the WAV download, so what you hear, what you see and what you keep are one buffer.
How to use it
Pick the wave type, drag the frequency (20–20000 Hz) and the duration (0.1–5 s) sliders, then press Play. Download WAV keeps the exact buffer as a 16-bit PCM file. A frequency outside the hearing band is refused with the band named — never silently clamped to something you did not ask for.
Worked example
Sine at 440 Hz for 1 s at 44 100 Hz sample rate synthesises exactly 44 100 samples; the plot draws one full period every 100 samples near the left edge, and the download is the same buffer with a 44-byte WAV header. A square wave at the same settings carries the same pitch with visibly steeper edges on the plot.
Why it runs in your browser
Synthesis, playback, plotting and WAV encoding all happen in this tab — there is no audio backend to call. A browser without WebAudio says so on the page and refuses playback; the plot and the download keep working, because neither needs an audio device.
The page synthesises one wave — sine, square, sawtooth or triangle — and plays it on your tap.
The same samples draw the canvas plot and encode the WAV download.
Frequencies outside 20–20000 Hz are refused with the band named, never clamped.
Shape, pitch, length
Pick the wave type, drag the frequency and duration sliders, then press Play: the graph is built on that gesture, which is the only way browsers allow audio to start. The plot draws the buffer while it plays, so steep square edges and smooth sine curves read at a glance.
Download WAV keeps the exact buffer as 16-bit PCM with a 44-byte header — what you hear, see and keep are one synthesis.
- Four wave types
- Frequency 20–20000 Hz
- Duration 0.1–5 s
Refusals name the setting
A frequency below 20 or above 20000 Hz names the hearing band instead of bending your setting into something nearby. A non-positive duration or sample rate is refused the same way.
Without WebAudio the page refuses playback and says why; the plot and the download stay available, because silence from the speakers is not silence from the page.
How to use the oscillator controls
Pick the Wave type, Sine, Square, Sawtooth or Triangle, drag Frequency from 20 to 20000 Hz and Duration from 0.1 to 5 s, then press Play: the samples reach your speakers through a WebAudio graph built on that tap. The same samples draw the canvas plot while they play.
Press Download WAV to keep the exact buffer as a 16-bit PCM file. A frequency outside the hearing band is refused with the band named, never clamped to something you did not ask for.
What to Expect
Best for
- Hearing what a waveform sounds like
- Plotting a tone for a lesson
- Downloading a test WAV
Not ideal for
- Recording or analysing audio
- Mixing multiple tracks
- Ultrasonic or infrasonic work
What this tool keeps
- One buffer for play, plot and file
- The exact frequency you set
- 16-bit PCM in the download
What may need cleanup
- Speaker response, which colours any tone
- Plot resolution on very long buffers
- Autoplay policies, which require the tap
Common errors
- Expecting recording features
- Setting a frequency past the band
- Reading the plot as calibrated dB
Example use cases
- Playing sine 440 Hz for 1 s
- Comparing square and sawtooth edges
- Downloading a test tone
Sample input
Sine, 440 Hz, 1 s at 44 100 Hz.
Sample output
44 100 samples played, plotted and downloadable as WAV.
Who this is for
- Students meeting waveforms
- Musicians needing a reference tone
- Teachers demoing synthesis
Frequently asked questions
Is the sound I hear uploaded anywhere?
No. The samples are synthesised in this tab and played through a WebAudio graph built on your tap — no audio backend is ever called.
What if my browser has no WebAudio?
The page says so and refuses playback with the reason named. The canvas plot and the WAV download keep working, because neither needs an audio device.
Why are frequencies outside 20–20000 Hz refused?
That is the hearing band the sliders cover. A clamp would silently play something you did not ask for, so the page refuses with the band named instead.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.