Offline Mastering Peak Limiter

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hello! I am an enthusiast developing open source software for musicians and audio engineers.

Now I am trying to solve the problem of creating open source offline mastering peak limiter (brickwall limiter). Like Waves L2, FabFilter Pro-L or Voxengo Elephant, but offline.
I would like to consult with you how it can be implemented in the offline case, when all track samples are already in memory and available.

I already googled this, but found only Soft Clipper (arctan) solution using it's transfer function:
https://stackoverflow.com/questions/348 ... -in-python

I'll be glad of any leads. I hope there is a similar transfer function of a true peak limiter.

I use Python with Numpy, Scipy and SoundFile libs for my development.

Post

I don’t think there’s a huge difference between offline and real-time for this. Oversample the data, clip at your threshold with a soft knee, downsample, good to go. Oh, but wait, we’re talking about limiting, not just clipping. This would be a good place to start, the only real difference is you have more ways to compute RMS since you have all samples available..

https://christianfloisand.wordpress.com ... er-part-1/

Post

sault wrote: Tue Dec 17, 2019 6:55 am I don’t think there’s a huge difference between offline and real-time for this. Oversample the data, clip at your threshold with a soft knee, downsample, good to go. Oh, but wait, we’re talking about limiting, not just clipping. This would be a good place to start, the only real difference is you have more ways to compute RMS since you have all samples available..

https://christianfloisand.wordpress.com ... er-part-1/
Useful content thanks. I thought of hilbert and FIR, but RMS is pretty straightforward.

Post

kingozrecords wrote: Thu Dec 09, 2021 2:55 pm
sault wrote: Tue Dec 17, 2019 6:55 am I don’t think there’s a huge difference between offline and real-time for this. Oversample the data, clip at your threshold with a soft knee, downsample, good to go. Oh, but wait, we’re talking about limiting, not just clipping. This would be a good place to start, the only real difference is you have more ways to compute RMS since you have all samples available..

https://christianfloisand.wordpress.com ... er-part-1/
Useful content thanks. I thought of hilbert and FIR, but RMS is pretty straightforward.
Hilbert transform can extract the envelope of an isolated sinusoid more or less perfectly, but it's not terribly useful for estimating envelopes of complex wideband signals. If you try it on something like a square or sawtooth wave, you'll quickly realize why.

RMS gives you an estimate of signal power, which isn't really a perfect estimate of perceived loudness (the loudness meters typically use RMS with frequency weighting, but one could argue they aren't perfect either), but it's generally a lot better estimate of perceived loudness than anything based on peaks, which is great if you're trying to shape the perceived dynamics. On the other hand RMS itself is more or less completely insensitive to the actual time-domain waveform shape, so it doesn't really tell you anything about the signal peaks and is therefore not directly useful for peak limiting as such (although you could certainly still use RMS based dynamics processing as a component in a more complex limiter).

So.. for peak limiting what you really want to do is the obvious thing: just take the peaks as-is (with some smoothing, obviously; how you do the smoothing is then what determines how your limiter sounds).

Post

Thanks very much. In the way of limiting though; would there be a way you think to use it on an integer scale to affect audio, after all; it's only a whole number that it needs to derive? I've made some psuedo style compressors, some unique but they fall short of a true brickwall limiter. It's quite frustrating.

I've been looking for straight math that shows how to build a brickwall limiter so that I can learn how. It's a nice feature; to add volume behind it. After all, it allows a way of making all sounds seem at the same volume on the fly with makeup, kind of cheap but it does the job.

Post

I made a limiter once

https://github.com/Jesse-Hufstetler/Starfish-Limiter

I even ported it to C++ and tried to sell it but nobody bought it. But the algorithm is chilling there for you to use

Post

I might make the paid thing free or open source at some point. Kilohearts has a free limiter now that's just as good as mine so mine is sort of put out of business

Post Reply

Return to “DSP and Plugin Development”