3 ms·
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 gai
by holy_city 7y ago
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 https://github.com/m-hilgendorf/rusty-compressor
[2] https://www.amazon.com/DAFX-Digital-Effects-Udo-Z%C3%B6lzer/dp/0470665998 https://www.amazon.com/DAFX-Digital-Effects-Udo-Z%C3%B6lzer/...
[3] https://www.amazon.com/Designing-Audio-Effect-Plugins-C/dp/1138591939/ref=cm_cr_arp_d_product_top?ie=UTF8 https://www.amazon.com/Designing-Audio-Effect-Plugins-C/dp/1...
[4] https://www.amazon.com/Digital-Audio-Signal-Processing-Z%C3%B6lzer/dp/0470997850 https://www.amazon.com/Digital-Audio-Signal-Processing-Z%C3%...
(pdfs can be found around the internet)
- jcims 7y agoThe 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.
- tripzilch 7y agoCan 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.