Compressor "Noise Floor" description for manual
Forum rules
This board is ONLY for general feedback and discussion about Audacity 2.X.
If you require help, or think you have found a "bug", please post on the forum board relevant to your operating system.
Windows
Mac OS X
GNU/Linux and Unix-like
This board is ONLY for general feedback and discussion about Audacity 2.X.
If you require help, or think you have found a "bug", please post on the forum board relevant to your operating system.
Windows
Mac OS X
GNU/Linux and Unix-like
-
jimmyhosen
- Posts: 94
- Joined: Wed Oct 08, 2014 6:00 am
- Operating System: Windows 7
Compressor "Noise Floor" description for manual
Hello,
I have a request: Would someone who can dissect the code for Audacity's default Compressor please help to craft a new description for the Audacity user's manual, regarding what exactly the "Noise Floor" feature does?
*** Edit: Also, please create at least one "starter idea" on how the Noise Floor feature could be used, including an example with sample parameter values and a disclaimer that people need to use their own values. ***
I am not talking about a general description for curious non-users of Audacity, like what already exists, because that does not help those of us who are trying to fully exploit its usefulness. I am talking about actually giving a technical/engineering description, preferably including graphs.
Please see also this discussion, for further insight:
http://forum.audacityteam.org/viewtopic ... 47&t=82140
I think the heart of the matter is in my reply to that discussion (the one bearing the same date as this very post which you are reading meow).
Anyway, this software is pretty amazing.
Thank you.
* Edited the title of the post, putting quotations around "Noise Floor" and adding "description for manual".
I have a request: Would someone who can dissect the code for Audacity's default Compressor please help to craft a new description for the Audacity user's manual, regarding what exactly the "Noise Floor" feature does?
*** Edit: Also, please create at least one "starter idea" on how the Noise Floor feature could be used, including an example with sample parameter values and a disclaimer that people need to use their own values. ***
I am not talking about a general description for curious non-users of Audacity, like what already exists, because that does not help those of us who are trying to fully exploit its usefulness. I am talking about actually giving a technical/engineering description, preferably including graphs.
Please see also this discussion, for further insight:
http://forum.audacityteam.org/viewtopic ... 47&t=82140
I think the heart of the matter is in my reply to that discussion (the one bearing the same date as this very post which you are reading meow).
Anyway, this software is pretty amazing.
Thank you.
* Edited the title of the post, putting quotations around "Noise Floor" and adding "description for manual".
Last edited by jimmyhosen on Mon Jun 15, 2015 9:00 pm, edited 2 times in total.
-
kozikowski
- Forum Staff
- Posts: 68901
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: Compressor Noise Floor description for manual
It's been my experience that if you play your cards right and led a good life, you can apply compression and the noise gets better. Not like earlier versions....
Koz
Koz
-
jimmyhosen
- Posts: 94
- Joined: Wed Oct 08, 2014 6:00 am
- Operating System: Windows 7
Re: Compressor Noise Floor description for manual
The compressor works by creating a "gain envelope" that responds to the peak or RMS level of the audio being processed. All of the clever stuff is in creating the gain envelope. Once the required gain has been calculated it is just a simple matter of multiplying the sample values by the appropriate gain value.jimmyhosen wrote:I am not talking about a general description for curious non-users of Audacity, like what already exists, because that does not help those of us who are trying to fully exploit its usefulness. I am talking about actually giving a technical/engineering description, preferably including graphs.
There is a "technical" description of how the envelope follower works included in the code:
The input is an envelope, e.g. something produced with
the AVG function. The purpose of this function is to
generate a smooth envelope that is generally not less
than the input signal. In other words, we want to "ride"
the peaks of the signal with a smooth function. The
algorithm is as follows: keep a current output value
(called the "value"). The value is allowed to increase
by at most rise_factor and decrease by at most fall_factor.
Therefore, the next value should be between
value * rise_factor and value * fall_factor. If the input
is in this range, then the next value is simply the input.
If the input is less than value * fall_factor, then the
next value is just value * fall_factor, which will be greater
than the input signal. If the input is greater than value *
rise_factor, then we compute a rising envelope that meets
the input value by working bacwards in time, changing the
previous values to input / rise_factor, input / rise_factor^2,
input / rise_factor^3, etc. until this new envelope intersects
the previously computed values. There is only a limited buffer
in which we can work backwards, so if the new envelope does not
intersect the old one, then make yet another pass, this time
from the oldest buffered value forward, increasing on each
sample by rise_factor to produce a maximal envelope. This will
still be less than the input.
The value has a lower limit of floor to make sure value has a
reasonable positive value from which to begin an attack.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
jimmyhosen
- Posts: 94
- Joined: Wed Oct 08, 2014 6:00 am
- Operating System: Windows 7
Re: Compressor Noise Floor description for manual
Steve, thank you for replying.
I could be wrong, but...
Looking at the first 2 sentences, I think the description you posted actually describes the compression section, not the Noise Floor section. Key words: "not less than":
I will try to take a look at the code. I don't have much coding experience besides GAS/JS and VBA, so hopefully I can find what I'm looking for in the comments...
I could be wrong, but...
Looking at the first 2 sentences, I think the description you posted actually describes the compression section, not the Noise Floor section. Key words: "not less than":
The word "floor" in its last paragraph seems to be a compression threshold, not the Noise Floor threshold. It refers to the section that I think talks about compression, not the Noise Floor feature. Key phrase: "reasonable positive value from which to begin an attack."The input is an envelope, e.g. something produced with
the AVG function. The purpose of this function is to
generate a smooth envelope that is generally not less
than the input signal.
I am still wondering whether an expander is used. FYI, I added another idea to my list of ideas in that other discussion.The value has a lower limit of floor to make sure value has a
reasonable positive value from which to begin an attack.
I will try to take a look at the code. I don't have much coding experience besides GAS/JS and VBA, so hopefully I can find what I'm looking for in the comments...
-
jimmyhosen
- Posts: 94
- Joined: Wed Oct 08, 2014 6:00 am
- Operating System: Windows 7
Re: Compressor "Noise Floor" description for manual
Also, this looks to me like a compression Release action, key words "less than" and "greater than":
If the input is less than value * fall_factor, then the
next value is just value * fall_factor, which will be greater
than the input signal.
Re: Compressor "Noise Floor" description for manual
The algorithm is not split into "sections" in the way that I think you are suggesting. There are simply two parts to the algorithm:jimmyhosen wrote:Looking at the first 2 sentences, I think the description you posted actually describes the compression section, not the Noise Floor section.
Part 1) The envelope follower.
Part 2) Amplification.
(there is also a "part 3", but that is just normalization)
Part 1 produces a control signal and is defined by the function EffectCompressor::Follow
This is where the quoted text came from.
Part 2 is the amplification stage and is defined by the function EffectCompressor::DoCompression
This stage simply amplifies the input signal by:
inverse_of_envelop ^ compression_factor
Clearly, when the envelope level = 1.0, the gain is unity (same out as in), but when the envelope level is less than 1.0, the gain is increased.
When the envelope level < 1.0, the gain is increased to the power of the compression_factor. This produces the compression.
The envelope thus rises and falls between "threshold" and 1.0, following the amplitude (peak or RMS depending on which has been selected). When the envelope is rising it is looking ahead and rises in advance of the the rising signal (which slows the "attack"). When falling it lags behind the falling signal (which slows the "release").
Of course we don't want the gain to rise too high for very quiet signals because that will cause an increase in noise level, so when the signal drops below the "floor" level for more than 100 samples, the envelope stops falling, thus the gain stops rising.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)