Page 7 of 14

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 11:31 am
by Paul L
If I understand the very old versions of NoiseRemoval.cpp correctly, it really was meant for removal. There was no reduction control, and instead there was a "level" that was more like Sensitivity now. It seems sensitivity contol under watever name got removed and later restored.

Sensitivity and the noise profile together determine what is noise ("discrimination"), and the other controls determine how it is treated.

So maybe the Sensitivity slider should be above the other sliders and just under the profile button.

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 11:40 am
by Edgar
As far as Preferences and Chains…
Internally, I think "NoiseRemoval" will need to remain as such but "Noise Removal" could be changed to "Noise Reduction".

Code: Select all

Find all "NoiseRemoval", Match case, Whole word, Subfolders, Find Results 2, "Entire Solution", "*.cpp;*.h"
  D:AudacitySVNsrceffectsClickRemoval.cpp(19):  The structure was largely stolen from Domonic Mazzoni's NoiseRemoval
  D:AudacitySVNsrceffectsClickRemoval.h(9):  (Structure largely stolen from NoiseRemoval.h by Dominic Mazzoni)
  D:AudacitySVNsrceffectsClickRemoval.h(47):     result.insert(wxT("http://audacityteam.org/namespace#NoiseRemoval"));
  D:AudacitySVNsrceffectsLoadEffects.cpp(33):#include "NoiseRemoval.h"
  D:AudacitySVNsrceffectsLoadEffects.cpp(203):   CatPtr nrm = em.AddCategory(wxT(ATEAM) wxT("NoiseRemoval"),
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(5):  NoiseRemoval.cpp
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(43):#include "NoiseRemoval.h"
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(84):   gPrefs->Read(wxT("/Effects/NoiseRemoval/NoiseSensitivity"),
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(86):   gPrefs->Read(wxT("/Effects/NoiseRemoval/NoiseGain"),
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(88):   gPrefs->Read(wxT("/Effects/NoiseRemoval/NoiseFreqSmoothing"),
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(90):   gPrefs->Read(wxT("/Effects/NoiseRemoval/NoiseAttackDecayTime"),
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(92):   gPrefs->Read(wxT("/Effects/NoiseRemoval/NoiseLeaveNoise"),
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(114):   mLevel = gPrefs->Read(wxT("/Effects/NoiseRemoval/Noise_Level"), 3L);
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(117):      gPrefs->Write(wxT("/Effects/NoiseRemoval/Noise_Level"), mLevel);
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(167):   gPrefs->Write(wxT("/Effects/NoiseRemoval/NoiseSensitivity"), mSensitivity);
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(168):   gPrefs->Write(wxT("/Effects/NoiseRemoval/NoiseGain"), mNoiseGain);
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(169):   gPrefs->Write(wxT("/Effects/NoiseRemoval/NoiseFreqSmoothing"), mFreqSmoothingHz);
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(170):   gPrefs->Write(wxT("/Effects/NoiseRemoval/NoiseAttackDecayTime"), mAttackDecayTime);
  D:AudacitySVNsrceffectsNoiseRemoval.cpp(171):   gPrefs->Write(wxT("/Effects/NoiseRemoval/NoiseLeaveNoise"), mbLeaveNoise);
  D:AudacitySVNsrceffectsNoiseRemoval.h(5):  NoiseRemoval.h
  D:AudacitySVNsrceffectsNoiseRemoval.h(42):      result.insert(wxT("http://audacityteam.org/namespace#NoiseRemoval"));
  D:AudacitySVNsrceffectsNoiseRemoval.h(47):      return wxString(wxT("NoiseRemoval"));
  D:AudacitySVNsrceffectsRepair.h(34):      result.insert(wxT("http://audacityteam.org/namespace#NoiseRemoval"));
  Matching lines: 23    Matching files: 6    Total files searched: 840
To preserve Preferences all of the:
gPrefs->Write(wxT("/Effects/NoiseRemoval/…
and
gPrefs->Read(wxT("/Effects/NoiseRemoval/…
which rely on NoiseRemoval need to be honored unless we write a lot of conditional code to look for both NoiseRemoval and NoiseReduction (which may already be happening with other preferences).

The really ugly place we would need to retain NoiseRemoval is in NoiseRemoval.h:

Code: Select all


   virtual wxString GetEffectIdentifier() {
      return wxString(wxT("NoiseRemoval"));
   }
which is where Chains gets its identifier:
chains.png
chains.png (21.46 KiB) Viewed 1233 times

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 11:46 am
by Edgar
Paul L wrote:And here's a minor UI nuisance I just found...

7) If you change the attack/decay from the default of 0.15, you can't set it back to that value again exactly. (0.10 gets remembered in preferences.)
Windows 7, SVN HEAD; just tested here and could not re-create this.

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 12:35 pm
by Gale Andrews
waxcylinder wrote:I agree with Koz (and others) that it would be a good change just to change the name of Noise Removal to Noise Reduction.
As you know I disagree with you all on that. Practical considerations aside, if the effect is called Noise Reduction, then the "Remove" button is misnamed.

We choose here to be verbose in the dialogue so we could explain that removing noise creates distortion.

The Isolate button is already misnamed, it seems. Of course if it is called "Isolate" it should do the opposite of "Remove". What other expectation would one have?
waxcylinder wrote:Personally I would like to see such a change made before 2.0.6.
-1 to that.
waxcylinder wrote:I'll be happy to spend time fixing the Manual if this change gets made ...
It may be more useful to address the many Manual P1's and to test the code we already have for the many lib-src changes that were made after 2.0.5 release.


Gale

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 12:51 pm
by Gale Andrews
waxcylinder wrote:
Paul L wrote:The truly minimal change would leave a mismatch between names in the code and names in the dialog. Programmers might live with that. Ah, but would it break saved Chain files and preferences? That might make some users a little unhappy during migration.
A very good point Paul - a regression with Saved Chains ... :(

So maybe we just let sleeping dogs lie ??
I assume we could do string replacement as we have done before when we changed Chain command names, but I still think the rename is misguided.

IMO, the fundamental reason for arguing that Noise Removal should be called Noise Reduction is that Noise Removal is still inferior to Noise Removal/Reduction in other apps.


Gale

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 1:09 pm
by Paul L
Gale Andrews wrote:IMO, the fundamental reason for arguing that Noise Removal should be called Noise Reduction is that Noise Removal is still inferior to Noise Removal/Reduction in other apps.
In what ways is it inferior?

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 1:24 pm
by Gale Andrews
Paul L wrote:
Gale Andrews wrote:IMO, the fundamental reason for arguing that Noise Removal should be called Noise Reduction is that Noise Removal is still inferior to Noise Removal/Reduction in other apps.
In what ways is it inferior?
Don't you get better results (more removal for less artefacts) in almost any other app you try?


Gale

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 1:39 pm
by steve
Paul L wrote:Ah, but would it break saved Chain files and preferences? That might make some users a little unhappy during migration.
As Gale mentioned, that is easy (though not pretty) to work around and has been done before.
Gale Andrews wrote: if the effect is called Noise Reduction, then the "Remove" button is misnamed.
If I have a bag containing 10 apples and I "remove" 4 apples, I have "reduced" the number of apples in the bag.

There is no linguistic problem if we say we are "removing" noise and specifying "how much" we are removing. The effect of "removing" some of the noise is that we have "reduced" the amount of noise. To say that we have "removed" the noise is misleading because it implies that we have removed all of the noise, which as we all know causes unwanted side effects that can be worse than the problem that we started with.
Paul L wrote:In what ways is it inferior?
Some applications have significantly more effective noise reduction, in that they can often reduce the same amount of noise with subjectively better sound quality. Examples include: Gnome Wave Cleaner "Denoise", Adobe Audition "Noise Reduction/Restoration > Noise Reduction", Sony SoundForge "Noise Reduction", Reaper "ReaFIR".

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 1:51 pm
by steve
waxcylinder wrote:I agree with Koz (and others) that it would be a good change just to change the name of Noise Removal to Noise Reduction.

I like stuff that "does what it says on the tin" - and reduction, not removal, is what the effect does - clarity of purpose should be explicit in the syntax nomenclature, otherwise we find ourselves setting unrealistic expectations for users.

Personally I would like to see such a change made before 2.0.6. Surely such a simple change cannot de-stabilize the code? I can't change the code - but I'll be happy to spend time fixing the Manual if this change gets made ...
+1 for changing the name.
-1 for changing it before 2.0.6 (and I would not expect the release manager to agree to the change).

Gale has mentioned before that some users may see the change from "Noise Removal" to "Noise Reduction" as an indication that the effect has been watered down and is less effective than before. I think it is a reasonable point that some users might think that, though why we might purposefully make an effect worse is a mystery.

I'd be happier if the name change occurred at the same time as replacing "Noise Removal" with a "Noise Reduction" effect that is demonstrably better. Personally I would even be happy about the new effect being incompatible with existing Chains if the new effect was better (a very small price to pay).

Re: NoiseRemoval.cpp

Posted: Wed Jul 30, 2014 2:18 pm
by Paul L
Dare I hope that I might be discovering improvements?

I have identified some places where errors were introduced by others that did not respect Dominic Mazzoni's intentions. It is a matter of logic to prove that.

But now I think I know some variations on Dominic's algorithms that are worth trying. Whether these should be adopted will be a matter of opinion and not mine alone.

If anyone is interested in testing it after 2.0.6 let me know.

If I take some speech and try extreme settings of 48 dB reduction and the minimal attack/decay and frequency smoothing, and sensitivity 0, I get many obvious artifacts IN THE WORDS.

I have a variation I wrote just this morning that eliminates almost all of these. But effective noise reduction in the pauses is perhaps 6-7 dB less and more subtle tinkles are heard in the PAUSES -- if you apply extreme amplification to pauses with the pan control.

That was as I anticipated, but I believe (haven't tried yet) that increasing the sensitivity may remedy that.

I suppose I could have this variation of the algorithm controlled by a hidden preference so you could edit the config to try it.