Does normalizing require upconverting to preserve quality?

Had so many questions, so I decided to register and ask you people :slight_smile:

I have been editing music for several years now, and recently discovered that, in order to maximize quality, up-converting (bits, samples) is required before amplifying. However, should I upconvert before I normalize? Would that make a difference?

I am pretty sure OS and Audacity version does not matter here.

Audacity converts everything to internal format. It’s whatever sample rate you picked in preferences (44100, 48000) and 32-Floating bit depth. A very common Export complaint is the slight noise that Audacity generates when it converts from 32-Float back to your desired output format. So I probably wouldn’t bother to convert anything before importing. It will just be extra work for no noticeable gain.

Koz

By default Audacity will convert WAV files to 32 bit float format on import, which allows amplification to be performed with extremely high precision.
Processing in Audacity is always in 32 bit float format so it is best to stick with the default 32 bit float format so there is only once conversion back to integer format (probably 16 bit) when you export.

What I am talking about is applying effects to 44100 or 37800 hz files. Should I upconvert those before adding effects?

Who said you should upsample before amplifying?

Resampling sample rates (leaving pitch and tempo unchanged) up and then back down (assuming you want to export at the original rate) is lossy in absolute terms.

Why would you want to do that?

By the way some players may not play files at 378000 Hz (it’s a very non-standard rate). That may be a better reason to resample that file.


Gale

I know the first part. But, will up-converting sample rate be a good idea before applying an effect? Like, 44100 to 96000, apply edit, back to 44100. I came across an article about a year ago that was all about how effects programs will inevitable make mistakes, and if the rate is 96000, those mistakes will be very small, and virtually disappear if you down-convert.

No, that article is wrong. For amplifying there is no benefit in upsampling before processing. There may be benefits for some processes such as pitch stretch effects where aliasing distortion could be an issue, but no benefit for amplifying.

Thank you so much; now I know a little more.

However, there is one thing I don’t quite understand: if any 16 bit .wav file is automatically converted to 32 bit on import, and then back to 16 on export, will the end file be identical to the original, if no edits were made? I am just terribly paranoid about preserving original sound of all my files.

If you want the exported file to be the same as the imported file in that hypothetical case, you will have to set Dither to “None” under “High-Quality Conversion” in the Quality Preferences.

There is some information about Dither (and why you might still want to keep it on when downsampling the bit depth) here:
http://wiki.audacityteam.org/wiki/Dither .




Gale

That article is quite confusing to someone who doesn’t know much about audio (me).

“Exporting a 16-bit track to 16-bit with dither set to “none” will be lossless.”

But wasn’t it said earlier in the thread that .wav files are always converted to 32 bit? If that is true, you cannot export 16 to 16, since automatic up-conversion has been performed on import.

I am very confused here.

If the Audacity Quality Preferences are set to 32-bit float, you will have a 32-bit float track after import.

If you want to import as 16-bit you have to change to 16-bit in Quality Preferences.

This isn’t recommended for most purposes because processing edits including Amplify will add dither when the data that has been processed in 32-bit float is returned to the track as 16-bit. Of course you can turn dither off, but then you will get quantisation errors which may sound worse than the dither.

If you process in 32-bit float you will only have the downsampling to 16-bit on export to deal with.

Only your ears can tell you what sounds right.



Gale

I think I understand now. I only have three questions left now:

  1. If I set default to 32, import a 16 bit track, do some simple editing (like cut+paste), and export at 16 bit without dither, would I end up the same track I imported (sound/quality)?

  2. Scenario 1: import as 32 bit, do some complex editing (like amplify), then export as 16 bit without dither. Scenario 2: import as 16 bit, do complex editing with dither, export as 16 bit without dither. What is the difference between the two?

  3. Can I use dither while editing, but not when exporting? Is there a way to do that?

Yes.


The critical factor here is that the audio data is being “processed” - that is, the individual samples have their values changed.
Scenario 1: This is not ideal because there will be some “distortion” (“quantize” errors / “rounding errors”) when converting from 32 bit float to 16 bit.
Scenario 2: If you apply more than one process, this is not ideal because dither will be applied on each process, which is more dither than necessary, thus more “dither noise” than there needs to be.

Ideally, for applying one or more “processes” to a 16 bit source file, the file should be imported as 32 bit float, processed as required, then exported with dither enabled. Processing 32 bit float data does not apply dither (it is not required) and dither is only applied once (on export when the 32 bit data is converted to 16 bit. This is the default behaviour in Audacity.


Currently the only place to enable or disable dither is in the Preference settings.
As nearly all jobs involve some form of processing (whether it be amplifying, fading in or out, equalizing, noise removal, or any sort of Effect) it is generally advised to use the default settings of 32 bit quality settings and dither enabled in the High Quality Conversion settings.

The one exception to this is the case of applying only simple cut/copy/paste type edits (that do not change sample values). In this case the results will be marginally better by switching dither off (but this benefit is small and only likely to be noticeable in periods of absolute silence with the playback volume turned up loud.)

So, to preserve the original sound, if I want to, for example, reduce bass in a 16 bit track… I should import it as 32 bit, do the edit, and export without dither?

I wouldn’t say that.
When you Import the file and do nothing, with the actual sample values, then dithering is not necessary.
On the other Hand, any effect that you apply in 32 bit mode will produce sample values in that range to form smooth curves.
As soon as you reconvert to 16 bit, the curvature gets steppy.
This produces Aliasing, i.e. some frequencies are fold back into lower ranges. Dithering tries to even out the odd fractions between values to still provide a smooth curve (measured over time).
The Goal is to apply this dithering only once - it is the last step of the mastering process just before delivering the end product.
There are specialised Plug-Ins out there which provide full control for high Quality dithering.
Internal dithering is of course always turned off.
It’s sometimes rather an academic question, which algorithm is the best. Only your ear can decide.
Don’t fall into the trap to chase for annoying dithering noises. It drives you mad and makes you paranoic.
A lot of those Plug-Ins have “zoom” functions for the preview in order to make the -70 dB noise audible.
Even if you have found the right shape and frequency Profile in this manner, it want help you. The human Hearing System does not work that way.
Frequency sensivity and the perception of noise that is offending or pleasing depends on the Overall loudness. That’s why all those perception curves and loudness meters are essentially good for nothing. Only a Little part of the loudness spectrum will be covered.
Psychoaccoustics introduces every few year a new Parameter to describe the perception of Sound and noise (sharpness, roughness etc.).
Dithering will in any case Sound better than aliased frequencies.

To summarise Robert’s reply and reiterate my previous reply: Reducing the bass requires “filtering” which is a “process” (it changes the sample values), so it is best to work in 32 bit with dither enabled (which is the Audacity default).

Personally I wish that Audacity would do the “right thing” automatically and so save users from this confusion and simply provides an option in the Export dialogue to provide dither choices on Export.

You mean, a checkbox that when enabled, over-rides the High-Quality dither Preference being “on”?


Gale

No, I mean (as discussed on -devel) that processed audio is always returned to tracks in 32 bit float format (so as to avoid needless and possibly damaging format conversions), and that dither options are provided in the Export Dialogue rather than in Preferences (as they then only apply to export). There would then be no need to confuse users with different track formats - audio track data would always be in its original imported format unless processed. If processed it would always be in 32 bit float format (as processing is always 32 bit float).

The (actual) sample format should also be checked by the export code so that dither is not needlessly applied to data when the format is not being converted to a “lower” format.

Does the Setting of the sample Format make any sense after all?
Since Audacity works exclusively in 32 bit mode, the re-converting in each step (to 16 bit for example) is nothing but destructive.
How about a warning box that informs the user that a conversion to 32 bit float is necessary to apply the current effect.
Maybe with a few Options such as:

  • re-convert to after processing
  • Convert to 32 bit permanently (recommended).
    and two control Buttons for
    x dithering on Export
    x Show this warning in case of internal conversion.

How about the Project, are the 16 bit tracks saved as such in the Project itself and thus the aliasing or unnecessary dithering is “mixed down” forever?

Exactly my point.

“Warnings” are useful when they enable people to avoid dangers (Warning: Mind your head. Warning: slippery road ahead. Warning: Vehicle reversing.)
There is no real point in warning someone of something that is inevitable and unavoidable (Warning: making an omelet will cause eggs to be broken).