I think my speaker's output is rather unlinear when I run a manual sweep from Online tone generator. I have two outputs to select from. Either the built-in speakers on my iMac (Retina 4K, 21.5-inch, Late 2015) or MicroPod by Podspeakers plus SUB C-8 D by DALI.

I guess, if it's possible to insert a "mic input to output regulator" which makes the sound pressure (dB) constant over some range, like 100Hz to 6kHz, what I'd have as output units shouldn't matter that much.

Some Python code that filtered the sound input from the mic(s) with 1 second delay to make some automatic gain control (AGC) for the output level? Some app? It has to be almost plug and play, since this I guess is mostly in the very nice to have range.

However, I have a feeling that since my iMac mics are not positioned on the same place as the mic of my embedded device under test, then some nice AGC might still not help more than so much? That the room (quite damped, wooden panel, not a shoe box room, but not a dead room either) unlinearizes this very fast? I say this because if I move my head or my body then that's enough to see the spectral value change a lot.


1 Answer 1


That depends a bit on whether you are talking about actual physical non-linearities (like harmonic distortion, clipping, BL curve, suspenion, etc.) or just a non-flat frequency response (for an otherwise linear system).

Real non-linearities are extremely difficult to compensate for but what the room does to the sound is perfectly linear (just not constant with frequency).

Room frequency response correction is also not easy. There is no single "transfer function" that can be inverted but the spectrum varies significantly from one one listening location to the next. A good correction will require an analysis of the room modes and some intelligent decision which ones make sense to compensate for . A single microphone location doesn't yield enough information and typically doesn't help much.

  • $\begingroup$ Thanks, @Hilmar. Yes, I was thinking of a non-flat frequency response of a linear system. So I either need to do the analysis off-line (Python with libs) or just do some tuning of a SW 480 Hz I already have. And/or continue as I have done and have a lazy approach in this hobby project. I was surprised to see that the frequency response was dependent on just turning my head to look more closely at the scope. $\endgroup$ Jun 13, 2022 at 16:36
  • $\begingroup$ The wavelength at 10 kHz is only 3.4cm so even small movements make a significant difference at higher frequencies. At low frequencies discrete mode dominate the behavior. A good compromise is to do some spatial averaging over a few listening positions or listening area $\endgroup$
    – Hilmar
    Jun 14, 2022 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.