Sound is produced by oscillation, e.g., a speaker cone pushing and pulling air back and forth, and, inversely (😄), no oscillation results in silence. To then cancel a sound out, there needs to be a way to cause no oscillation. Specifically, inverting the waveform (rotating it 180°) turns every push into a pull and vice versa. This is known as Destructive Interference, an emergent property of waves, and the same principle behind noise-cancelling headphones. At 0° (no rotation; same waveform playing twice, in sync), the waves reinforce each other instead (i.e., pulling becomes 2x the pull, and pushing becomes 2x the push), causing what is known as Constructive Interference. Together these two properties are known as Wave Interference.
-
Pick the bundled sine-wave example or choose your own WAV file.
-
Move the Phase Shift knob to preview the original waveform, the shifted copy, and the resulting waveform/spectrum.
-
Play the audio without applying the copy to hear the original signal.
-
Enable Apply Phase-Shifted Copy to hear both waves playing together. At 180° they cancel through destructive interference; at 0° they reinforce through constructive interference; intermediate angles blend between those extremes.
Deconstruct an audio file into its constituent frequency components and selectively cancel unwanted parts, closer to how noise-cancelling systems use destructive interference.
- Inspired by kyndinfo's articles on Fourier Series and Sound Visualization.
- Using Plotly for plotting.
- Default audio: Sine Wave in C Minor by djfroyd on Freesound.
