# Why does a square wave make a sound?

Forgive me for questionining the fundamentals and this question therefore being not very smart, but I am currently beating my head against the concept of sound generation itself.

I understand so far that every sound is generated as a wave and therefore it can only be done by sinus waves and not just passing single constant values to the soundcard. Instead you have to generate the wave at your samplerate and bitrate with frequency and amplitude and then pass that collection to your card to actually get that sound.

So then, why does the square wave make a sound? It's not a wave, it is exactly that which you should not do, namely just alternating fixed values at different frequencies to get different sounds. That's not a wave at all. Is it because square waves are just a mathematical construct and are not possible in nature, so you just get the sharpest waves possible with your hardware?

• Speaker goes forwards, speaker goes backwards; air is moved; sound is generated. May 7, 2021 at 18:27
• Just an additional observation with this - it's not actually the 'plateau's in the square wave that make the sound, it's the transitions between the plateaus. Evidently, the answer that outlines fourier theory is correct, but it is worth remembering that it is the "Change" in pressure that we experience as sound, not an absolute pressure value. Therefore our ears are actually interpreting the changes in pressure (at the plateau transitions) as the sound that we actually hear.
– Mark
Jun 17, 2021 at 3:51

Every wave is a superposition of multiple sine waves – this is essentially what Fourier theorem says.

This article demonstrates how by summing a sine wave with its odd harmonics (thus wave with frequency f with waves with frequencies 3f, 5f, 7f and so on) with appropriate amplitudes results in formation of a square wave.