← Back
🎵

WaveForge

Combine waves to create sounds.
See them and hear them at once.

🏆 Best (Challenge)0
🔥 Daily streak0 days

How Wave Superposition Works

When two or more waves overlap, the combined wave's value at any point in time is just the sum of each individual wave's value there — that's literally what happens every time you add a function to the stack in this game. Whether that sum ends up bigger or smaller than the individual waves depends on phase: when two waves are aligned (in phase), their crests land together and reinforce each other, called constructive interference. When they're offset (out of phase), a crest from one can land on a trough from another and partly or fully cancel it out, called destructive interference. Dragging a function's Phase (φ) slider is directly controlling which of those two things happens to it relative to the rest of your stack.

The "square," "triangle," and "sawtooth" wave options aren't drawn as their ideal geometric shapes — internally, each one is built by adding several sine waves at odd-multiple frequencies with shrinking amplitudes, the same approach behind Joseph Fourier's insight that essentially any repeating waveform can be built out of enough plain sine waves at different frequencies and amplitudes, known today as Fourier synthesis. The "Square Wave (Fourier)" preset makes this visible directly: three sine waves at a 1:3:5 frequency ratio with shrinking amplitudes already start to look squared-off, even though a mathematically perfect square wave would need infinitely many. Challenge Mode's scoring — accepting your stack once it's close enough to the target on average, not pixel-identical — is a hands-on version of the same problem real Fourier analysis solves: describing a complicated waveform as a sum of simple ones.

Frequently Asked Questions

What does it actually mean for waves to "add together" here?

At every instant, the combined wave's value is just the sum of every active function's value at that instant — that's the whole mechanic. Move one wave's Phase (φ) slider and you're shifting where it is in its own cycle, which changes whether its crests land on the other waves' crests (making the combined wave bigger, called constructive interference) or on their troughs (partly canceling them out, called destructive interference).

Why is the built-in "square wave" made of three sine waves instead of one straight square shape?

That preset is a real, deliberately visible example of Fourier synthesis — the mathematical fact that a square wave can be approximated by adding sine waves at odd-multiple frequencies (1×, 3×, 5×...) with shrinking amplitudes. Three terms already start to look squared-off; a mathematically perfect square wave needs infinitely many. This game's own "square," "triangle," and "sawtooth" wave options are all built the same way internally, not drawn as ideal geometric shapes.

In Challenge Mode, why does my stack "match" the target without needing to be identical?

The verification checks the average difference between your wave and the target across many sample points, and accepts anything below a small error threshold rather than requiring an exact match. That mirrors how real waveform-matching works in practice — you're rarely chasing a perfect analytical match, just a combination of simple waves close enough to be practically indistinguishable from the target.