Pluck a guitar string and you think you hear "one note." In fact you hear a whole stack of notes at once. The string does not merely swing back and forth as a whole — it simultaneously splits into two, three, four segments, each vibrating on its own, at frequencies that are exactly 2×, 3×, 4× … the lowest note (the fundamental). This hidden ladder of higher tones is the overtone series.
You barely notice them, yet your brain always hears them. A violin and a flute play the same A — why can you tell them apart instantly? Because their overtone recipe differs: which overtones are strong, which are weak, is exactly what we call timbre. Pitch comes from the fundamental; timbre from the proportions of the overtones. One note, countless faces.
A string of length $L$ fixed at both ends admits only standing waves whose ends stay still, so the allowed wavelengths are sieved into a discrete ladder, $\lambda_n = 2L/n$, giving frequencies
$f_1$ is the fundamental (the string vibrating as a whole), $n$ the number of segments. The heart of it is one line: the allowed frequencies are integer multiples of the fundamental. The "integer" is no accident — it is forced by the boundary condition that both ends must be motionless.
A free string could vibrate at any frequency; the moment you pin both ends, a continuous infinity of possibilities is sieved into a clean ladder of integers. This is the purest demonstration of "discreteness born from constraint" — and it is the same mathematics as why the energy levels of a hydrogen atom are discrete (wave equation + boundary conditions = eigenvalue problem). Twenty-five centuries ago Pythagoras found that strings in simple integer ratios sound most consonant — the first translation of "pleasing" into "integer," and the spark for the belief that the universe is written in number.
An additive synthesizer literally stacks sine overtones by recipe to build a timbre; an organ's stops switch overtones on and off. Cross over to physics: the energy levels $E_n \propto n^2$ of a particle in a 1-D well, or the modes of a microwave cavity, are the same "wave + boundary = discrete spectrum." A violinist's harmonics — lightly touching the string's midpoint so only even harmonics survive — is a performer operating this mathematics by hand.
Just intonation builds intervals from the simplest integer ratios: the pure octave $2{:}1$, the pure fifth $3{:}2$, the major third $5{:}4$ — the simpler the ratio, the more consonant (exactly because overtones coincide). Perfect-sounding, but here comes the trouble.
Start on one note and stack twelve pure fifths; you'd expect to circle cleanly back to the start, seven octaves up. But $(3/2)^{12} \approx 129.75$ while $2^7 = 128$ — off by a sliver, never closing. That gap is the Pythagorean comma. Mathematics delivers its cruel verdict: you cannot have every fifth pure and the octave close. Not both.
Equal temperament solves it by brute force: divide one octave (frequency ratio $2$) into 12 equal semitones on a logarithmic scale, each with frequency ratio
So the fifth is $2^{7/12} \approx 1.4983$ — close to but not equal to the ideal $1.5$. In the exponent $7/12$, the $7$ is the semitone count of a fifth and $12$ the semitones in an octave. The price is that every interval is slightly out of tune; the reward is that any key sounds equally in tune.
This is the textbook case of mathematical compromise. The beauty of just intonation's $3{:}2$ and a closing octave cannot logically coexist, so humanity chose to spread the error across all twelve tones — none perfect, none ugly. And it works only thanks to a numerical coincidence: $2^{7/12} \approx 3/2$ — in the language of continued fractions, $\log_2(3/2) \approx 7/12$ is its best low-order rational approximation. Bach wrote The Well-Tempered Clavier precisely to celebrate that this compromise let all 24 keys be played at last. Beauty, sometimes, is knowing exactly when to concede.
Every piano, every MIDI stream, every synth patch today lives in equal temperament. A layer deeper lies the continued fraction: the $12$ is not arbitrary — the convergents of $\log_2(3/2)$ give $7/12$, then $24/41$, $31/53$. So 53-tone equal temperament has near-perfect fifths and is far more accurate than 12, yet has too many keys for anyone to use. Mathematics points to which "divisions" are worth trying; engineering and fingers decided 12 would win.
A sound's waveform can be complex to the point of chaos — a voice, a piano, a noisy street. Fourier's astonishing claim: however complex, it can be decomposed into a sum of pure sine waves. Give me a waveform and I can report which frequencies it contains and how much of each.
This is a translation: from "what the sound looks like in time" to "which components it has in frequency." One sound, two views. And it is not just a mathematical game — your cochlea really does this: a coiled membrane whose different positions resonate with different frequencies, a biological Fourier transform. Your very act of "hearing pitch" is, physically, frequency decomposition.
Any waveform $f(t)$ of period $T$ can be written as an infinite superposition of sine waves:
$\omega = 2\pi/T$ is the fundamental angular frequency and $n$ runs over the harmonics. The coefficients $a_n, b_n$ are the inner product (projection) of $f$ with each sine wave — plainly, "how much of this frequency is in the signal."
Sine waves form an orthogonal basis — like the mutually perpendicular $x,y,z$ axes of space, onto which any vector decomposes uniquely. What Fourier did was fit a coordinate system onto the infinite-dimensional "space of functions." This is the same song as the eigenvectors of linear algebra: sine waves happen to be the eigenfunctions of the "differentiate" and "shift" operators, so in every problem of vibration, waves, and diffusion they are the natural protagonists — pick the right basis, and a hard problem collapses into a pile of simple one-dimensional ones.
MP3 / AAC compression: move sound into the frequency domain, throw away the frequencies the ear can't hear, and shrink the file tenfold. The FFT (Fast Fourier Transform) is the beating heart of all digital signal processing — from 5G and medical CT to JPEG images. Spectrograms let you "see" sound, denoising trims specific bands, voiceprint ID uses spectral fingerprints. And your cochlea is nature's prototype of it all.
Why does the octave ($2{:}1$) sound "fused into one," while two adjacent semitones together sound "harsh and clashing"? One explanation: the simpler the frequency ratio, the more the two notes' overtones coincide, the less effort for the ear — the more consonant; the more complex the ratio, the closer the overtones crowd, producing rough beating — dissonance. Consonance traces right back to the integers of Concept 1.
But music's magic goes far beyond "harmony." Truly moving music walks a tightrope between the expected and the unexpected: too predictable = boring, too random = noise. A melody keeps building expectations and then breaking them just enough — that sliver of suspense, satisfied or violated, is emotion.
Consonance correlates roughly with the simplicity of the frequency ratio $p{:}q$ (the Plomp–Levelt roughness curve quantifies this). And musical "surprise" can be captured with information theory: how unexpected a note is, in context, is
$P(x\mid\text{context})$ is the listener's expected probability for the next note given the melody so far. The more unexpected, the larger $-\log P$. The brain's response to this "prediction error" is the very source of aesthetic tension.
Much pleasing music has a power spectrum of loudness and pitch fluctuation that is $1/f$ noise — sitting squarely between "purely regular $1/f^2$" and "purely random white noise." And the same fractal statistics show up in heartbeat intervals, river levels, and DNA sequences. The hint is profound: aesthetic pleasure may be the reward signal the brain issues for "just the right amount of predictability" — not order itself, nor chaos itself, but that narrow edge where the two meet.
The core of algorithmic composition is modeling the conditional probability $P(\text{next note}\mid\text{context})$ — from early Markov chains to today's Transformers. MusicLM and Suno essentially learn this distribution, then sample from it while controlling the "surprise" so it is neither flat nor chaotic. Music recommendation, affective computing, even using music for anxiety intervention, all rest on this "expectation–violation–reward" mathematical chain.