Skip to content

Apidcloud/antiphase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AntiPhase - Sound Destructive Interference with Fourier and Hilbert Transforms

with-coffee with-water with-love

Live Demo

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.

How it works

  1. Pick the bundled sine-wave example or choose your own WAV file.

  2. Move the Phase Shift knob to preview the original waveform, the shifted copy, and the resulting waveform/spectrum.

  3. Play the audio without applying the copy to hear the original signal.

  4. 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.

Future work

Deconstruct an audio file into its constituent frequency components and selectively cancel unwanted parts, closer to how noise-cancelling systems use destructive interference.

Credits

About

AntiPhase - Sound Destructive Interference with Fourier and Hilbert Transforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages