Waveform Sound Comparer
Sine, triangle, square, sawtooth and pulse — same pitch, same loudness. Swap timbre mid-note, morph continuously between any two, carve them with a filter, play them on a keyboard, then see if you can name them by ear.
Listen safely. Volume starts at 25 % on purpose. Square, sawtooth and pulse carry far more high-frequency energy than a sine, so start low and raise slowly, especially on headphones.
The five cards and the transport
- Waveform cards — click any card to select it. If a note is already sounding the timbre swaps instantly on the same oscillator, so pitch and phase carry straight through with no gap and no click. If nothing is sounding, the click starts the note.
- Play / Stop — starts and stops the note. In Blip mode it fires one short note instead of sustaining.
- A/B flip — jumps back and forth between the last two waveforms you used. This is the fastest way to hear a single difference.
- Sustain / Blip — sustain holds the note until you stop it; blip plays about a third of a second and releases.
- Pitch slider — C2 to C6 in semitones. The note buttons jump to common pitches; −Oct, −1, +1, +Oct nudge by an octave or a semitone.
- Volume — the sine-referenced master level, 0–100 %. All notes off silences everything at once; Reset returns every control to its starting value (sine, A4, 25 % volume, 50 % duty, morph off, filter off, octave 4).
Name that wave — the listening game
- New round plays one mystery waveform at a random pitch between A2 and C5, at matched loudness so level is never a clue. Hear it again replays exactly the same tone.
- Press one of the five answer buttons. Score, streak and best streak update as you go, and the accuracy by waveform rows show how often you got each one right — that is where you find out that you are fine on sawtooth and hopeless on triangle.
- Get it wrong and three extra buttons appear: Hear your guess, Hear the answer and A/B them ×4, which alternates the two four times so the difference has nowhere to hide. The feedback line also names the specific harmonic difference between that pair.
- The line under the accuracy rows tracks your most confused pair. Most people find it is triangle against sine, or square against pulse.
- When the answer is a pulse its duty cycle is randomised between 10 % and 35 %, never 50 %, so a pulse is never secretly a square.
- Reset score clears everything. Scores are held in memory for this session only — nothing is stored.
Blend / morph — the space between the waves
- Pick a waveform for Morph from and another for Morph to, then drag the crossfade slider. Engage morph makes that blend the sounding timbre; press it again to go back to the card you were on.
- This is a true crossfade of the Fourier series: all 64 coefficients of the two shapes are interpolated, so the harmonic recipe genuinely travels from one to the other. The blend waveform and its harmonic bars redraw live, and the harmonic readout under them gives the exact percentages.
- Sine → sawtooth is the one to try first: the partials arrive one after another and you hear the tone open up from pure to buzzing without any step.
- Because both end shapes share a phase convention, no fundamental ever cancels; part-way through, individual partials can still partly cancel where the two series disagree in sign, and the bars show that honestly.
- Swap ends exchanges the two and mirrors the crossfade, so the sound does not jump.
Pulse width
- The duty cycle slider runs 5–50 %, with presets at 5, 10, 17, 25, 33 and 50 %. The readout names exactly which of the first ten harmonics the current duty silences.
- Harmonic n has amplitude |sin(nπd)|/n, so every harmonic at a whole multiple of 1/d lands on a zero and disappears: at 25 % duty that is 4 and 8, at 20 % it is 5 and 10, at 50 % it is every even one. The 33 % preset is deliberately a hair off exactly one third, so 3, 6 and 9 come out almost silent rather than truly gone — the readout says so, and the bars show the difference.
- At 50 % the pulse is a square wave, exactly. Not approximately — put the pulse card and the square card side by side at 50 % duty and every bar matches, because |sin(nπ/2)|/n is 1/n for odd n and zero for even n, which is the square series.
- Duty above 50 % is the mirror image of duty below it (the harmonic amplitudes depend on |sin(nπd)|, which is symmetric about 50 %), which is why the slider stops there.
- Hear the pulse selects the pulse card and starts a note so you can drag the duty while it sounds.
Low-pass filter
- A 12 dB/octave low-pass sits across the whole output. Filter on engages it; cutoff runs 80 Hz to 14 kHz and resonance 0–18 dB of peak at the cutoff.
- With the filter on, each harmonic bar splits in two: the solid part is what survives the filter, the pale block above it is what the filter removed. Sweep the cutoff and watch the bars fall over one by one.
- Auto sweep runs the cutoff down and back up over about three and a half seconds, starting a note for you if nothing is playing.
- Do it on a sawtooth and you hear why saw is the classic subtractive-synthesis starting point: a complete harmonic series is a full block of material to carve. Do the same on a sine and almost nothing happens — there is nothing above the fundamental to take away.
- Off does not remove the filter, it parks the cutoff at 20 kHz with no resonance, so there is never a node to rewire in the middle of a note and never a click.
Play it — the keyboard
- One octave of real keys. Press and hold to sustain, release to let go; up to eight notes can sound at once, all in whatever timbre is currently selected, morph and filter included.
- ◀ Octave / Octave ▶ move the whole keyboard, C1 to C7. Play a riff runs a short arpeggio so you can hear the timbre in musical motion rather than as a held drone — a sustained tone tells you the harmonic recipe, a melody tells you the character.
- Computer keys toggles whether your typing plays notes. With it on: A W S E D F T G Y H U J are C up to B, and K is the octave above.
- Changing waveform while keys are held reshapes the held oscillators in place, just like the main note — hold a chord and press 1–5 to hear the timbre change under your fingers.
Touch
- Tap a card to switch. Every card, key and button is at least 40 px tall, all five cards stay on screen at once, and the keyboard fits a phone — nothing scrolls sideways anywhere.
- Drag the pitch, volume, duty, crossfade, cutoff and resonance sliders. Changes apply to the sounding note immediately.
Keyboard shortcuts
- Space play / stop the sustained note.
- 1–5 select sine, triangle, square, sawtooth, pulse · M engage / drop the morph.
- ← → pitch down / up a semitone · ↓ ↑ down / up an octave.
- X A/B flip · B sustain / blip · L filter on / off · N new quiz round · Z C keyboard octave · P all notes off · R reset.
- A/B flip is on X because F is now the F key on the playable keyboard. Turn Computer keys off and F goes back to being the flip.
- These shortcuts are ignored while a slider has focus, so the native slider behaviour still works. Click the widget background first to use them.
What is actually in each wave
- Sine — the fundamental and nothing else. No harmonics at all. This is the definition of a pure tone.
- Triangle — odd harmonics only (1, 3, 5, 7…), amplitude falling as 1/n². The 3rd harmonic is already only 11 % of the fundamental and the 5th just 4 %, so almost nothing survives up high: soft, rounded, flute-like.
- Square — odd harmonics only, amplitude falling as 1/n. The 3rd is 33 %, the 5th 20 %, the 7th 14 %. Strong upper odd partials with every even harmonic missing is exactly what makes it sound hollow and woody, like a clarinet.
- Sawtooth — all harmonics, odd and even, amplitude falling as 1/n. The complete series is why it is the brightest and buzziest of the four: brass and bowed strings.
- Pulse — a square with unequal halves, duty cycle d. Harmonic n has amplitude |sin(nπd)| / n relative to a sawtooth, so every harmonic whose number is a whole multiple of 1/d vanishes. At d = 50 % the even harmonics all vanish and you are back to a square wave.
- The bar charts on the cards are drawn from those exact ratios, harmonics 1 to 10, on a linear amplitude scale. A bar rising from the line is a harmonic that is present; a faint notch hanging below the line is an empty slot, so you can see at a glance which partials are missing. Very faint partials are given a 3 px floor so they do not disappear entirely.
Loudness matching — and why it matters
Comparing timbres is meaningless if one is simply louder. At the same peak amplitude a square or sawtooth is far louder to the ear than a sine, because all that extra harmonic energy sits in the most sensitive part of human hearing. So a fixed per-waveform gain trim is applied here: sine ×1.00, triangle ×0.95, square ×0.50, sawtooth ×0.58, pulse ×0.50 to ×0.62 (the pulse trim rises as the duty narrows, to make up for the fundamental it loses). The volume slider is the sine-referenced level, and the current trim is shown next to the note name. Switching waveform ramps the gain to the new trim over about 25 ms, which is why the swap is smooth rather than a step.
Tips
- Hear the missing even harmonics. Start a sustained note, then A/B flip between square and sawtooth. Same 1/n rolloff, same loudness — the only difference is that the sawtooth has the even harmonics too. The square sounds hollow, the sawtooth full and buzzy.
- Hear the exponent. Flip between triangle and square. Both are odd-harmonics-only, so the difference you hear is purely 1/n² against 1/n — how fast the upper partials die away.
- Watch a pulse become a square. Select the pulse card, sustain a note and drag pulse width up to 50 %. The even harmonic bars shrink to nothing and the tone turns hollow.
- Low notes make harmonic differences easier to hear, because more of the series lands inside your hearing range. Try C3 or C2.
- Hear a harmonic arrive. Set the morph to sine → square on a low note and creep the crossfade up from zero. The 3rd harmonic comes in first and you can hear the exact moment the tone stops being pure.
- Find out what you actually can't hear. Play ten quiz rounds before reading the accuracy rows. Almost everyone is near-perfect on sawtooth and shaky on triangle against sine, because the triangle's only real evidence is an 11 % third harmonic.
- Why saw is the synth default. Select sawtooth, turn the filter on, push resonance to about 12 dB and hit Auto sweep. Then do exactly the same on the sine card. The saw has ten bars to knock down; the sine has one.
- Play a tune with it. Hold a chord on the keyboard and press 1 to 5. The chord keeps ringing and only the timbre moves, which is a far better test of character than any single held note.
Only the fundamental — a single partial with nothing above it. This is the sound of one pure frequency, with nothing to make it buzz.
Matched loudness. Each waveform carries a fixed gain trim — sine ×1.00, triangle ×0.95, square ×0.50, sawtooth ×0.58, pulse ×0.50–0.62 — so square and saw are not painfully louder than sine. When you switch, only the timbre changes. The bars show harmonics 1–10 at their true relative amplitudes; a small notch below the line means that harmonic is absent.
Pitch A4 · 440.0 Hz
Pitch is 12-tone equal temperament, A4 = 440 Hz. Changing pitch while a note sounds glides it in 20 ms rather than restarting.
Level 25 %
This is the sine-referenced level. Every waveform then gets its own equal-loudness trim on top, so square and sawtooth are not painfully louder than sine. 25 % is a deliberately safe start on headphones.
Pulse width 50 %
Harmonic n has amplitude |sin(nπd)|/n.
Blend / morph Sine → Sawtooth · 0 %
Morph from
Morph to
The blended shape and its harmonics 1–10, live.
The morph is a true crossfade: every one of the 64 Fourier coefficients is interpolated, so the harmonic content really does travel between the two shapes rather than two sounds simply overlapping. Drag slowly on a low note and you can hear individual partials arrive.
Low-pass filter Off
A 12 dB/octave low-pass. With the filter on, the harmonic bars split: the solid bar is what survives the filter, the pale block above it is what the filter has taken away. Sweep it across a sawtooth and you hear why saw is the classic synth starting point — there is a full harmonic series there to carve. Do the same on a sine and almost nothing happens, because there is nothing above the fundamental to remove.
Play it Sine · octave 4
Hold a key and it sustains; let go and it releases. Up to eight notes at once, all in the timbre currently selected — including a morph or a filtered saw. A held tone tells you the harmonic recipe; a melody tells you the character.
Name that wave Not started
A mystery waveform plays at a random pitch, at matched loudness. Name it. When the pulse is the answer its duty is always well away from 50 %, so it is never secretly a square.
Accuracy by waveform
Play a few rounds and this line will tell you which pair you mix up most.
Everything you hear is generated live by the Web Audio API — a single oscillator whose type is changed in place, never torn down and restarted, so an A/B swap is seamless. Audio starts only after your first tap, click or key press.
Hear how different classic synthesizer wave forms sound in this wave comparator. Clicking your mouse on the onscreen keyboard plays the note. Alternatively, you can use your computer keyboard to play notes too.
It is designed for quick A/B comparisons, allowing you to hold down a key and flip between tones immediately. As it appears on screen, the keyboard is mapped across the centre row of your computer keyboard. Pressing the ‘A’ key plays the note ‘A’, continuing through to the ‘J’ key. In fact, as you might expect, the white notes play a typical C major scale. Each of the black keys corresponds with the key directly above it; W plays the sharp version of that key. The same applies to the remaining black keys: E, T, Y, and U. This arrangement places your hands in a natural place from which you can further explore the sound.
How to Use the Wave Comparator
The row of waveform cards at the top contains different tone generators. You just need to click on each card to change current wave shape. You then hear that sound. The selected waveform is highlighted to let you know which one is being played. If you want to hear your last selection again with the A/B flip button, you just click there too to make an easy comparison. It’s all about spotting the slight changes in texture and brightness.
Another thing about the pulse wave card is that it has a duty cycle slider. The duty cycle will adjust the width of the pulse, greatly changing the harmonics. Narrowing down the duty cycle makes the sound more nasal and thin. If we get all the way to 50%, then the pulse wave will be exactly like a square wave. That’s a cool way of seeing just what the relationship between these two forms is.
You can crossfade between two waveforms using Morph mode. You can choose your starting and ending waves from the pick list and turn on the morph toggle. Then use the slider to transition gradually from first sound to the second. It’s really great for listening to what happens as you morph from a smooth sine wave into something brighter like a sawtooth, or vice versa.
Finally, there is the filter section that adds a low-pass filter to the mix. When you turn this on you add a resonance and cutoff frequency. By using the slider you can control the cutoff manually to reduce higher frequencies. If you want something a little more dynamic then hit the auto sweep button. This will cause it to automatically sweep from low to high and back again. You will hear how the brightness of the sound changes as a result.
What about the blip and sustain buttons? These alter how notes play. Blip mode plays each key press as a short, percussive note with a quick fade-out. Sustain mode holds each note while your finger remains on the key. Perfect if you want to tap out a riff or rhythm pattern without having any notes overlapping.
There are options for tuning your sound, including volume and the pitch controls. These allow you to adjust the sound to your liking. The volume slider allows for a change in overall output volume. Similarly, the pitch range slider alters base note of the keyboard. If a certain tune is sounding higher or lower than you would like in this setting, then press on the up/down octave buttons to move the whole range of keys.
It has a test your ear option too: this plays a single note from a mystery waveform each time you play a round. From these rounds you need to click on the waveform button that matches what you’ve just listened to and get it right. The quiz explains and gives feedback. For example, it helps you hear how certain timbres has even harmonics or how they roll off.
For example, hold down more than one key at once and try to play some chords. Polyphony is supported by this widget, which means that you can listen to combinations of different waveforms played harmonically. Hold a chord down and experiment with the filter sweep: notice how it changes brightness of the sound. Alternatively, use the computer keyboard to play longer phrases more easily.
A detailed breakdown of what each wave form represents can be found in the help panel. If you’re curious as to the characteristics of each sound (what you hear), and its mathematical properties (why those specific harmonics are there or not) click on the help button to access a helpful guide that breaks this down for all five wave forms: sine, triangle, square, sawtooth, and pulse.
Go full-screen for an even better experience. Why? Because it removes all distractions, so you can focus on the keyboard and waveforms. Great when you’re sharing your screen or using a smaller device. Fullscreen mode doesn’t take anything away from the interface. Clicking on the reset button will return the settings back to default. This is useful if you’ve been tinkering with lots of controls and need to clear them out so you can start from scratch again (or show someone else how it works).
To begin, click on a couple of the waveform cards and listen to the different sound of each. The sawtooth sounds buzzy and rich, whereas the sine wave is purer and smoother. You can then flip between the two using the A/B button and listen to them side-by-side. When you’re feeling confident, experiment with morphing two waves together, listening as they change from one to another in real time.
You should of tried it for yourself. It is naturaly a great experience. The moddern sounds are luxurius. Dissapears all your worries when you play.