Waves & Signals · Waves & Signals
From Theory to Practice - Mathematical and Digital Representation of Sound (Conceptual Intro to Fourier Series)
Explanation
The Intuition: The Secret Behind Timbre
In the world of electronic music and sound synthesis, we encounter various wave shapes beyond the pure sine wave: square waves, sawtooth waves, and triangle waves. A pure sine wave sounds hollow and clean (like a tuning fork), whereas a sawtooth wave sounds rich, bright, and buzzy. Why is that?
The remarkable answer, discovered by mathematician Jean-Baptiste Joseph Fourier, is that every periodic signal is actually composed of a (usually infinite) collection of pure sine and cosine waves at frequencies that are integer multiples of the fundamental frequency. These additional frequencies are called harmonics or overtones. The specific distribution of energy among these different harmonics defines the unique "timbre" (sound quality) of an instrument or a synthesizer.
The Mathematical Foundation: Orthogonality of Trigonometric Functions
To decompose a complex signal into its constituent sine waves, we need a powerful mathematical tool: the inner product of functions. Much like geometric vectors in a plane are orthogonal if their dot product is zero, we define the inner product between two continuous functions and over a closed interval via a definite integral:
The Fundamental Orthogonality Theorem:
For a fundamental angular frequency , the set of trigonometric functions:
is an orthogonal set over the interval . That is, for any :
1.
2.
3.
When , integrating the squared terms yields the norm of the functions:
Fourier's Theorem (Dirichlet Convergence Conditions)
Theorem: Let be a periodic function with period . If satisfies Dirichlet's conditions on the interval :
1. It is piecewise continuous (having at most a finite number of discontinuities of the first kind).
2. It has a finite number of local extrema (maxima and minima).
3. It is absolutely integrable over a single period.
Then, the series converges:
- At points of continuity of :
- At a jump discontinuity : the series converges to the average of the one-sided limits , not necessarily to .
By virtue of orthogonality, we can extract the coefficients () directly by projection (multiplying by the basis function and integrating):
Transitioning to the Digital Domain (Sampling and Quantization)
Inside a computer or an audio interface, sound cannot be stored as a continuous, infinite function . It is converted into a digital signal through two key steps:
1. Sampling: Measuring the amplitude of the wave at fixed time intervals . According to the Nyquist-Shannon Sampling Theorem, to preserve all information of a signal containing a maximum frequency component , one must sample at a rate . (This is why CD audio is sampled at 44.1 kHz, safely capturing the human hearing range which extends up to 20 kHz).
2. Quantization: Converting the continuous amplitude value into a discrete binary number with a fixed bit-depth (e.g., 16-bit or 24-bit), which dictates the dynamic noise floor of the digital audio.
> UI Visualization Suggestion: We recommend an interactive wave-synthesis widget displaying an ideal square wave. The user is provided with a slider to select the number of active harmonics () contributing to the sum. When , only a single sine wave is rendered. As increases (e.g., ), the user will observe how adding these distinct sine components progressively shapes the sharp corners of the square wave, while noting the persistent ripples near the discontinuities (Gibbs phenomenon).
Interactive Visualization
Loading visualization
Worked Examples
Practice
Exercise 1 of 5
1
If the fundamental frequency of a sound signal (the first harmonic) is 440 Hz (the musical note A4), what will be the frequency of the third harmonic in this signal?
★Quiz
Test your knowledge from this lesson
A mix of questions from the lesson — each attempt varies slightly
Answer at least 4 out of 5 questions correctly to pass (70%)