Last night, about 2:00 am, my neighbor's dog started barking, and basically kept it up, on and off, until dawn. The neighbors were out of town overnight, and apparently the dog suffers from "separation anxiety" when no one is at home.
Anyway, it occurred to me at some point that I needed to design a noise cancellation system for my bedroom. In theory, I could place a microphone outside the window, or maybe even ON the window, and then place a speaker inside and a simple amplifier that would output the inverse of whatever the microphone picked up. Then with a little tweaking, voila, a silent dog. Or passing airplane. Or ambulance. Or whatever.
But then it also occurred to me that noise cancellation must be more complicated than that - because it has taken so long for this kind of device to become available even in headphones. There must be problems - including maybe timing or phase considerations - that require special digital signal processing.
Does anyone here have experience with, or expertise in, noise cancellation design? What am I up against here?
Of course, I could just buy some headphones, but just wearing them would probably keep me awake too.