Using RMS compressor with peak detection sidechain.
I'm running low on instructions and would like to have the option of peak and RMS compression. I'm thinking I could use an RMS compressor with an optional peak detector on the external detect pin and setting the attack to 1ms.
Is the attack on the peak compressors faster than 1ms? or would this be a feesible solution? Is there anything else to watch out for?
Many thanks.
Audio Signal Processors
software
adau1442
SigmaDSP Audio Processors
Hello Ioggytek,
The peak detection works instantly (sample-by-sample), this compression will happen right at the peak, meaning that the first peak in a loud transient (where peak >> RMS) will essentially be clipped because of the instant gain reduction.
You want to use the combo (RMS + Peak) compressor, please refer the wiki explanation here, ignore it if you already referred this.
Below is a brief explanation of how it works,
So, the main point is that there's only one transfer function (graph). However, there are two detection signals. The peak detection has a fast time constant that tracks the leading edge of loud transients, whereas the RMS detection has a slower time constant that tracks the average level of the signal. Whichever one of these is higher is applied to the transfer curve. So, during the attack portion of a signal (the initial transient), the peak level of the signal will be larger than the RMS level, so the peak level will set the output gain. However, after the initial transient, the RMS level has a slow roll off, so it will generally be higher than the peak level and it will control the way the gain behaves until the next transient.
Hope this helps.
Regards,
Harish
Hello loggytek,
Harish is right on target here. Try the combo compressor. It is in the ADAU1442 library. It might do what you are looking for in a little bit more efficient way.
Otherwise, I would do sort of what you are suggesting but do it the other way. Use a Peak compressor and then have an Envelope generator to generate the RMS ballistics.
I took a screenshot.
You could use this peak compressor with an external sidechain input and run the audio through the Signal Envelope generator that feeds the sidechain.
I also circled the Combo version if you want to try that.
Dave T
Thanks chaps. The combo isn 't really what I'm looking for, that's peak AND RMS and I'm looking to do peak OR RMS.
Dave, so if I used the peak compressor with an RMS envelope on the external input, do you think I could I add a variable delay to the envelope output to get control of the attack time? Should that work in theory?
Hello loggytek,
Yes, if you delay the signal going into the envelope generator, and/or into the ext sidechain input, will slow the attack time.
When you switch to RMS then just change the release time on the peak compressor to be really fast so the RMS will dominate the release.
I am not sure if this will same much as far as instructions. See what it looks like when you try it.
Dave T
Please log in to reply.
