Oscilloscope Spectrogram (waterfall)

About this simulation

Written by MySimulator Team · Reviewed by MySimulator Editorial Review

Last updated: 5 July 2026

This simulator builds musical tones the way additive synthesis does: it sums up to 12 sine-wave partials, each at an integer multiple k of a fundamental frequency f₀ (55–880 Hz), each with its own amplitude and exponential decay rate. The Web Audio API generates every partial with an OscillatorNode and GainNode pair, while an AnalyserNode runs a real-time FFT to feed the waterfall spectrogram beneath the oscilloscope.

🔬 What it shows

An oscilloscope traces the combined waveform y(t) = ΣAₖ·sin(2π·k·f₀·t+φₖ)·e^(−dₖ·t) in real time, whilst a waterfall spectrogram below it plots frequency against time, with brightness marking amplitude — revealing exactly which harmonics survive as decay takes hold.

🎮 How to use

Drag the f₀ slider (55–880 Hz) to shift pitch, set Master Volume (0–100%) and Oscilloscope zoom (0.5×–4×), then tune each of the 12 harmonic rows with its own Amp (0–1) and Decay (0–8) slider, toggle partials on or off, or jump straight to a Sine, Sawtooth, Square, Piano, Clarinet or Bell preset.

💡 Did you know?

Composer Jean-Claude Risset used additive synthesis in the 1960s to show that a real piano's overtones are slightly sharp of perfect integer multiples — that "inharmonicity" is part of what makes a piano sound like a piano rather than an idealised harmonic tone.

Frequently asked questions

What is additive synthesis?

It is a method of building a complex sound by adding together simple sine waves (partials) of different frequencies, amplitudes and decay rates, rather than filtering or sampling a pre-recorded tone.

What do the Amp and Decay sliders on each harmonic actually control?

Amp sets that partial's starting amplitude, Aₖ, from 0 to 1. Decay sets dₖ in the exponential envelope e^(−dₖ·t): higher values make that partial's gain fade faster after the note starts, whilst zero keeps it sustained.

Why does moving the f₀ slider change every harmonic at once?

Every partial's frequency is defined as k·f₀, so scaling the fundamental scales all 12 partials by the same factor. Their frequency ratios — and therefore the timbre — stay fixed, but the whole tone shifts up or down in pitch.

How do the Sawtooth and Square presets work?

Sawtooth sets every harmonic's amplitude to 1/k. Square does the same but keeps only the odd-numbered harmonics (k = 1, 3, 5…) and mutes the even ones. Both are classic textbook cases of additive synthesis producing a specific waveform shape.

What is the waterfall spectrogram reading from?

It reads byte-frequency data from the Web Audio AnalyserNode, which runs a Fast Fourier Transform on the live audio output roughly every 50 milliseconds, turning the time-domain signal into a scrolling frequency-versus-time display.