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.
Check it out here:
In case you find any bugs, or possible optimizations, let me know