Experimental low-frequency active noise control for a macOS microphone and speakers.
This is not headphone-grade ANC. A Mac microphone and speakers are separated from your ears, and Core Audio plus acoustic latency is too high for broad-band cancellation. This prototype is useful for steady, low-frequency noise at the microphone position: fan hum, AC rumble, transformer buzz, and similar tones.
Start with low speaker volume and low gain. Keep the microphone away from the speakers at first. The app has a startup ramp, output limiter, and clipping stops, but acoustic feedback is still possible if the speaker output re-enters the microphone too strongly.
For best results, put the microphone where you want the quiet zone. Built-in Mac microphones usually cancel at the Mac, not at your ears.
uv syncmacOS may ask for microphone permission for Terminal, iTerm, or your editor.
List devices:
uv run nonoise list-devicesCheck defaults:
uv run nonoise probeRun with conservative defaults:
uv run nonoise run --gain 0.05 --lowpass-hz 300The app requests 5 ms device latency by default, but built-in Mac hardware still reports much higher real latency. Try a smaller block if the stream is stable:
uv run nonoise run --gain 0.03 --lowpass-hz 250 --blocksize 64Run a 10-second settings sweep:
uv run nonoise run --sweep --gain 0.06 --lowpass-hz 250 --blocksize 64Run repeated passes with a short beep marking each setting change:
uv run nonoise run --sweep --sweep-loops 3 --gain 0.06 --lowpass-hz 250 --blocksize 64Tune while running:
+/-: gain up or down]/[: delay up or downp: flip polaritym: muteq: quit
If the noise gets louder, lower gain, flip polarity, or move delay in small steps. ANC only works when the emitted anti-noise arrives with the right phase and amplitude at the microphone.