Bugzilla – Bug 1255
Leveler effect not fit for purpose
Last modified: 2018-08-20 11:51:47 UTC
The designed purpose of the Leveler effect is: "a simple, combined compressor and limiter effect for reducing the dynamic range of audio." The Leveler effect is actually a "waveshaper" (https://en.wikipedia.org/wiki/Waveshaper) and as such is unsuitable for its intended purpose. For reducing dynamic range, the Compressor and/or Limiter effects should be used. The Leveler effect does have one other use, and that is as a "distortion" effect. However, as a distortion effect it is badly named and very limited. As we now have a simple to use Limiter effect, the Limiter effect should imo be renamed as a distortion effect and enhanced to become a more versatile waveshaping distortion effect.
And... to help those use Limiter to reduce dynamic range because the built-in Compressor is too complex/does not behave like a textbook compressor, add a more simple Compressor (or better, Compressor/Expander). Steve's unadvertised Expander that was once part of an experimental Compressor/Expander is the best expander I have ever used. :=)
Bill wrote in the ednote on the Leveler page in the Manual back on 27Aug2012: "I would hope that the Leveler will soon be dropped from Audacity. If I understand the history correctly, this was added for use with CleanSpeech at a quick and dirty (very dirty!) compressor that could be used in a chain. It introduces unacceptable distortion (IMO) when used as a compressor. It has some (very limited) use as a "distorted vocal" effect. So, I'd rather lobby for its removal rather than spend more time documenting it." I'm minded to agree with him - and with Steve
James as a TL member added his approval for the removal of this effect via an email thread discussing Leveller/Leveler.
And if we do remove it should we be considering adding it to the list of available plug-ins on the Wiki (just in case we get complaints from users who use this)?
(In reply to Peter Sampson from comment #4) I am intending to make "Leveler" (or "Leveller") one of the options in the new "Distortion" effect. The Distortion effect that I am currently working on is a "waveshaper" (https://en.wikipedia.org/wiki/Waveshaper). The Leveler effect is also a waveshaper. The new effect replaces the multi-choice controls with text box and slider controls, which allows greater control. Rather than just 6 "amount" settings, the new version has an "amount" slider which again allows greater control and a greater range of "heaviness". Unlike the Leveler, the effect is always applied in a single pass (the Leveler uses multiple passes to produce a "heavier" effect), so it should be faster and more efficient on heavy setting than the Leveler. The new Distortion effect can be thought of as a much enhanced version of the Leveler effect that has been named more appropriately. I don't buy into the argument that "moving the Leveler effect into a Distortion effect is a regression because naive users will not be able to find it". If a user does not know that the Leveler is a distortion effect, then they are not only naive but are misguided and at risk of inadvertently damaging their work. By calling it a distortion effect, we are conveying vital information to users.
(In reply to Steve Daulton from comment #5) Looking at the code for the Leveller / Leveler effect, the reason why this effect is so bad becomes apparent: How the effect "should" work: 1) EffectLeveller::CalcLevellerFactors() Create a "gain map" to define the amount of gain to apply according to the input level. 2) EffectLeveller::ProcessBlock() Send "frames" from the input buffer to LevelOneFrame(frame) for processing. 3) EffectLeveller::LevelOneFrame(float frameInBuffer) Apply gain to the "frameInBuffer" according to the "gain map" and return the processed audio to the output buffer. The problem: The effect does not and never has done what it was intended to do because there is no implementation of "frames". Rather than sending a "frame" from ProcessBlock() to LevelOneFrame(), individual samples are sent. Because the gain is adjusted "per sample" rather than "per frame", the effect acts as a "waveshaping distortion effect" rather than as a "dynamic compression effect". Summary: The effect code is incomplete, so it has never worked correctly. The effect 'could' be completed to perform the effect that was originally intended, but that would dramatically change what the effect does and what it sounds like, so it would be misleading to retain the name Leveler / Leveller.
(In reply to Steve Daulton from comment #6) So as assignee, Steve, are you going to give us a proper distortion effect and a simple compressor/expander?
(In reply to Gale Andrews from comment #7) As assignee for bug 1255 I intend to remove the "Leveller" menu item and replace it with a "Distortion" menu item. The "Distortion" menu item will open a new effect which will be a "waveshaping distortion" effect. To avoid a regression, the new effect will include the algorithm used by the current "Leveller" effect as one of its settings. This setting will be called "Leveller". The "Distortion" effect will include additional settings. As far as I'm aware, this new effect will be the first built-in distortion effect in Audacity and will be subject to improvements and further development in the future. It will provide substantial improvements over the current "Leveller" for the purpose of applying waveshaping distortion. ---------------- We currently ship two effects for reducing dynamic range, namely the "Compressor" and "Limiter" effects. Whether we want a third effect for changing the dynamic range is a discussion that we could have on ~quality mailing list. Such a discussion goes beyond the intended scope of bug 1255. I am interested in exploring the potential of a new dynamic range compression effect utilizing the transformation map of the current "Leveller" effect. That will be a dynamic range compression effect along the lines of what appears to have been the originally intended process of the "Leveller" effect. I don't consider this exploration to be the subject of bug 1255, but could be part of a new "enhancement" subject to the outcome of discussions about whether we need more dynamic range effects in Audacity. I am also interested in developing the "Limiter" effect as a built-in effect with real-time preview.
Marked as "resolved" as the Leveler (Leveller) effect has been replaced with a waveshaper distortion effect.