This question is a companion to Automatically switch equalizer preset based on audio output (internal speaker or external).
Context/problem: bad speakers
As many people know, laptop speakers have "highly unequal frequency response" as audio professional would say. Normal people say: "they sound very bad".
First-step solution: equalization
Equalizing provides a valuable workaround, dramatically improving sound quality with a one-time effort. For example, I installed PulseAudio Equalizer from Web Upd8.
For good results, equalization values should be chosen based on measurements
Measurement time, manual. Done once, not fun.
Once, I took a sonometer app for Android, asked my laptop to produce pure tones, one for each frequency in the pulseaudio-equalizer
set of frequencies, and noted down decibels displayed by sonometer app. Then I created a preset with the reversed curve, and I got a pretty decent result.
Measurement time, automatic. Would be fun!
It would be very nice to have the computer:
- continuously produce some white noise,
- continuously output that noise to the speakers,
- continuously measure through a microphone
- continuously compute a power=f(frequency) spectrum from the microphone signal
- continuously adjust equalizer parameters to converge to a measured flat spectrum
- possibly providing some comments like "I can't seem to produce powerful enough bass in the 50-100Hz range (saturation) so I give up" or "too much noise in the 5kHz range".
- once happy about the result, generate an equalizer parameter file
Then store the resulting profile for pulseaudio-equalizer
and profit!
Notice:
- This assumes that microphone has a flat response, or at least more flat than the speakers being measured, which incidentally I believe is close to true with most microphones even for the cheapest microphones.
- This assumes that microphone is sensitive enough, or amplified. One may have to tune the audio settings, pick a better microphone or add a preamp.
- This assumes that microphone hears the same sound as your ears. The simplest option is to have a microphone with a wire and position it where your head is in normal use.
Search before you ask
http://kokkinizita.linuxaudio.org/linuxaudio/ mentions Jaaa and Japa. These optionally produce white noise that may help to do manually what I'm thinking of. When tuning some hardware that only has physical knobs, this is the only option, but here the tuning can be done via API, so I'd like it to be fully automatic.
The question
Is there an open-source software that can, as described above, automatically produce an equalizer profile based on measurements from actual speakers?