What is square wave in music?

What is square wave?

Synthesis & Sound Design

A periodic waveform that alternates between two amplitude levels with an equal high and low duration. An ideal square wave contains odd harmonics and produces a hollow, harmonically rich tone.

What does square wave mean?

A square wave alternates between two levels, spending half of each cycle at each level. This equal high and low duration is a 50 percent duty cycle. An ideal symmetric square wave centered on zero contains the fundamental and odd-numbered harmonics, with harmonic amplitudes decreasing in inverse proportion to harmonic number. Its strong upper components give it a bright but characteristically hollow tone.

Changing the duty cycle produces a pulse wave with a different harmonic pattern. Filtering a square wave changes the balance of its components, and real oscillators have finite transition times and other departures from the ideal. Digital implementations must also control harmonics above the Nyquist limit to avoid aliasing.

Fourier Series of a Symmetric Square Wave

x(t)=4Aπ∑m=0∞sin⁡ ⁣(2π(2m+1)f0t)2m+1x(t)=\frac{4A}{\pi}\sum_{m=0}^{\infty}\frac{\sin\!\left(2\pi(2m+1)f_0t\right)}{2m+1}

For this ideal 50% duty-cycle, zero-mean *bipolar* square wave, A > 0 is the level magnitude (the levels are ±A), f₀ > 0 is the fundamental frequency in hertz, t is time in seconds and m = 0, 1, 2, … numbers the odd harmonics 2m+1. Their sinusoidal amplitudes are 4A/[π(2m+1)]: the fundamental is 4A/π ≈ 1.27324A, the third is 4A/(3π) ≈ 0.42441A, and all even harmonics vanish. At f₀ = 100 Hz the first three components occur at 100, 300 and 500 Hz. Although the fundamental Fourier coefficient exceeds A, the complete series approaches ±A between jumps; at the discontinuities it converges to the midpoint 0. The infinite series is an ideal continuous-time mathematical model. Finite truncation rings near jumps, and sampled oscillators need suitable band limitation or other anti-aliasing techniques.

Examples related to square wave

Common confusions and distinctions

Square refers to waveform shape, not to the square of a signal’s amplitude. A 25 percent duty-cycle pulse is not the same waveform. Distortion or other asymmetric processing can introduce components absent from the original ideal.

Back to the glossary