Sine vs Square Wave: Why the Same Pitch Sounds Different

PublishedToolAudio Frequency Tone Generator

Contents
  1. The problem
  2. The solution: every waveform breaks down into a sum of harmonics
  3. Common stumbling blocks
  4. Wrap-up
  5. FAQ

Play the same 440Hz (the note A, A4) and a sine wave, square wave, and sawtooth wave all sound completely different. Only one thing sets the pitch: the fundamental frequency, or how many times the wave vibrates per second. But how many harmonics are mixed into that waveform, and in what proportions, is what changes the texture of the sound (its timbre). Once you understand that harmonic structure, you can explain why a sine wave and a square wave at the same frequency sound like entirely different instruments.

Summary ① Pitch is set by one thing: the fundamental frequency (how many times it vibrates per second). Timbre is set by the makeup of the harmonics layered on top of it. ② A sine wave is the purest single-frequency tone, with no harmonics at all. A square wave contains only odd harmonics, and a sawtooth wave contains every integer harmonic, which is why they sound much denser and sharper. ③ With a tone generator, you can hold the frequency fixed, switch only the waveform, and compare the oscilloscope trace and the sound side by side.

The problem

You'll find the fact that "440Hz is the note A (A4)" in music theory books and tuner apps. But when you switch a synthesizer's waveform from sine to square, the frequency number stays the same and the sound becomes a completely different instrument.

When you're building game sound effects or synthesizer presets, or checking how a piece of audio gear reproduces sound, you often wonder, "Why does the same Hz sound so different depending on the waveform?" A single frequency number doesn't explain it.

The trouble starts with confusing "pitch" and "timbre" as the same concept. If you can't tell them apart, it's hard to see why waveform choice is such an important variable in sound design.

The solution: every waveform breaks down into a sum of harmonics

According to the principle laid out by the French mathematician Fourier, any periodic waveform that isn't a sine wave (square, sawtooth, triangle, and so on) can be broken down into a sum of sine waves whose frequencies are integer multiples of the fundamental frequency (f). These integer-multiple frequency components are called harmonics.

Harmonic content by waveform

  • Sine: No harmonics. It consists of a single fundamental-frequency (f) component — the purest and smoothest waveform in theory.
  • Square: Contains only the odd multiples of the fundamental (f, 3f, 5f, 7f…), and each harmonic's amplitude falls off gradually in inverse proportion to its order (n), as 1/n. Only the odd harmonics stand out, giving a somewhat hollow, lead-instrument-like timbre.
  • Sawtooth: Contains every integer multiple of the fundamental (f, 2f, 3f, 4f…), with amplitudes also decaying as 1/n. Because the even harmonics are in there too, the harmonics are denser than a square wave's, giving a brighter, rougher timbre.
  • Triangle: Same odd-harmonic makeup as a square wave, but the amplitudes drop off much faster, as 1/n², so high-order harmonic energy is small and the sound is the smoothest, closest to a sine wave.

To sum up the structure: no harmonics at all (sine wave) sounds the smoothest, and the more harmonics there are and the more slowly they fall off (square and sawtooth), the sharper and more aggressive the sound is perceived to be. Just writing out the frequency and relative amplitude of each harmonic on paper is enough to see why the spectrum shape differs from waveform to waveform.

Try our tone generator and hear and see the difference for yourself.

Audio Frequency Tone Generator

Free · No sign-up · Real-time tone playback for each waveform with oscilloscope comparison

Common stumbling blocks

SituationCause
You press play and the sound starts very quiet, then slowly fades inIt's working as intended — the volume ramps up over about 0.05 seconds to prevent a click/pop noise at the moment playback starts
You press stop and the sound doesn't cut off right away; a little tail remainsEven when stopping, it fades out over about 0.04–0.05 seconds before going fully silent to avoid a click noise
The volume (%) value stays the same, but switching to square or sawtooth sounds much louder and sharperThe waveform's peak amplitude is the same, but the more harmonic energy there is, the louder and more aggressive the human ear perceives it
Presets near 20Hz or above 15,000Hz are hard to hearBesides the limits of your speakers or headphones, each person's upper and lower audible-frequency limits differ, which produces this difference

Wrap-up

Even at the same 440Hz, sine, square, sawtooth, and triangle waves sound different because the number of harmonics layered on the fundamental frequency — and how fast they decay — differs for each waveform. Click through the waveform buttons one at a time and compare how the sound and the oscilloscope trace change while the frequency stays fixed; the structure becomes much clearer that way.

Audio Frequency Tone Generator

Free · No sign-up · Real-time tone playback for each waveform with oscilloscope comparison

FAQ

A triangle wave has the same odd harmonics as a square wave, so why does it sound so much smoother?

Both waveforms are made of odd harmonics (f, 3f, 5f…), but the harmonics decay at different rates. In a square wave, harmonic amplitude falls off slowly, in inverse proportion to the order (1/n), while in a triangle wave it falls off much faster, as 1/n². As a result, a triangle wave has almost no high-order harmonics left, so it sounds smooth and close to a sine wave.

Why do people say a sawtooth sounds like brass or strings, and a square wave sounds like a clarinet?

Real instrument timbres are far more complex, since the resonator's structure and the way it's played both come into it. Looking at harmonic content alone, though, the dense integer-harmonic spectrum of a sawtooth resembles the rich harmonics of brass and strings, and the odd-harmonic structure of a square wave resembles the spectral character of a clarinet. That's why these are common analogies when approximating synthesizer timbres. It doesn't mean the sounds reproduce real instruments exactly.

Is there anything to watch out for when playing sound with a tone generator?

It's safest to start at a low volume and turn it up gradually as you check. In particular, playing high- or low-frequency tones at high volume for a long time can strain your speakers, headphones, or ears, so we recommend comparing in short bursts, several times.

This article was adapted from our Korean original. Read the Korean original

Related articles

  1. Web Audio API latency: why a drum pad sounds instantlyWhy a drum pad makes sound the moment you click: how the browser's Web Audio API synthesizes waveforms on the spot instead of loading audio files.
  2. GIF File Size Explained: Why 256 Colors Make GIFs So BigGIFs store every frame in full at 256 colors. See why that makes files huge, and how converting to MP4 or WebM cuts the size.
  3. Twitter (X) Video Download Not Working: What to CheckMost X videos fail to save because the account is private or the post was deleted, not because of the tool. How quality variants and GIF tweets really work.
  4. Why YouTube MP3 Audio Sounds Worse: The Re-Encoding TrapWhy YouTube MP3 downloads sound worse than the video, how lossy re-compression works, and how to save the original M4A or OPUS audio without it.
  5. YouTube 1080p Download Has No Sound: Why and How to FixWhy a 1080p YouTube download plays with no sound: the quality list shows only 360p has audio. How to check each file and add sound to higher quality.
  6. Video Download Sites: Why Some Links Work and Others Don'tSome video download sites work with X, Vimeo, Twitch and Bluesky; others fail on Instagram, TikTok, Facebook, Threads and Reddit. Here's why.

Related tools