News for hackers. Stuff that matters.
Re:Audio Processing for Dummies by holy_city on Sunday November 10, 2019 @12:24AM (#21496542)
I wrote this crate [1] as a compressor in Rust which is the opposite of a noise gate, as in gain reduction is applied after a threshold is passed instead of gain reduction applied if it is under a threshold.

If you want a really great approach to noise gating, a fixed threshold is fine but it works better when you apply it to the difference of two envelope followers - one with a short attack, long release (tracks input) and long attack, short release (tracks noise floor). Takes a bit to set it up, but it's a stupid simple way to get extremely effective gating and is easy to fine tune for your application. A lot of Voice Activity Detection (VAD) works this way; it's just a matter of tuning the coefficients and thresholds for your input.

Also useful reference for envelope following are the DAFX text [2], Will Pirkle's textbook on audio in C++ [3] and Zölzer's text [4]

[1] https://github.com/m-hilgendorf/rusty-compressor

[2] https://www.amazon.com/DAFX-Digital-Effects-Udo-Z%C3%B6lzer/...

[3] https://www.amazon.com/Designing-Audio-Effect-Plugins-C/dp/1...

[4] https://www.amazon.com/Digital-Audio-Signal-Processing-Z%C3%...

(pdfs can be found around the internet)

Re:Audio Processing for Dummies by jcims on Sunday November 10, 2019 @04:35AM (#21497260)
The examples used in the OP are helped by having an RF squelch to zero out the noise floor. If there was no squelch, the difficulties finding a good static (har har) threshold would have been much more apparent.
Re:Audio Processing for Dummies by tripzilch on Wednesday November 13, 2019 @05:53AM (#21522786)
Can you explain what you mean by "squelch"? I'm assuming it's a kind of filter but I can't find it in the code.