RUDO Learning Hub · Signal Lab · zero install · works with the Wi-Fi off

Fourier Explorer

You said: "Not slower or faster, but more — I want to learn more about the Fourier." Here it is. The whole idea fits in one sentence, and then takes a lifetime to use: every complicated sound is secretly made of simple waves added together. This page lets you add them, hear them, and take them back apart.

How to use this page

Nothing here autoplays. Every sound has a Play and a Stop, and the volume is kept deliberately low. Move a slider and the drawing changes immediately — that is the point: you are not reading about waves, you are steering them.

1 · One wave

Start with the simplest sound there is: a sine wave. It has only two things you can change — how fast it wiggles and how big the wiggle is.

220 Hz
0.70

Period T = 1/f = 1/220 s = 4.545 ms  ·  the window above is 20 ms wide, so you should see about 4.4 cycles

2 · Adding waves (superposition)

Here is the entire mechanism, and it is almost insultingly simple: adding waves means adding heights at every moment in time. At each instant, take wave 1's height, plus wave 2's height, plus wave 3's — that sum is the new wave. Nothing more clever is happening.

200 Hz
0.80
400 Hz
0.45
600 Hz
0.25

A   B   C   — the three parts, drawn small

A + B + C   — the sum, which is the sound that actually reaches your ear

Tip: set A and B to almost the same frequency and listen. The slow throbbing is called beating — the two waves drift in and out of step. Beat rate = the difference in Hz.

3 · Build a sound — why a flute is not a violin

Real instruments never make a single sine wave. They make a fundamental (the note you name) plus harmonics — extra sine waves at exactly 2×, 3×, 4×… the fundamental frequency. Same note, different harmonic recipe, completely different instrument. That recipe is what we call timbre.

440 Hz
1.00
0.00
0.00
0.00
0.00
0.00

Same note, different harmonics → different timbre. That is why a flute and a violin playing the same A both sound like A, and yet you would never confuse them. The flute is nearly a pure fundamental with a whisper of 2f. The violin is a bonfire of harmonics — a bow scraping a string re-excites it hundreds of times a second, and every one of those kicks pours energy into the higher multiples.

Notice what the odd harmonics only preset looks like: it starts squaring off. Keep adding odd harmonics with amplitude 1/n and you converge on a perfect square wave. That is a Fourier series, built by hand, by you.

4 · Take one apart (the actual Fourier problem)

Adding waves is easy. The hard direction — the one that has a mathematician's name on it — is going backwards: here is a messy wave, what simple waves is it made of? Try it. A mystery sound is hiding below, built from harmonics of 200 Hz. Move your guess sliders until your wave matches it.

mystery   your guess

0.50
0.50
0.50
0.50

match: —

5 · Where this is hiding in your day

Every one of these works by moving into the frequency domain, doing something easy there, and coming back. That move is the trick. The thing you do in the middle is usually almost trivial.

MP3 / AACSplit the sound into frequencies, then throw away the ones your ear cannot hear behind louder neighbours. Ten times smaller, still sounds fine. The deleting is easy; the splitting is Fourier.
JPEGSame idea in two dimensions. Each 8×8 block of pixels becomes a mix of spatial frequencies; the fine ones get rounded off. Over-do it and you see the blocky mush — that IS the discarded high frequencies.
Noise-cancelling headphonesA microphone hears the frequencies of the engine drone. The headphone plays those same frequencies upside down. Adding waves, on purpose, to reach zero.
Wi-Fi and 5GYour data is not sent on one frequency but sliced across hundreds of them at once (OFDM). Deciding what goes where — and reading it back — is a Fourier transform running thousands of times a second in your phone.
MRIThe scanner never photographs you. It measures signals in the frequency domain and transforms them into an image. The picture your doctor holds is the output of a Fourier transform.
Song recognitionAn app does not compare audio. It takes the spectrum, marks the loudest peaks, and matches that constellation of points. Robust to noise, because noise rarely lands on the same peaks.
CT scannerAn X-ray tube circles you and records roughly a thousand flat shadow-projections per rotation. The Fourier slice theorem says the 1-D transform of each shadow is one radial line through the 2-D transform of your body. Enough lines fill the plane; transform back and you have the slice. There is no lens anywhere in a CT scanner — the picture is built entirely in the frequency domain.
Earthquake early warningJapan and California do not wait for the shaking. The harmless P-wave travels at about 6 km/s, the destructive S-wave at about 3.5 km/s, so the P-wave arrives first. The first ~3 seconds of it are transformed to find its dominant period: long period means a big rupture. That one frequency estimate, made in seconds, is what stops the trains.
Radio astronomyA dish array never forms an image directly. Each pair of dishes measures one point of the 2-D Fourier transform of the sky. ALMA's 66 antennas give 66×65/2 = 2,145 pairs, and Earth's rotation drags each pair across more of the plane. The image is the inverse transform of those samples — "we photographed a black hole" really means "we finally had enough Fourier coefficients".
Guitar tunerA tuner needs about 1 cent of accuracy. On the low E string (82.41 Hz) one cent is 0.048 Hz — and plain spectrum bins are spaced sample-rate/N apart, so 0.048 Hz resolution would need ~926,000 samples, about 21 seconds of held note. Nobody holds a note that long. So tuners take the coarse peak from the transform and then interpolate between bins. The frequency domain gets you most of the way, not all of it.
JPEG, in actual numbers

Your photo is cut into 8×8 pixel blocks — 64 numbers. A DCT (the Fourier transform's close cousin, built from cosines only) turns those 64 numbers into 64 coefficients: how much flat grey, how much slow gradient, how much fine checkerboard. Nothing is lost yet. 64 in, 64 out, perfectly reversible.

Then comes the only lossy step in the entire format: divide each coefficient by an entry in a quantisation table, and round to a whole number. In the standard table the divisors run from 16 in the top-left corner (flat, slow stuff — where your eye is fussy) to 99 in the bottom-right (finest checkerboard — where your eye is not). A fine-detail coefficient of 40, divided by 99, rounds to 0. Gone, permanently. Drag the quality slider down and every divisor is scaled up, so more of the block rounds to zero — and long runs of zeros compress to almost nothing.

Which is the point worth carrying out of this whole section: the transform is not the compression. The transform is what makes the throwing-away safe to do. Same move every time — go to the frequency domain, do something almost trivial, come back.

6 · Draw a wave — then read back what you made it out of

Up to now the recipe was always handed to you. Here it is the other way round: you draw any shape you like, and the page works out the ingredients. Drag your finger or mouse across the pad below and scribble. Anything — a ramp, a spike, your initials, nonsense. The bars underneath are the answer to "what sines is that made of", computed the honest slow way (a discrete Fourier transform, 256 samples, no shortcuts).

what you drew   rebuilt from the first 24 harmonics only

FREQUENCY DOMAIN — the strength of each harmonic of 220 Hz, measured from your drawing

recipe: —

Watch the red curve while you draw. It is not a copy of your line — it is only the first 24 sine waves, added up. Where your drawing is smooth, red sits right on top of black. Where you drew a sharp corner or a vertical cliff, red wobbles and refuses to keep up. That gap is the entire story of this page: sharp things need high frequencies, and 24 of them is not enough for a cliff.

Draw a narrow spike and look at the bars: almost every harmonic lights up, all at similar heights. Draw one slow smooth hump and only the first two or three bars survive. A spike in time is spread out in frequency; a spread-out thing in time is a spike in frequency. That trade is not a coincidence — it is a theorem, and physicists meet it again as the uncertainty principle.

Note on what "play what you drew" actually does: it fires up one sine oscillator per bar, at the height of that bar, and ignores phase entirely. Your ear barely hears phase, so it still sounds like your drawing — but the red curve on the pad does use phase, which is why it matches your shape so much better than a phase-free rebuild would.

7 · Squares out of sines — and the overshoot that never leaves

Fourier's claim was that any repeating shape can be written as a sum of sines. A square wave is the rudest possible test of that claim: it is flat, then it jumps, instantly. Sines are the smoothest things in mathematics. Watch them do it anyway.

odd n, 1/n
5 terms

the target shape   your partial sum   the overshoot band

—

The recipes, exactly. Every number below is a fraction, not an approximation:

square = (4/π) · [ sin(x) + sin(3x)/3 + sin(5x)/5 + sin(7x)/7 + … ] — odd harmonics, amplitude 1/n
saw = (2/π) · [ sin(x) − sin(2x)/2 + sin(3x)/3 − sin(4x)/4 + … ] — every harmonic, amplitude 1/n
tri = (8/π²) · [ sin(x) − sin(3x)/9 + sin(5x)/25 − sin(7x)/49 + … ] — odd harmonics, amplitude 1/n²

Slide the terms up and listen as well as look. The square and the sawtooth both fall off as 1/n — slowly — which is why they still sound bright and buzzy at 30 terms. The triangle falls off as 1/n², four times faster per octave, and sounds almost as soft as a flute. How fast the harmonics die tells you how sharp the shape is. A jump gives you 1/n. A corner gives you 1/n². Something perfectly smooth dies faster than any power of n.

The interesting part

Push the square wave up to 30 terms and look hard at the corner. The wiggles get narrower — they crowd in towards the jump and vanish everywhere else. But the height of the first wiggle does not shrink. It parks at about 8.95% of the jump and stays there. Ten terms, a thousand terms, a billion: still 8.95%.

This is the Gibbs phenomenon, and it caught out very good people. The physicist Albert Michelson built a mechanical harmonic analyser in the 1890s, fed it a square wave, and got the overshoot on paper. He assumed his machine was faulty. It was not — the mathematics really does that. Josiah Willard Gibbs explained it in 1899. (Henry Wilbraham had already found it in 1848 and been ignored, which is its own kind of lesson.)

The exact number is not 9% by coincidence. The partial sum's peak converges to (2/π)·Si(π) = 1.178980 times the half-jump, where Si is the sine integral. Overshoot above the target = 0.178980 of the half-jump = 8.9490% of the full jump. The readout above measures it live from the actual partial sum, so you can watch it settle onto that number rather than take my word for it.

Now switch the target to triangle and try to make it overshoot. You cannot. A triangle has corners but no jump — the shape never teleports — and the overshoot lives entirely at jumps. The partial sum climbs towards the triangle from underneath and never passes it. Same mathematics, different shape, completely different behaviour: that is the kind of thing worth asking "what assumption changed?" about.

Practical bite: Gibbs is why over-sharpened photos get bright halos at hard edges, and why a clipped, brutally filtered audio signal can "ring" around a transient. Real engineers do not defeat it, they dodge it — they smooth the recipe (window it) and accept a slightly blurrier edge in exchange for no ringing.

8 · Deep dive — the sentence with symbols in it

Open this when you want the real notation (you do)

Everything you just built by hand is this line:

f(t) = a₁·sin(2π·f·t + φ₁) + a₂·sin(2π·2f·t + φ₂) + a₃·sin(2π·3f·t + φ₃) + …

Reading it left to right, in English:

The claim Fourier actually made is bolder than the equation looks: any repeating wave — no matter how jagged — can be written this way, with the right list of aₙ. Not approximately. Given infinitely many terms, exactly.

And the sequel, which is where computers come in: finding the aₙ from a recorded wave naively costs about N² multiplications. For N = 44,100 samples — one second of CD audio — that is roughly two billion operations, per second of sound. There is an algorithm called the FFT (Fast Fourier Transform) that does the same job in about N·log₂N ≈ 700,000. That is a factor of ~2,800 — and it is why your phone can do this in real time while you walk. Same mathematics, different cost. You have met this shape of argument before, in Amdahl: the interesting question is rarely "can it be done" but "what does it cost, and where does the cost hide".

FFT is the next module. Everything you just did by hand is what it does, quickly.

9 · Research corner

Five questions with no answer key. Not homework. Pick whichever one annoys you most, go read, and bring what you find.

  1. Why can you pick one instrument out of an orchestra? All those sounds add into a single pressure wave before they reach you — one wiggling number. Your ear somehow un-adds it. What does the cochlea do that makes this possible, and why is it fair to call it a biological spectrum analyser?
  2. What does pure noise look like in the frequency domain? Make a prediction before you look it up. Then find out what "white noise" and "pink noise" mean, and why the second one sounds more pleasant to most people.
  3. Find one more place Fourier is hiding. Not from this list. Look at something you use — a game, a camera, a guitar tuner, an earthquake map — and work out where the frequency domain has to be. Then check whether you were right.
  4. Can you hear the shape of a drum? Two drumheads of different shapes — could they ring with exactly the same set of frequencies? Mark Kac asked it in print in 1966. In 1992 three mathematicians built two different flat shapes that ring identically, so in general the answer is no, you cannot. But their shapes have sharp corners. For a smooth, convex drum nobody knows, to this day. Predict first, then go and read about "isospectral domains" — and notice that a question can stay open for sixty years while still being perfectly easy to state.
  5. Is the FFT as fast as it can possibly be? The definition costs about N² multiplications; the FFT does the same job in about N·log₂N. Everybody uses it. Here is the part nobody tells you: no one has ever proved you cannot do better. There is no known algorithm faster than N log N for a general Fourier transform, and there is no proof that one is impossible — only partial results that hold if you tie the algorithm's hands first. Go find out what is actually proved, and then look at how wide the gap is between "nobody has managed it" and "it cannot be done". A startling amount of computer science lives inside that gap.

Bring one of these to your next session. The rule stays the same: don't just learn the rule — ask what assumption makes the rule true, and whether that assumption can be changed.

What this page cannot show you

Everything here is a repeating wave built from whole-number harmonics, because that is the clean case. Real sounds start, change and stop — a plucked string's harmonics fade at different rates, and that fading is most of what makes it sound plucked. Handling sounds that change over time needs a bigger tool (short-time Fourier transforms, spectrograms, wavelets). This page is the honest first floor of that building, not the whole building.

Three more things it cannot show you, now that you have section 6 and 7 in hand. One: the drawing pad measures only 24 harmonics from 256 samples — with 256 samples the most you could ever resolve is 128, and past that the transform starts reporting high frequencies as low ones (aliasing). Nothing on this page will warn you when that bites. Two: the pad assumes your drawing repeats forever, seamlessly. If your left edge and right edge do not meet at the same height, you have secretly drawn a jump, and the spectrum will honestly report the harmonics of that jump — which you did not think you drew. Three: the convergence section adds terms one at a time and lets you watch, which is a lie about speed. A real FFT does not converge towards an answer; it computes all the coefficients at once, exactly, and the picture of "watching it get better" has no counterpart inside the algorithm.