Limiter

This read-only archive contains discussions from the Adding Feature forum.
New feature request may be posted to the Adding Feature forum.
Technical support is available via the Help forum.
steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Limiter

Post by steve » Sun May 31, 2015 7:35 pm

The attached plug-in contains most of the best features from other limiters that have been posted over the years, plus a few new enhancements.

Features may be enabled or disabled by uncommenting the "control" lines near the top of the file.
A control is enabled if it starts with:

Code: Select all

;control
and is disabled if it starts with:

Code: Select all

;;control
As can be seen here, the only control enabled is the threshold "Limit to (dB)" control:

Code: Select all

;;control type "Type" choice "Soft Limit,Hard Limit,Soft Clip,Hard Clip" 0
;;control gain-L "Input Gain (dB)\nmono/Left" real "" 0 0 10
;;control gain-R "Input Gain (dB)\nRight channel" real "" 0 0 10
;control thresh "Limit to (dB)" real "" -3 -10 0
;;control hold "Hold (ms)" real "" 10 1 50
;;control makeup "Apply Make-up Gain" choice "No,Yes" 0
This is what it looks like with the minimal interface:
simpleLimiter.png
simpleLimiter.png (10.93 KiB) Viewed 1780 times
And this is what it looks like with all features enabled:
fullLimiter.png
fullLimiter.png (25.7 KiB) Viewed 1780 times
The "Hold" setting only applies to the "Soft Limiter" and "Hard Limiter" options. Ideally it should be greyed out when either the "Hard Clip" or "Soft Clip" but unfortunately it is not yet possible to do that.

If this is to be shipped with Audacity, which I think it should be, then which controls would we want to expose to users?
limiter.ny
(4.32 KiB) Downloaded 66 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

kozikowski
Forum Staff
Posts: 69384
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Limiter

Post by kozikowski » Sun May 31, 2015 8:16 pm

So Input Gain takes the place of Effect > Amplify: Default I used in front of the last limiter? Put the audio somewhere predictable and then limit it. The last limiter (by my count, version 4) was desirable. What are the equivalent settings to -3, 10, No?

Koz

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Limiter

Post by steve » Sun May 31, 2015 8:37 pm

kozikowski wrote:So Input Gain takes the place of Effect > Amplify: Default I used in front of the last limiter?
Yes, except that you decide how much to amplify. Nyquist cannot automatically set the required amount for 0 dB. A very useful aspect of the "Input Gain" controls is that if you have a stereo track that sounds great except that one channel is noticeably quiet and you can't make it louder because of one or two brief transients, you can just shove the level up for that channel, and set the threshold close to zero. The quiet channel will then be amplified and the limiter will take care of the transients.
kozikowski wrote:Put the audio somewhere predictable and then limit it.
Yes, if you have a really quiet track then you can amplify then limit in one go. It's particularly useful when using the "Soft Limit" option because "soft limit" tends to be too soft with low level tracks and a correspondingly low threshold. As you discovered with the previous version, it gives better results if the level before limiting is close to 0 dB (does not need to be exact).
kozikowski wrote:The last limiter (by my count, version 4) was desirable.
The last one that I posted (http://forum.audacityteam.org/viewtopic ... 24#p275924) is identical to the "Soft Limiter" option, except that it handles over 0 dB much better. Whatever "Hold" and "Limit to (dB)" settings you used in the previous version are the same in this version

My favourite is the "hard limiter" (not to be confused with "hard clipping" which is a separate option).

For both hard limiter and soft limiter, the default 10 ms "Hold" is likely to be good for most uses. For working with a bass track, a longer "hold" setting may sound better. For handling occasional clicks, a shorter Hold time may sound better.

The "Soft Clip" and "Hard Clip" do what they say on the tin. The "Hold" control is ignored.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

kozikowski
Forum Staff
Posts: 69384
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Limiter

Post by kozikowski » Sun May 31, 2015 10:30 pm

Attached.

It says version 4. Which version is the new one?

Koz
Attachments
Screen Shot 2015-05-31 at 15.28.51.png
Screen Shot 2015-05-31 at 15.28.51.png (23.26 KiB) Viewed 1775 times

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Limiter

Post by steve » Sun May 31, 2015 11:02 pm

"version 4" at the top of the file refers to the version type. It does not have a "release version" because it is not an official "release". if you wish to add a version number for your own reference, you could modify the "name" line.
Change:

Code: Select all

;name "Limiter..."
to something like:

Code: Select all

;name "Limiter 30-05-15..."
If this version is included in the shipped bundle, then it will be called "Limiter..." (as it is now).
The only thing that I'm planning to change is which controls to expose to users - and that is my question.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

billw58
Forum Staff
Posts: 5602
Joined: Wed Aug 12, 2009 2:10 am
Operating System: macOS 10.15 Catalina or later

Re: Limiter

Post by billw58 » Mon Jun 01, 2015 1:38 am

Expose all the controls.

My favourite is the hard limiter (brick wall limiter) and I'd hate to lose that.

The pre-gain controls are very useful.

Any useful limiter tool will require some documentation and users will be required to take the time to understand it.

-- Bill

kozikowski
Forum Staff
Posts: 69384
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Limiter

Post by kozikowski » Mon Jun 01, 2015 3:13 am

Yes, except that you decide how much to amplify. Nyquist cannot automatically set the required amount for 0 dB.
I'm just reading that again. The useful feature of Amplify is you don't have to adjust it in this instance and it resets every time, so there's no chance of accidental odd results.

Which limiter do I get in that earlier, non-release version?

Koz

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Limiter

Post by steve » Mon Jun 01, 2015 7:34 am

kozikowski wrote:The useful feature of Amplify is you don't have to adjust it in this instance and it resets every time, so there's no chance of accidental odd results.
The most useful feature of Amplify is that it amplifies. I agree that the "auto gain" feature is also very useful, but the Audacity/Nyquist interface can't do that yet. No need for surprises because it has "Preview".
kozikowski wrote:Which limiter do I get in that earlier, non-release version?
The earlier one that I sent you was the "Soft Limiter". You may not have noticed but the older "soft" limiter was rather brutal with over zero dB. Anything over zero was just clipped to 0 dB before applying the "soft" limiter. This version handles over zero much more nicely by hard limiting over zero rather than clipping.
billw58 wrote:My favourite is the hard limiter (brick wall limiter) and I'd hate to lose that.
Did I write that somewhere? Yes, the "hard limiter" is in fact the old "brick wall" limiter. That's my favourite too and behaves like a textbook description of a "classic" limiter.

The "soft" limiter is possibly more forgiving of poorly selected settings and can giving more of a "levelling" type effect (but without the distortion and with a more predictable output level).
billw58 wrote:The pre-gain controls are very useful.
I agree - I'd not like to lose those, though thy may be seen to be a bit "difficult". I'm so glad that we now have "Preview" for Nyquist effects.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14687
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Limiter

Post by waxcylinder » Mon Jun 01, 2015 8:25 am

billw58 wrote:Any useful limiter tool will require some documentation and users will be required to take the time to understand it.
Users may need a Tutorial to help them understand it, I'm thinking.

Peter
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Limiter

Post by steve » Mon Jun 01, 2015 9:16 am

waxcylinder wrote:Users may need a Tutorial to help them understand it, I'm thinking.
That's the benefit of the very simple interface - just about anyone should be able to use that with no instructions, though that does lose a lot of functionality.

All of the controls, with the exception of "Hold" are pretty straightforward.
  • Input Gain - amplifies the audio before applying the limiter.
  • Limit to (dB) - limits the amplitude (after optional amplifying) to this level
  • Apply makeup gain - amplifies the output (post limiter) close to 0 dB (usually just a little below 0 dB)
Basically, a limiter reduces the gain (negative amplification) when the audio exceeds the "threshold" ("Limit to") level. The "Hold" time is how long (in milliseconds) the gain remains at the reduced level before returning back to normal. Usually you would want the gain to return back to normal pretty quickly after the peak has passed because you normally only want to limit the peaks and then return back to normal as quickly as possible. However, there is a problem if the limiter responds too quickly, and this is most noticeable when processing bass instruments.

If there is a very low note, say below 100 Hz, then the time from one peak to the next may be longer than the "hold" time. Thus the gain will start to reduce as the peak level rises, then will start to "release" (return to normal gain) between one peak and the next. This rapid "fluttering" of the gain level distorts the waveform, which is usually undesirable. The solution to the problem is simple - just hold the gain at the reduced level for a little while so that the limiter is responding to the overall shape of the note and not the individual waveform peaks.

The second track in this illustration shows the distortion of the waveform that will occur if the Hold time is too short. The waveform is 100 Hz. The bottom track shows how the distortion is avoided by increasing the hold time.
limiter-hold.png
limiter-hold.png (36.86 KiB) Viewed 1767 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked