3 ms·
I built a smart volume control system out of distributed Kalman filters + classic PID control to track the EBU-128 loudness envelope of an unknown sound source
by pgt 6y ago
I built a smart volume control system out of distributed Kalman filters + classic PID control to track the EBU-128 loudness envelope of an unknown sound source and attenuate the music gain to keep it at a comfortable level: https://wallfly.webflow.io/ https://wallfly.webflow.io/
The challenge comes when dealing with silence, or breaks in a song: if you detect silence, should the volume go up or down? Of course, the dynamics make the music and should not change, but you don't know that without access to the source signal. So you add latency to the PID controller, but then you get overshoot (classic time/accuracy trade-off).
To do perfect control you need access to the source signal, or lookahead, but you can still do a pretty good job without the source signal by capping the signal gain, i.e. only attenuate and never add amplify. Still compresses the signal, though.
There are some clever tricks used in radar systems that you can use to estimate the noise in a room, like coherence: https://en.wikipedia.org/wiki/Coherence_(signal_processing) https://en.wikipedia.org/wiki/Coherence_(signal_processing).
In an LTI (linear time-invariant system), coherence can compare the acceleration of both input and output signals to calculate the power (but not the contents) of external signals that entered the system.
Coherence, is in my opinion, underused in industry.