Fourier playground

Add sine waves and watch the wave and its spectrum change live, then listen to what you built.

The wave (time)

The spectrum (frequency)

What you are seeing

Your sine waves

    Knobs: drag, scroll or use the arrow keys, or type a value. Double-click a knob to reset it.

    Open the real analyzer

    How to use the Fourier playground

    1. Pick a preset such as Square, or start from One sine.
    2. Turn the Frequency, Amplitude and Phase knobs of any sine, or press Add a sine (up to eight).
    3. Watch the wave on top and the spectrum below it, and read what changed under What you are seeing.
    4. Press Listen to hear the sum, or switch to Circles to see it built from turning wheels.

    What you are seeing

    time → 1× + 3× (⅓) + 5× (⅕) = almost square 10.330.201×3×5×frequency →
    The same sound twice: as a wave over time (left, the dashed line is the 1× sine alone) and as the list of sines it is made of (right).

    Every sound can be described in two ways. The wave shows air pressure going up and down over time, which is what a microphone records and an oscilloscope draws. The spectrum shows which frequencies the sound contains and how strong each one is, which is what a spectrum analyzer draws. The Fourier transform is the bridge between the two: it takes the wave and finds the sine waves that add up to it.

    Here you work the other way round. You choose the sines, the top chart adds them up, and the bottom chart runs a real FFT on the result, exactly as an analyzer would on sound from a microphone. Each sine you add appears as one spike at its own frequency, as tall as its amplitude. With Show the parts on, the faint coloured lines are the single sines and the white line is their sum. The Circles view shows the same thing as wheels turning at different speeds, one per sine, chained tip to tail: the height of the last tip traces the wave.

    One thing the spectrum does not show is phase. Turn a phase knob and the wave changes shape, yet the spikes stay exactly where they were. A magnitude spectrum, the kind every analyzer shows, keeps only frequency and size.

    Experiments

    Build a square wave

    Start with One sine at 220 Hz. Add a sine at 660 Hz (3×) with amplitude 0.33, then 1,100 Hz (5×) at 0.20, then 1,540 Hz (7×) at 0.14. With every odd harmonic the edges get steeper and the top flatter. The Square preset uses eight of them, up to 15× (3,300 Hz). Notice the small ripples near each edge: they get narrower as you add harmonics but never disappear. Use every multiple at 1/2, 1/3, 1/4 … instead and you get a sawtooth.

    Beats

    The Beats preset plays 440 Hz and 444 Hz together. The two waves drift in and out of step, so the white line swells and fades four times a second. Press Listen to hear the wobble. The spectrum still shows two separate spikes 4 Hz apart, because this FFT looks at more than a second of sound. Move the second sine to 441 Hz and the beat slows to once a second; this is how musicians tune two strings by ear.

    AM radio

    The AM radio preset is a 1 kHz carrier with two quieter sines at 900 Hz and 1,100 Hz. Together they make a 1 kHz tone whose loudness rises and falls 100 times a second: amplitude modulation, the way AM radio puts a voice on a carrier. In the spectrum, the message shows up as the two sidebands either side of the carrier. Turn the sidebands down and the swelling gets weaker.

    Noise

    The Noise preset hides a quiet 1 kHz tone (amplitude 0.2) under loud noise. In the wave you can no longer see the tone at all, but in the spectrum it still stands up as a clear spike, because noise spreads its energy thinly over every frequency while the tone keeps all of its energy in one place. Switch the spectrum to dB to see the noise floor. This is why engineers look at spectra: a weak signal that is invisible in the wave is easy to find in the spectrum.

    For teachers

    The playground runs in any modern browser on a classroom laptop, tablet or phone, with no sign-up and nothing to install. A few ideas for a lesson:

    • Ask students to predict the spectrum of a square wave before they build it, then check with the preset.
    • Share a link with a mystery set of sines and ask which frequencies are in it, using only the spectrum.
    • Compare a square wave and a triangle wave by ear with Listen, and explain the difference from how fast their harmonics shrink.
    • Use beats to show the difference between two frequencies, then let students count the pulses for ten seconds.

    For the theory behind the FFT, read FFT explained. To see real sound as a wave, open the online oscilloscope, and to see it as a spectrum, the real spectrum analyzer. More lessons are in spectrum analyzer basics.

    FAQ

    What is a Fourier transform?

    A way to describe any wave as a sum of simple sine waves of different frequencies.

    Why does a square wave need odd harmonics?

    Adding sines at 1×, 3×, 5×… the frequency with shrinking size builds the flat tops and sharp edges.

    What are beats?

    Two close tones drift in and out of step, so the loudness pulses at the difference frequency.

    Can I use it in class?

    Yes, it works on classroom laptops and phones, no sign-up.

    Written and tested by the SpectrumAnalyzer.app team · Last checked

    How we tested: Checked with known sums: the square-wave preset shows peaks at 220, 660, 1,100 Hz … with heights 1, 0.33, 0.20 …, two tones 4 Hz apart show two separate peaks, and a phase change moves the wave but leaves the spectrum unchanged.