Hey everyone,
I finally found some time to publish my little compressor class on github along with an article about look-ahead limiters, as there are plenty of wrong implementations out there. Spoiler: it’s not just delaying the input signal
The two main classes are purely C++ without any dependencies other than the std lib. There’s also a wrapper to act as a JUCE dsp processor, so it can be easily used with JUCE.
There’s also a visualization of the compressor characteristic curve, and a small multi-channel sample delay class, which is needed for the look-ahead.
Two JUCE plug-in projects demonstrate the use of the wrapper and the classes for the look-ahead compressor / limiter.
Just diving in your article this morning. Great explanation, thanks for sharing this.
One question though. You mention delaying both input and side chain. Can we spare a delay line by first doing step 2, delaying the input channels. From there, calculate the gain reduction.
That would be the setup without lookahead.
The lookahead works by evaluating the sidechain at a different time, i.e. earlier.
Because you need to be independent from the block size, you need both delay lines.
Yes that was my first though as well. Then i read in the article that " Delaying both input and gain reduction signals" is the second step. Using the same delay time. That would mean we can calculate the gain reduction from that point right. Then at step 3, the actual lookahead function begins.