🎧 Machines That Hear · Day 18

Cancel the Noise Wave

Noise-cancelling headphones do something almost magical: they listen to the roar of a plane or bus, then play the exact opposite sound wave into your ears. The two waves cancel out — and you hear silence. Let's make two waves erase each other!

↓ cancel it out
🏷️ The pro wordsThis is Active Noise Cancellation (ANC). When two waves are opposite and add to zero, that's destructive interference, and the flipped wave is in anti-phase (180° out of phase). Headphones that listen with an outside mic do feedforward ANC. Careful — this is about your ears, not speech recognition!
🎚️ Lab · The Wave Canceller

Two waves, one silence

🟥 is the annoying noise. 🟦 is your headphone's anti-noise. 🟩 is what you actually hear (the two added together). Tune the anti-noise's phase and volume until the green line goes flat — that's silence!

anti-noise phase (flip it to 180° = opposite)

0.0

anti-noise volume (match the noise)

What you hear
100%
🎯 Goal: get "what you hear" below 10% — that's the noise cancelled! Hint: opposite phase + matching volume.
💡 Why It's Not Perfect

The catch

Try the "Change the noise!" button — your perfect cancellation instantly breaks, because the anti-noise no longer matches. Real ANC has to predict and re-tune constantly. That's why it works great on steady noise (a plane's hum) but struggles with sudden sounds (a door slam or someone talking).

🎯 That's also why ANC is different from noise suppression (Day 14): ANC cancels sound with an anti-wave before it reaches your ears; noise suppression cleans a recording with software after the mic hears it.
🚀 Beyond the Basics

How the pros really do it

You made a fixed anti-noise wave and saw it break when the noise changed. Real headphones fix that by re-tuning constantly:

🟢

Fixed anti-wave (what you built)

✅ Shows the core trick (anti-phase). ⚠️ Only cancels one steady tone; breaks the instant noise changes.

🔁

Adaptive ANC

An algorithm re-computes the anti-noise thousands of times a second as the noise changes, using an outside mic (feedforward) and an inside mic (feedback). ✅ This is what AirPods Pro & Sony use. ⚠️ Complex.

🧠

AI-based ANC

A model predicts the noise a tiny bit ahead, so cancellation keeps up even with sudden sounds. ✅ Better on unpredictable noise. ⚠️ New & heavy.

🏷️ Pro names to look upadaptive ANC (FxLMS algorithm) · feedforward / feedback / hybrid ANC · AI-based noise prediction.

🎉 Day 18 Complete!

You performed Active Noise Cancellation — erasing noise with an opposite wave (destructive interference) — and learned why it loves steady noise but fears surprises.

↺ Back to all days
Amazing! You've now covered the real engineering behind voice AI — VAD, echo cancellation, noise suppression, streaming, codecs, beamforming, and ANC. You could genuinely start building voice apps. 🚀
AI Adventure · Machines That Hear · Day 18 — made for young inventors 🚀