SimpleCompressor: JUCE processor with article of how to implement look-ahead

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 :wink:

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:

The article: https://github.com/DanielRudrich/SimpleCompressor/blob/master/docs/lookAheadLimiter.md

In case you find any bugs, or possible optimizations, let me know :slight_smile:
Cheers
Daniel

19 Likes

Finally someone explained look-ahead properly with open source code !

A few quick remarks for now:

  • I had a bunch of warnings (float to int conversion) and errors on Windows (std::atomic or std::min not available)
  • I think the plug-in should report the 5 ms of latency when the option is enabled :wink:

Thanks a lot for sharing this project !

Thanks for the feedback!
Valid point with the latency, will add it!
To be honest, I haven’t tested it on windows, but will do :slight_smile:

2 Likes

Yeah, all I can say is thanks for the explanation and code samples. :slight_smile:

2 Likes