HydrogenAudio

Lossy Audio Compression => Other Lossy Codecs => Topic started by: Bourne on 2006-03-19 20:10:15

Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-19 20:10:15
---
Title: is WAV normalization lossless?
Post by: Garf on 2006-03-19 20:12:31
Wav normalizing is *lossy*.

The reason for this is that all WAV data *does* have to be changed for the volume to be changed, unlike MP3, where a single gain value for the entire file can be adjusted.
Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-19 20:29:12
---
Title: is WAV normalization lossless?
Post by: Garf on 2006-03-19 20:34:53
Basically, no.

But for what you are doing, the loss is of such an extent that I surely wouldn't worry about it.
Title: is WAV normalization lossless?
Post by: benski on 2006-03-19 20:57:05
Normalizing WAV files is "lossy" in the same sense that being charged 4.5% tax on a $1.00 purchase is lossy (since you can't have half a penny or half a bit).

There is a PEAK chunk that can be added to a WAV file.  The PEAK chunk stores the peak amplitude value, and thus the file could be normalized by the decoder.  Normally it is used for floating point audio.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-19 22:19:12
Saying that normalization is 'lossy' is way overstating the facts. There are rounding errors; every sample must be a discrete 16 bit value. To normalize you multiply every sample by the normalization value. In most cases the result of the multiplication is not an exact 16 bits (like multiplying any number by pi) so the remainder is thrown away. Its a quantization error, the same as creating a 16 bit sample from analogue in the first place. Any lossy compression makes far greater changes in the data.

These errors can possibly add up to something audible if you do enough operations on 16 bit samples (noise reduction, + pop and click removal, + compression, + hard limiting, + reverb, + EQ, etc) but for a single normalization the error is more theoretical than actual in that it will never approach audibility.
Title: is WAV normalization lossless?
Post by: Garf on 2006-03-19 22:22:21
Quote
Saying that normalization is 'lossy' is way overstating the facts.
[a href="index.php?act=findpost&pid=372670"][{POST_SNAPBACK}][/a]


Lossless is a well-defined term.

Normalizing a WAV is not lossless.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-19 23:03:00
Its true that normalization isn't exactly a two way mapping, but I did not write anything suggesting that it is, although it almost is, relative to most other things one might do to an audio file. I don't know what numerical value to place on its impact in terms of errors, but I suspect it would compute to a least an order of magnitude less than the operations usually referred to as "lossy." I repeat that a single normalization transform on a file is insignificant in terms of anything audible -- except of course that playback will be at a different volume.

I believe I understand the way in which you are using the word, but I don't recall seeing it applied to normal transforms. These, such as normalization, are not very relatable to the information reduction processes where the term is most commonly used.  For my enlightenment, can you point to an accepted definition that includes these other processes?
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-19 23:07:02
And within that 'lossy' concept, mp3gain is also effectively lossy. The 'loss' is applied at playback time rather than destructively to the file itself, but its result is surely not a wit less.
Title: is WAV normalization lossless?
Post by: esa372 on 2006-03-19 23:11:57
Quote
My goal is to burn a standard Audio-CD with CDDA(WAV) tracks with mixed music/artists, but each music has its own volume level. Burning the lossless WAV of course does not alter the data, but the volume levels for each track are all different. Is there any special process one could do in order to level the tracks equally?
You could:

1) encode the WAV files with a lossless audio codec (FLAC, WavPack, etc.)
2) use Foobar to apply ReplayGain
3) use Foobar or Burrrn to write the CD with the ReplayGain values

That should do the trick.

Title: is WAV normalization lossless?
Post by: benski on 2006-03-19 23:16:51
It depends on the source material, but normalization will add no more than 6dB of quantization noise, and will add 3dB of quantization noise on average.

I would define an operation f(x) as lossless, if there exists a function f-1(x) such that f-1(f(x)) = x.  Clearly this is not the case with normalization unless it is a multiple of 2 (6dB)
Title: is WAV normalization lossless?
Post by: Garf on 2006-03-19 23:29:22
Quote
And within that 'lossy' concept, mp3gain is also effectively lossy. The 'loss' is applied at playback time rather than destructively to the file itself, but its result is surely not a wit less.
[a href="index.php?act=findpost&pid=372694"][{POST_SNAPBACK}][/a]


You are simply wrong: the playback is lossy. mp3gain is not. Depending on the decoding setup, this does or does not make a difference, but it certainly is something different from doing it with a WAV.

You can reverse the change 100%. This is not possible with WAV. This is why mp3gain is lossless, and gaining a WAV is not.

Meaning, you can put any mp3 file into mp3gain, run it through, undo it, and end up with the same file. No information is lost, original is 100% recoverable.

You cannot do this with WAV except in degenerate circumstances.

Is this important? It depends on what you want to do. Consider switching between album and track gain 100 times. No loss with mp3gain. With a WAV, you might have issues.
Title: is WAV normalization lossless?
Post by: audio2u on 2006-03-20 00:23:07
Quote
Consider switching between album and track gain 100 times. No loss with mp3gain. With a WAV, you might have issues.
[a href="index.php?act=findpost&pid=372704"][{POST_SNAPBACK}][/a]


It seems to me at least, that this is a rather theoretical oversimplification of the problem.
The original poster wanted to know if normalising a wav was lossy, to which you, Garf have said "yes" and AndyH has said "no".
I agree with Andy.
No, it's not lossy.
Yes, as AndyH suggested, there are minute rounding errors at the bottom end of the dynamic range, but not enough for you to hear it after just one transform.
Garf, I appreciate your theory that normalising a wav up and down 100 times might introduce errors, but that's not a real world example, is it?
The orignal poster wanted to normalise some wavs to burn to CD, which only amounts to one transformation of the wavs, not 100's.
So, what we're really talking about, in this instance, is... is it lossy after one transformation, to which I'd say again, "no".
And to the human ear (which is analogue), the same distortion (if you want to be a real stickler for the numbers) introduced by normalising a wav prior to burning to CD, will also be introduced by gain replaying an MP3, because it's still just a 16 bit source, and if you normalise it on playback, there is stil real time "distortion" happening to the bits at the bottom end of the dynamic range.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-20 01:04:29
Just out of curiosity I took a CD track and normalized it. In this case that was a fairly substantial 5.71dB increase in amplitude. Then I reversed the process by amplifying by -5.71dB. I mixed-pasted inverted the original into this result. As a rough and ready measure, the Average RMS measurement across the final outcome of these two normalization operations is -95.3dB – almost certainly very difficult to detect by ear.

For comparison I converted that same track to a CBR320 mp3, then decoded it. The Average RMS on the result of mix pasting the original back into that result is -63.4dB. This is also very small, but it is an order of magnitude larger that on the normalization operations.

I'm not saying this is the best way of comparing the two processes but it does give some idea. Also, normalization is only one operation, there is no additional change at playback, so the actual error is less than indicated here. MP3 playback requires both operations.

I did not get my request fulfilled for a definition of ‘lossy' that includes transformations such as normalization. Its more common usage refers to some process that actually reduces resolution rather than one that simply has small errors.

The process esa372 described is, unfortunately, just another, rather long winded, way of applying normalization. It cannot result in any less error.

The rebuttal to my comment about mp3gain did no more than restate my position; I did say ‘effectively.' I understand the difference if we consider the file as a starting point for further software transformations, but the result to the listener of the music is the same. In the sense that the inquirer asked the question -- does it 'degrade' my music -- mp3gain is no more 'lossless' than is normalization.

I don't think we really have any disagreement here except on the definition of one word. There doesn't seem to be any great confusion about what actually happens, no?
Title: is WAV normalization lossless?
Post by: kjoonlee on 2006-03-20 01:18:26
I don't think that can be reproduced. (edit: If it can, it's not a fair comparison.)

Wav normalization is certainly not lossless, therefore it must be lossy.
Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-20 02:05:10
-
Title: is WAV normalization lossless?
Post by: kjoonlee on 2006-03-20 02:10:13
Not really. Your old tracks will be the same, but the new tracks will be different from the originals; they will all have been altered to have a similar volume level.

edit:

Quote
But for what you are doing, the loss is of such an extent that I surely wouldn't worry about it.[a href="index.php?act=findpost&pid=372640"][{POST_SNAPBACK}][/a]

Well said.

Here's another vote for Replay Gain, which is better than peak normalization.
Title: is WAV normalization lossless?
Post by: kjoonlee on 2006-03-20 03:32:30
The Japanese term for "lossless compression" is (edit: literally) "reversible compression." The Japanese term for "lossy compression" is "irreversible compression."

If it's reversible, it's lossless. If it's lossless, it's reversible.
If it's irreversible, it's lossy. If it's lossy, it's irreversible.

Peak normalization is irreversible; therefore, it is lossy.
On the other hand, mp3gain is reversible; therefore it is lossless.

--- --- ---

I don't think I've ever heard people say "lossless" to mean "preceptually virtually lossless."
Title: is WAV normalization lossless?
Post by: Martin H on 2006-03-20 03:51:01
Quote
I did not get my request fulfilled for a definition of ‘lossy' that includes transformations such as normalization. Its more common usage refers to some process that actually reduces resolution rather than one that simply has small errors.

The term "Lossy" of course just reffers to the fact that a loss will occure, no matter how small or how imperceptible it is... You cannot say that just because the loss is neglible then the process sudently isn't lossy anymore...
Quote
Wav normalization is certainly not lossless, therefore it must be lossy.

Absolutely

Edit: Beaten by kjoonlee
Title: is WAV normalization lossless?
Post by: jaktek on 2006-03-20 04:40:35
Quote
Quote
My goal is to burn a standard Audio-CD with CDDA(WAV) tracks with mixed music/artists, but each music has its own volume level. Burning the lossless WAV of course does not alter the data, but the volume levels for each track are all different. Is there any special process one could do in order to level the tracks equally?
You could:

1) encode the WAV files with a lossless audio codec (FLAC, WavPack, etc.)
2) use Foobar to apply ReplayGain
3) use Foobar or Burrrn to write the CD with the ReplayGain values

That should do the trick.


If you look at what Burrrn is actually doing, you will find that steps 1 and 2 are completely unnecessary.  Burrrn does not use the Foobar replaygain values;  it takes the wav files (after decoding if necessary) and applies WaveGain to them.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-20 07:42:49
Maybe I overstated reality when I said that everyone know what is actually happening. This process of "write the CD with the ReplayGain values" is first normalizing the file, then writing it to the CD.

We have two aspect of the difficulty here. One is that some of you have decided to apply the term 'lossy' to quantization error. There is no argument on my part that there isn't an irreversible change, but I suspect you can't find your definition of lossy anywhere used by the rest of the world. Normalization is definitely not compression, of any sort. Lossy just isn't the correct word in that context. Show me that I'm wrong and I'll acknowledge it. Ok, I'll even acknowledge it here: it is the slang usage this group has adopted as its own in-group speak; I should recognize the sloppy terminology in the future without comment.

The other aspect of it is that my original post was simply an objection to that technically incorrect use of the term (lossy) ...because... I saw it giving the wrong impression to the person asking the question. I sort of assumed Bourne understood the lossy concept and was just ignorant of its involvement, or non-involvement, in his operation of interest. That he understand the term may be assuming too much, I don't know.

Surely the only useful reason for wanting to know about the results when making a compilation CD, which is just something to listen to, is to know whether or not it might degrade the audible quality. With any lossy compression there is always that possibility, but with normalization there isn't, therefore the difference has some meaning.
Quote
I don't think that can be reproduced. (edit: If it can, it's not a fair comparison.)
Wav normalization is certainly not lossless, therefore it must be lossy.

Bananas have a yellow skin. That sour oval shaped fruit has a yellow skin, therefore it must be a sour banana? In the usual use of the term lossy, your application to compression is correct, your application to normalization is not. However, I don't think that horse can even twitch a muscle any more, so I think I'll quite beating it.

I don't know what you mean either by reproduced or fair. If you think I can't do it again and get the same result, or that someone else can't do it and get the same result, you are wrong.

For some kinds of situations, the mix-paste inverted is very good for presenting a picture of what has, or has not, happened. It might even give you some idea about the differences you hear (or don't hear).

When used to compare an original file and its perceptually encoded, then decoded, version, it is a much less useful tool. It really isn't any kind of a guide at all to differences in the sound of playback, which is what one is usually interested in. It does give some insight into how much the file is physically changed by the process but not to the relevance of the changes.

Again out of curiosity I did the same test but resample the file to 32 bit before doing the amplification, de-amplification. Then I resample back to 16 bit to compare with the original. This time the Average RMS measurement on the result was -117dB, rather well below perception I suspect. Common advice is do all transforms in 32 bit but when the straight operation gives  -95dB, is there any reason to strive for -117dB? It depends on how many operations you are going to do.

I also tried the experiment of simply resampling to 32 bit then back to 16 bit, then did a mix-paste inverted with the original. All measurements were either minus infinity or zero, as appropriate. There might be rounding errors, but they are clearly well below 16 bit resolution. However, if resampling the bit depth simply changes the data type of the number then I think that probably means there is actually no change that could possibly effect the final result, i.e. no errors. Only applied transforms could make any difference.
Title: is WAV normalization lossless?
Post by: kjoonlee on 2006-03-20 07:59:17
You're using straw man tactics to refute what I haven't said.

Also, you're still not doing a fair comparison.

1. Pick an MP3 file. Decode it to .wav.
2. Decrease the volume of the original MP3 file
3. Increase the volume of the MP3 file from step 2. Decode it to .wav
4. Decrease the volume of the .wav file from step 1.
5. Increase the volume of the .wav file from step 4.

Files from step 1 and step 5 will be different, so the wavgain process can be proved to be lossy.

Files from step 1 and step 3 will be the same, if nothing goes wrong. In such cases, MP3Gain would have been lossless.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-20 10:57:01
A fair comparison of what? I did a comparison of the amount of change due to errors (normalization) vs the amount of change due to a lossy process (least lossy encode to mp3). The point of it is that the amount of change due to normalization, which is not technically a lossy process, does not compare to that from even the least mp3 compression, which is a lossy process.

Technically, a lossy process is one which deliberately discards data (data that is ‘expendable' by the criteria of that particular process). Normalization definitely does not do that. Lossless is simply used as contrast for a process similar to the lossy one that does not discard data. Compression is the main data manipulation to which the terms correctly apply. That lossy isn't exactly reversible is simply a measurable characteristic, the result not the cause.

Someone borrows money from you. You being a sharp operator get an agreement for 3.25% interest compounded every day. After a number of weeks the person returns with the principal and some extra to pay your interest changes. You make the calculation and exact your due, down to the last penny (this is the smallest measure of physical money in the U.S., 0.01 dollar, in case you are unaware of U.S. currency terms).

But wait, the calculation that gave you the amount to charge wasn't exact to the penny. One bank I did business with explained that to duplicate their results I had to carry out all my calculations to 12 decimal places. Whatever number of decimals you choose, rounding will be involved. It is extremely unlikely your final result will come out to the even cent. You will round up or down in order to know exactly what to charge. Do you call that rounding lossy? If so, I say you are really stretching the language, making up your own definitions as you go.

Your suggested test is between destructive and non-destructive processes. As applied to audio editing and similar activities, a destructive process alters the source data, a non-destructive one alters the data as it is being used in real time, without changing the source. What's to argue about there? What's to test? Whether or not some particular process is destructive or non-destructive? Who raised that question?

Perhaps it was raised in the suggestion to use ReplayGain (a non-destructive process?) within a CD writing application. ReplayGain may be non-destructive, not altering the original source, but its result in the data that is written to CD will of necessity be destructive (but not lossy, no data is discarded), the file written to the CD will contain altered data. This is normalization by another route. I don't, however, see how that relates to the tests I ran. I also don't know how many ways I can say that my posts had nothing what-so-ever to do with any claims that data is not altered during normalization. I never even slightly suggested that normalization is non-destructive -- but of course it can be.

You can't write files to an audio CD that are both normalized and unchanged from pre-normalization, but you can do normalization non-destructively. Normalization is another word for amplification. It can be positive (increase) or negative (decrease). Normalization, as it is most commonly used in digital audio, is just a special case of amplification where the amount is (usually) automatically calculated by a program and applied across whatever audio is selected.

When levels are adjusted in a multi-track editor, perhaps also in some simpler editors, the process is non-destructive on the sources. It is only applied destructively on a mix-down file. During editing, all processes, such as the level adjustments, are applied in real time as the data is played. This is exactly what is accomplished in any non-destructive process, such as the MP3Gain you suggested for testing. There isn't any difference.
Title: is WAV normalization lossless?
Post by: Martin H on 2006-03-20 23:07:50
Quote
Normalization is definitely not compression, of any sort. Lossy just isn't the correct word in that context.

Technically, every process that involves a loss, that being rounding errors or not, is simply a lossy process and hence, WAVE normalization is definetely lossy(as it isn't lossless). The fact that lossy compression has a bigger loss than WAVE normalization does is entirely besides the point, as we are not talking about lossy compression here, but simply a lossy process in general...
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-21 01:37:10
This is truly broke record country. That has been said a dozen times in this thread, but "technically" the declaration is not correct. In this group's mind set it seems to be, but try to find a genuine, generally accepted definition that says any such thing. Lossy refers to the process, primarily compression. It is lossy if it deliberately discards data. One consequence of lossy compression, one particular detail, is that it isn't completely reversible. The data that has been discarded, with deliberation and forethought, doesn't come back when the file is decompressed.

People in these parts have latched onto that one consequence of the process and declared it not only be the defining cause but have then applied it to anything they consider to have an even remotely similar consequence. Therefore, by that view, if I open a file in an editor, then save it, it is lossless. If I open it and change the value of one sample by increasing or decreasing its value a tiny amount, then save it, it is lossy. If I add reverb, then save it, it is lossy. Certainly those are destructive change, but aside from the fact that they aren't compression, which may be the only place the word is "technically' used, no data has been discarded, the defining process for lossy.

It seems to me much like the use of "RIP" around here. This started out as a slang term for DAE. Asking why people want slang is pointless, but at least most other places I've read anything people keep their head straight as to what they are talking about. I can only imagine the evolutionary process that has gone on here.

Someone who has no idea about what goes on uses the word in a incorrect way. Instead of educating him/her, the majority sloppily incorporate that new view into their way of talking about whatever is the immediate topic. Eventually, case by case, it reaches the current exceedingly vague state of being used for: just what? Virtually any kind of data movement, it seems to me, making no distinction between process that are really quite different from each other. It is almost a 1984 newspeak kind of thing. Reduce the vocabulary so people can't think clearly about differences and it becomes  easier to channel their limited thoughts onto controlled paths.

I am not with the language police and I don't propose to pursue people that continue down that degenerate path, but I hardly accept it either. It is hard enough to think clearly without introducing more impediments. A perusal of this thread's contents, could anyone be able to stomach making it, would show there has never been any serious dissension about what happens to the data (other than a few incorrect details by a few people)

It started with me pointing out there is an order of magnitude difference in the consequence of two different processes, where lossy was used in a "technically" incorrect way. It developed into a debate as to whether or not I adopt this special definition of a standard word. Its fun for awhile, but isn't enough enough?
Title: is WAV normalization lossless?
Post by: Farpenoodle on 2006-03-21 02:37:23
There should be no reason for language ninjutsu here.

It should be very clear if a process is lossless or not. It should not even factor if changes due to processing are subjectively noticeable or not. If data is lost or changed in the process, it is lossy. I'd like to think that yes, our definition is 'technically correct.' Considering I have no idea you can manage to extrapolate any other definition from the word, 'lossless.'

Being subjectively lossless doesn't make it lossless.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-21 03:41:50
It has nothing to do with subjective. It is the standard use of the word in the world outside HA. That does not include "data is ... changed in the process." This isn't hard to understand.

Maybe I'm wrong. I've asked for a source other than people's emotions quite a few times now. I can find plenty of sources for my belief. It is possible none of them say anything like 'exclude other possible descriptions,' but there don't seem to be any standard accepted definitions that fit the local usage, while what I've said about it is found all over the place.
Title: is WAV normalization lossless?
Post by: kl33per on 2006-03-21 03:50:43
Actually, i'll think you find that outside the world of HA, if data is changed in the process, it's still called lossy, otherwise WinZip/WinRAR/7-Zip would not work.
Title: is WAV normalization lossless?
Post by: Farpenoodle on 2006-03-21 03:59:09
Well if people outside of here are referring to a lossy process as lossless (or the other way round) then all it means is that they lack understanding of how digital compression works. The definition of lossless should be implied by the word itself.

Just because alot of people are using the term wrong does not mean the definition should change.
Title: is WAV normalization lossless?
Post by: bryant on 2006-03-21 05:22:58
I'm not interested in getting into the "what is lossy" debate, but I would like to add something about wav normalization.

Using the strict mathematical sense of the word lossless, a wav normalization in the increasing direction (i.e. gain > 1.0x) would theoretically be lossless because it could be exactly reversed, even if pseudorandom dither had been applied (true random dither would destroy information, but I don't suspect that's too common). Of course, a little information would have to be stored about how the transformation was done (like MP3Gain).

On the other hand, wav normalization that reduces the level is certainly lossy, effectively raising the noise floor by the same amount as the audio is reduced. And this is, unfortunately, the direction that ReplayGain generally turns out to be.

edit: added paragraph break
Title: is WAV normalization lossless?
Post by: suhrim on 2006-03-21 06:14:38
Quote
If you look at what Burrrn is actually doing, you will find that steps 1 and 2 are completely unnecessary.  Burrrn does not use the Foobar replaygain values;  it takes the wav files (after decoding if necessary) and applies WaveGain to them.
[a href="index.php?act=findpost&pid=372801"][{POST_SNAPBACK}][/a]


You can edit the parameters for the decoders so that it uses replaygain when decoding. In Settings look at the Decoders tab.
Title: is WAV normalization lossless?
Post by: jaktek on 2006-03-21 06:56:39
Quote
Quote
If you look at what Burrrn is actually doing, you will find that steps 1 and 2 are completely unnecessary.  Burrrn does not use the Foobar replaygain values;  it takes the wav files (after decoding if necessary) and applies WaveGain to them.
[a href="index.php?act=findpost&pid=372801"][{POST_SNAPBACK}][/a]


You can edit the parameters for the decoders so that it uses replaygain when decoding. In Settings look at the Decoders tab.
[a href="index.php?act=findpost&pid=373208"][{POST_SNAPBACK}][/a]


How exactly would you do this?  I.e. what are the correct parameters?  I'd like to have this information, could come in handy.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-21 07:55:50
Quote
Well if people outside of here are referring to a lossy process as lossless (or the other way round) then all it means is that they lack understanding of how digital compression works. The definition of lossless should be implied by the word itself.
Just because a lot of people are using the term wrong does not mean the definition should change.
You have not read this discussion. Its content is not what you addressed.

Quote
  Actually, i'll think you find that outside the world of HA, if data is changed in the process, it's still called lossy, otherwise WinZip/WinRAR/7-Zip would not work.
These examples are all compression schemes. This IS where lossy/lossless are used correctly, unlike in most posts of this debate.

Quote
Using the strict mathematical sense of the word lossless, a wav normalization in the increasing direction (i.e. gain > 1.0x) would theoretically be lossless because it could be exactly reversed, even if pseudorandom dither had been applied (true random dither would destroy information, but I don't suspect that's too common). Of course, a little information would have to be stored about how the transformation was done (like MP3Gain).
On the other hand, wav normalization that reduces the level is certainly lossy, effectively raising the noise floor by the same amount as the audio is reduced. And this is, unfortunately, the direction that ReplayGain generally turns out to be.
None of this debate is about whether or not information is changed or whether or not it is a reversible change. It is all a rather funny bit about the adjectives applied to the processes. Some processes are destructive and irreversible, but find the dictionary or textbook that calls them 'lossy' simply because of that. A lossy process is one where data is deliberately discarded, according to some systematic rules, not one where there are simply rounding errors.
Title: is WAV normalization lossless?
Post by: hawkeye_p on 2006-03-21 08:05:06
So rounding is not discarding data (digits) according to systematic rules ?
Title: is WAV normalization lossless?
Post by: stephanV on 2006-03-21 08:06:31
AndyH: since you have sources that back up your claims, why don't you just post them. This debate is getting rather silly proportions.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-21 10:21:26
Put "lossy" into Google and get pages of references. Look at what they are about. These include a variety of dictionary and encyclopedia entries, and a large number of articles about ----- data compression. Yes, it is a bit silly, but it has been amusing.

No, I would say that when you have a number container of a specific precision and it is obviously the case that it is impossible for it to hold any greater precision, doing calculations with it is not discarding data. It might or might not involve reducing precision of some of the results. Do you understand "significant figures?" Quite aside from the terminology, it can't be discarding data if it isn't data.
http://www.angelfire.com/oh/cmulliss/ (http://www.angelfire.com/oh/cmulliss/)
Title: is WAV normalization lossless?
Post by: Big_Berny on 2006-03-21 10:56:57
Surely a comression is lossy if the original data can't be restored bit-by-bit!

But for me the question is: Will the round not appear if you use replaygain? Isn't the audio-output (on the soundcard) of a levelled wav not the same like the original wav with replaygain?

That would mean that it isn't "more" lossy than replaygain....

Big_Berny
Title: is WAV normalization lossless?
Post by: stephanV on 2006-03-21 11:16:13
AndyH-ha: Do a search for lossless-join decomposition (funny enough also related to 'normalization'  ). A decomposition is called lossy when the original data cannot be uniquely recovered (iow the process is not reversible). So now you have the word lossy used in a "technical" context where indeed whether the process is reversible or not matters.

Big_Berny: the difference is the reversibility of ReplayGain (can be done) and normalization (cannot always be done).


edit: spelling, spelling, spelling...
Title: is WAV normalization lossless?
Post by: Big_Berny on 2006-03-21 11:56:49
Yes, I know. But there isn't a difference in the soundquality, right?
Title: is WAV normalization lossless?
Post by: uart on 2006-03-21 13:59:53
Garf essentually said in the first two replys of this thread that

1. Wave normalization is not generally lossless.

but

2. For the proposed usage the extent of data loss would be neglegable.


I don't believe we have moved from this point. It was correct then and is correct now.

The only other worthwhile thing that has been brough forth is Bryant's observation that upward wave gain is generally reversable (not withstanding clipping or non-deterministic dither).
Title: is WAV normalization lossless?
Post by: Otto42 on 2006-03-21 15:34:51
Quote
No, I would say that when you have a number container of a specific precision and it is obviously the case that it is impossible for it to hold any greater precision, doing calculations with it is not discarding data. It might or might not involve reducing precision of some of the results. Do you understand "significant figures?" Quite aside from the terminology, it can't be discarding data if it isn't data.
[a href="index.php?act=findpost&pid=373270"][{POST_SNAPBACK}][/a]

Reducing precision is indeed discarding data, when the precision can never be recovered.

The stumbling block here seems that you only apply the terms "lossy" and "lossless" with regards to compression. However, the rest of the world applies them more generally to processes of any sort. A process is lossless when it can be reversed. Nothing is lost.

Compression is a process. But then, so is rounding (or truncating, as the case may be). Applying the terms lossy and lossless to both of them is equally justified.

Furthermore, you went on earlier about the "amount" of change being a factor, but the terms are not that specific. Yes, the amount of loss in a rounding operation like this being applied to a WAV is extremely small, but it nevertheless exists and is real. It is indeed lossy. If you want to apply a judgement call on the amount of change, then where, exactly, do you draw the line in the sand between lossy and lossless? A normal person would say "if there is loss, then it is lossy", because that would be the obvious line.

Well, there is loss. You can never recover that precision. It is, in theory, audible. It is a loss that is additive over multiple operations (this being why most good audio programs actually represent the data as floating point in memory, only converting to 16-bit when saving). Okay, so it's minor, but that does not matter when the question is "is it lossy?".
Title: is WAV normalization lossless?
Post by: SMT [AQP] on 2006-03-21 16:02:39
WTF is this so difficult to understand ?
If the change is irreversible, it is lossy. End of story.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-22 02:32:14
Quote
Surely a comression is lossy if the original data can't be restored bit-by-bit!
But for me the question is: Will the round not appear if you use replaygain? Isn't the audio-output (on the soundcard) of a levelled wav not the same like the original wav with replaygain?
That would mean that it isn't "more" lossy than replaygain....
The part about lossy comression is true, but unfortunately you don't win any points because you have not figured out what this debate is about (hint: it is not that).

I'm not sure what you are asking in the second part of your post, but as to what I think you are asking, the answer is ‘there is no difference between normalization and ReplayGain' so far as what comes out the end of the reproduction chain for you to hear. They are both doing the same thing to the data, giving the same result. The difference is that ReplayGain does it in real time each time the audio is played, normalization does it one time by modifying the source data.

Quote
Do a search for lossless-join decomposition (funny enough also related to 'normalization'
I'm not sure if this is offered tongue-in-cheek or not. It does point out  a legitimate technical use of the words unrelated to data compression, so I have to concede that, but alas, this use is quite unrelated to audio or signal processing. Also, I don't think you can, by any stretch, draw an analogy between database normalization, or measurement normalization, and audio file normalization.

Quote
The only other worthwhile thing that has been brough forth is Bryant's observation that upward wave gain is generally reversable (not withstanding clipping or non-deterministic dither).
Using "wave gain" where the discussion was about normalization is getting kinda sloppy in the current context. Regardless, I think what bryant said in that post is not true, at least as stated. Am I missing something?

Usually we are discussing 16 bit integer data, simply because that is most what people here deal with, but this should apply in the same way to 32 bit or 64 bit floating point (or whatever format):
Initially, each sample is some specific value. Once the file is normalized, each sample is some new value. This new value is arrived at by applying a factor to the original value via a multiply. If the transform is dithered, additional changes are applied.

There now exist some particular difference between the original sample value and the new sample value -- but, at least for the normalization part, it is a different difference for each sample. Therefore, to be able to get back exactly to the original, that specific difference must be stored for each sample. It can not be recalculated from a single factor the way the normalized value was calculated. That is the reason it is irreversible.

This is not a ‘little' information that has to be stored, relative to the amount of original data. (Some, probably quite small, amount of lossless data compression might be done on this difference data to take advantage of the places where some number of adjacent samples have exactly the same value, or possibly where there are more complex patterns.)

The storing of difference data and the restore of the original values would work exactly the same way whether the normalization increases or decreases the amplitude, or even if it results in clipping. The noise floor does not enter into consideration.

Quote
Reducing precision is indeed discarding data, when the precision can never be recovered.
The stumbling block here seems that you only apply the terms "lossy" and "lossless" with regards to compression. However, the rest of the world applies them more generally to processes of any sort.
Let's consider a reasonable example that isn't lossy data compression, such as resampling 16 bit to 8 bit. There are probably audio operations other than resampling that might be used, but none come to mind at the moment. In most transforms, such as normalization, to choose another example, there is no loss of precision.

Resampling to a lower bit depth (or sample rate)  indeed results in a loss of data, and it is deliberate. Its magnitude is probably comparable to that of fairly severe (i.e. to low bitrate) lossy compression, but I don't see its parameters as comparable to the ‘deliberation' that is done in lossy compression, a choosing of what data to discard in order to achieve a particular goal. I guess that could be argued either way.

More important for this debate, however, is that ‘lossy' just isn't the term applied to it. You say "the rest of the world applies them more generally to processes of any sort." That is exactly what is not true.

Quote
WTF is this so difficult to understand ?
If the change is irreversible, it is lossy. End of story.
And you know this because you had a mystic insight into the true nature of life, the universe, and everything? Because your mother told you so? Because you have an emotional need for it to be so?

You also are missing the point of this debate. Your heart-felt declaration of your belief does not make it factual. You need evidence to back up your claim. It is not self evident and it is not available from an examination of the process. ... I don't believe evidence exists (that supports your position).
Title: is WAV normalization lossless?
Post by: Farpenoodle on 2006-03-22 03:25:02
So what do you want to call it then?

A 'sorta-lossy' process?

That's still lossy.
Title: is WAV normalization lossless?
Post by: Destroid on 2006-03-22 06:42:23
Yuck.

In the professional meaning of the word, permanently adjusting volume levels of audio data will never be considered "lossless."

But whatever, not everyone is a professional
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-22 06:48:48
This isn't about what I want to call a destructive edit, it about what the 'professional' audio world calls it. Being professional 'they' are a little more exacting with their use of technical terms than is this neighborhood.
Title: is WAV normalization lossless?
Post by: kjoonlee on 2006-03-22 06:57:10
The first person who replied on this thread is a professional, you know.
Title: is WAV normalization lossless?
Post by: Farpenoodle on 2006-03-22 07:00:42
They call it 'adjusting the volume?'
Title: is WAV normalization lossless?
Post by: cliveb on 2006-03-22 09:43:24
This thread has developed into a rather deep philosophical debate, which is all very well, but unfortunately the OP's original question seems to have been largely forgotten, and (s)he is probably still wondering what (s)he needs to do to achieve his/her goal. To recap:

Quote
My goal is to burn a standard Audio-CD with CDDA(WAV) tracks with mixed music/artists, but each music has its own volume level. Burning the lossless WAV of course does not alter the data, but the volume levels for each track are all different. Is there any special process one could do in order to level the tracks equally?[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=372628")


Let's begin by noting that *normalization* of WAV files will not achieve Bourne's goal. The generally accepted meaning of "normalization" is the application of linear gain so as to bring the peak level of the file to a standard level (typically 0dB). However, the perceived loudness of a track is just as much dependent on the dynamic range as it is on peak levels. Therefore simple normalization won't do what Bourne wants.

Algorithms such as ReplayGain will determine the linear gain required in order to achieve a given perceived loudness by taking into account the dynamic range as well as the peak level. However, if the original file has a very large dynamic range, there is a danger that the required gain is so great that it would result in the peak levels being pushed into clipping. And you *really* don't want that to happen. In order to avoid this, you have three options:
(i) choose a very low "target loudness" for the ReplayGain algorithm, so that all linear gains calculated are certain to be less than unity (ie. result in a loudness *reduction*). The downside to this is that all your mix CDs will be very quiet.
(ii) Accept that those files with a large dynamic range are going to sound a bit quieter, and apply the maximum possible gain without causing clipping - in other words, normalize those files to 0dB. The downside here is that your mix CDs will still have variations in loudness between tracks.
(iii) Apply some dynamic range compression so as to reduce the dynamic range of the quieter files, which makes them sound louder. The downside here is that dynamic range compression tends to "squeeze the life" out of music, so it should only be used in moderation.

I don't have any practical experience using WavGain, but my understanding is that it uses the ReplayGain algorithm to determine a linear gain that is applied to the WAV file. I don't know whether it backs off the required gain in order to avoid introducing clipping - perhaps someone else here can verify this.

If you want to persue option (iii), then you might like to try out a piece of shareware I wrote called [a href="http://www.delback.co.uk/volbal]Volume Balancer[/url]. It doesn't use the ReplayGain algorithm as such, but it does use similar dynamic range measurement to determine perceived loudness and then applies linear gain and/or dynamic range compression in order to bring a set of WAV files to a defined level. It only uses compression where the target loudness cannot be achieved through linear gain adjustments.

One last thing. *All* of these processing options for WAV files result in non-reversible changes to the audio data, and so in a formal sense they are "lossy". But from a practical point of view options (i) and (ii), which involve only linear gain adjustments, are benign. Option (iii) is less benign, but may in some circumstances be the best compromise.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-22 10:22:27
Bourne, the original inquirer, asked about CoolEdit's Group Waveform Normalize which I believe is an RMS based process used to balance perceived loudness. I'm not positive about that, as I've never had interest in doing that task, but I seem to recall reading that is its purpose.

You introduce a new descriptor "formal sense" into the debate. Have you any evidence, that being the sticking pont or the whole issue? I maintain that is an incorrect use of the term lossy. Its not losing anything, its changing it, but more importantly, it isn't the accepted technical use of the term.
Title: is WAV normalization lossless?
Post by: kjoonlee on 2006-03-22 10:39:06
If you can't accept actual use by professionals as valid proof of the meaning of "lossy" or "lossless", then I suggest you say "artificial" to only mean "artistic," "treacle" to only mean "salve for snake venom," "culture" to only mean "agriculture," "starve" to only mean "to die by freezing," and "lossy" and "lossless" to only mean what you want it to be, regardless of actual use.
Title: is WAV normalization lossless?
Post by: john33 on 2006-03-22 12:00:42
Quote
I don't have any practical experience using WavGain, but my understanding is that it uses the ReplayGain algorithm to determine a linear gain that is applied to the WAV file. I don't know whether it backs off the required gain in order to avoid introducing clipping - perhaps someone else here can verify this.
[a href="index.php?act=findpost&pid=373799"][{POST_SNAPBACK}][/a]

Yes, it does, unless you tell it not to, in which case brute force peak limiting will be applied.

I'm sure the OP lost interest in this thread long ago, but he had his answer early on. 

Any process applied to the original wave data that is not exactly reversible is, by definition, a 'lossy process'. This also includes the dithering of studio masters down to 16 bit for CD masters. Whether, or not,  the changes made are audible is completely irrelevant.

We also have 'lossless compression' and 'lossy compression', but these need no further explanation.
Title: is WAV normalization lossless?
Post by: SMT [AQP] on 2006-03-22 12:49:06
Quote
...There is no argument on my part that there isn't an irreversible change, but I suspect you can't find your definition of lossy anywhere used by the rest of the world. Normalization is definitely not compression, of any sort. Lossy just isn't the correct word in that context. Show me that I'm wrong and I'll acknowledge it. Ok, I'll even acknowledge it here: it is the slang usage this group has adopted as its own in-group speak; I should recognize the sloppy terminology in the future without comment.
[a href="index.php?act=findpost&pid=372833"][{POST_SNAPBACK}][/a]

Quote
This isn't about what I want to call a destructive edit, it about what the 'professional' audio world calls it. Being professional 'they' are a little more exacting with their use of technical terms than is this neighborhood.
[a href="index.php?act=findpost&pid=373749"][{POST_SNAPBACK}][/a]

Wow, only now do I realise that HA is full of "non-professionals" stuck in some freaky alternate universe. 
Title: is WAV normalization lossless?
Post by: smok3 on 2006-03-22 12:53:02
from wikipedia:
Quote
Technically, reducing text size by removing all vowels can be considered a lossy data compression as well.


so the usage of the term is of Technical nature and as such appropriate for forums like this one.
Title: is WAV normalization lossless?
Post by: cliveb on 2006-03-22 13:38:07
Quote
You introduce a new descriptor "formal sense" into the debate. Have you any evidence, that being the sticking pont or the whole issue? I maintain that is an incorrect use of the term lossy. Its not losing anything, its changing it, but more importantly, it isn't the accepted technical use of the term.
[a href="index.php?act=findpost&pid=373809"][{POST_SNAPBACK}][/a]

I don't think anyone around here denies that even simple linear gain adjustment is a non-reversible operation, so there's no need for "evidence" as such. I guess the sticking point is what types of non-reversible operations qualify for the description "lossy". I'm a practical guy - I don't really care much about the theory: results are what interests me. And in that respect, I strongly agree with what you said in the earlier parts of this thread: for all practical purposes, linear gain adjustment is not lossy (in the sense that we usually use the term around here - for things like MP3 encoding, etc).

But then it all got a bit deep and adversarial over the strict meaning of the term "lossy", and I don't feel qualified to contribute to that part of the thread. (I personally feel that all non-reversible operations are "lossy" in a strictly hair-splitting sense, but I don't have any letters after my name that make my views authoritative).
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-23 01:18:30
You people who want to debate really should make a better effort. I've acknowledged that I might be wrong. I've shown you the evidence that supports my position -- or at least pointed you at it, if you care to consider it. What do I get in return. In many cases (to distinguish from all cases), I see replies that come across as someone screwing shut their eyes, stamping their foot, and demanding their word be accepted. Evidence? Who needs stinking evidence when they have an emotional need to be right? Forget about facts, just experience belonging.

There has been some effort to present evidence. stephanV pointed out another legitimate use of the terms lossy and lossless. It has nothing to do with audio or any operation on audio data, however.

smok3 just provided an actual reference, but it has a couple of difficulties. First, it is from wikipedia. This may be a generally useful reference source but is it not the case that anyone can make entries? If I made a detailed entry strictly expressing the position I've taken in this thread, are you likely to now accept that as authoritative?

More importantly, that entry just happens to be an example of what I've been saying is the one and only correct usage. It supports my position, not my opposition.

There may indeed be professions participating here. I say nothing against them generally, especially as I know nothing. I'll take it on your word that they are very competent at doing whatever they do professionally. Let's just consider this hypothetical, however: A individual might get along swimmingly in a local pond, and be very influential, especially when he can demonstrate ability and insight into some topics, yet not realize that out in the big world his professional colleagues roll their eyes behind his back whenever he talks about some certain subject.

In other words, as I've repeatedly said, what happens here in HA isn't necessarily indicative of views or understandings in the world at large. If it is, in regard to the current topic, where is the evidence?  john33 says, as have a few others, "by definition," but what definition? The HA definition! The terms certainly do not seem to be defined that way elsewhere. I wouldn't discount the possibility that some of you have infected a few other forums, where immunity to error is low, but that still doesn't qualify as ‘the professional view.'
Title: is WAV normalization lossless?
Post by: kl33per on 2006-03-23 01:32:41
You want proof:
1. Take a audio track
2. Make a copy
3. Normalise the copy
4. Hash the original file
5. Hash the copy
6. Compare the hash codes

If you use a decent algorith (i.e. MD5) the hash codes will not match, garunteed.  Furthermore, there is no way to restore the original audio.  Normaliseing back to orignal levels will not create the same audio data.  Therefore, any form of normalisation is a lossy process.... Period... Full Stop... Close The Thread.

Now for some definitions:
Quote
Main Entry: loss·less
Pronunciation: 'los-l&s
Function: adjective
: occurring or functioning without loss

<algorithm, compression> A term describing a data
compression algorithm which retains all the information in
the data, allowing it to be recovered perfectly by
decompression


It would seem to me the definiton of lossless (meaning no loss whatsoever) is pretty standard.
Title: is WAV normalization lossless?
Post by: Farpenoodle on 2006-03-23 02:21:26
So what DO they call it then? I'm willing to bet they just call it 'volume normalisation.' But it's still a lossy process no matter how you look at it. A professional might go, 'hmmm I need to normalise these tracks.' And he will do it knowing that the lossy effect is negligeable. Still lossy sir.
Title: is WAV normalization lossless?
Post by: audio2u on 2006-03-23 03:58:24
Quote
Bourne, the original inquirer, asked about CoolEdit's Group Waveform Normalize which I believe is an RMS based process used to balance perceived loudness. I'm not positive about that, as I've never had interest in doing that task, but I seem to recall reading that is its purpose.
[a href="index.php?act=findpost&pid=373809"][{POST_SNAPBACK}][/a]


That's correct... Audition's (the app formerly knows as...) Group Waveform Normalise function does works on RMS values, not peak values.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-23 04:12:50
Come-on guys, at least try to follow along so you might have a chance at adding something new to the debate.

As for closing the thread, it has been fun. I may check occasionally to see if something non-repetitive comes along, but there are plenty of interesting things to engage the attention, including things right here at good ol' HA.


Thanks for the confirmation on Group Waveform Normalise.
Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-26 07:25:36
-
Title: is WAV normalization lossless?
Post by: [JAZ] on 2006-03-26 10:56:34
@ Bourne:

Not sure if you care any longer about this debate, but the points were:

1) When decoding (a), the effect of changing volume (b) will change the values to adapt to the desired volume.

2) This change of volume is generally small enough (+-10dB) that any problem derived from it is not going to be heard.

3) MP3Gain can be applied to an mp3, (the file!), and changed at a later time without losing any quality (the audio data is not modified, only a multiplier)

4) WavGain (the one applied to .wav files, not lossless files), cannot be reverted back if desired so, because the audio data is modified.

5) Some Lossless codecs have "replaygain", which is mp3gain/wavgain but stored as a multiplier too (similar to mp3gain, but more precise).

6)In these lossless files, replaygain can be modified losslessly.


Closing)
If you make an *audio* cd, use a lossless codec with replaygain or wavgain the .wav's. This will give you the best you can get.

If you make a *data* CD, not an audio CD, the best thing you can do is use one of these lossless codecs, like WavPack : http://www.wavpack.com/ (http://www.wavpack.com/) . You can put the mp3's there too if you want, to play them on any mp3-compliant player.



(a) burning an *audio* cd, playable on normal cd/dvd players is a case of decoding.

(b) mp3gain, wavgain, replaygain, rms normalization..
Title: is WAV normalization lossless?
Post by: Kees de Visser on 2006-03-26 14:28:33
Quote
From what I read, then there's no way of making WAVs the same level losslessly


The "loss" by changing level in a WAV audio file is so small that you shouldn't worry about it, assuming it's done correctly.
I think much of the confusion is caused by not distinguishing between "audio" and "data". Audio can't be copied or transferred losslessly, but data can. AD and DA conversion (of audio in this case) will never be lossless, although the loss can be made as small as possible.
Modification of the data doesn't necessarily mean that the resulting (analog) signal will degrade in quality.

What you are basically trying to do with your different sounding music tracks is called "mastering". In the context of this thread that could be described as the "intentional modification of (digital or analog) audio in order to optimize it for its intended purpose". True (professional) mastering is an impossible task when you want to apply it to your complete song collection. Level matching (not the same as normalizing!) can be a good approach and imho WAV is the more robust format (compared to mp3), especially if you want to apply EQ, dynamics- or any other signal processing afterwards.

Just my 2 (euro)cents
Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-26 18:31:06
-
Title: is WAV normalization lossless?
Post by: Shade[ST] on 2006-03-26 19:07:12
My suggestion to you, would be to abx several solutions :
lame -V4 --vbr-new with mp3gain; 
lame -V4 --vbr-new without mp3gain, but with source file wavegained;
lame -b 320 with mp3gain;
lame -b 320 with wavegained original

you can use abc/hr or foobar's abx methods : then, if you can't tell them apart from the original, you'll be better off choosing the smaller file size (which should be lame -V4 --vbr-new with wavegained original.
Title: is WAV normalization lossless?
Post by: singaiya on 2006-03-26 19:40:39
bourne: if I understand you correctly, you have a bunch of WAV files of differnet artists with different volumes, and you want to burn a mix CD so they sound the same volume, but without the files losing the original volume information. In that case you can do it like this:

1. convert the wav files to lossless format. My choice is Wavpack, but you can use whatever lossless format you like.

2. Load all the lossless files (not the wavs) into Foobar 2000 and do track replaygain on the files. This will not alter their volume, but just add a tag that says how to interpret the volume changes.

3. Burn the CD with Burrrn, enabling the program's replaygain option.

Then the CD will have the same volume on every song, and your lossless files will have the original volume information also. Good luck.
Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-26 19:43:32
-

The final burned audio in CD is going to be modified, isn't it? Anyways, that's a good option.
Title: is WAV normalization lossless?
Post by: Shade[ST] on 2006-03-26 20:00:27
it will.  Another option would be to use foobar2000 to convert the files to mp3 using replaygain/track gain. (edit:after scanning with replaygain)

You probably can't distinguish ~130 kbps mp3 anyways.

Try it
Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-26 20:04:28
-
Title: is WAV normalization lossless?
Post by: Shade[ST] on 2006-03-26 20:14:45
Right.

1) no.

2) I'm not too sure what you mean about this, but the replaygain scanning is automated.  You just need to update your tags afterwards.

A thing to note, though, is you'll need to change the replaygain mode used on mp3 conversion.  It should be defaulted to album, you want it on track.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-03-26 20:26:27
Level matching (when applied to audio or any electronics)  is more commonly used to mean bringing differing signals in a system to a common voltage level so they can function together properly. There are various ways to do this to electrical signals. One such is with a transformer to increase or decrease the voltage output of a particular device.

Not all equipment conforms to the same ‘line level’ voltage. If devices made to differing standards are used together, their outputs frequently must be level matched or you can’t get the proper contribution from some of them. The term is often used when both balanced signal and unbalanced signal equipment is being used together. One must be brought to the level of the other or the results won’t be very good.

You interest is loudness matching. Group Waveform Normalization attempts to do that by working with the RMS measurements rather than the peak levels that regular normalization uses. It is possible that some other programs achieve a more uniform loudness than does CoolEdit, but no program is going to be more precise or ‘correct’ than CoolEdit. Some of the other programs  might do the job with more crude calculations or by making more radical changes to the data.

You want a certain ultimate result. You want the loudness of at least some of the songs you write to CD to be greater or lesser than their original source. You want this in order that all songs on the CD sound about the same loudness when you play the CD.

There is absolutely no way to do this by any means in this physical universe without changing those tracks that are going to be louder or softer. The only question is ‘will you change the source file or will you make the change only as the signal is on it way to becoming sound?’ The ultimate result, what you hear, will be identical in either case.

MP3s and some other formats allow the possibility of the second option, dynamic change to the signal rather than static change to the source. An audio CD absolutely does not, no matter what route you take to get there. The change must be made to the file before it is to be written to the CD. If someone tells you anything which seems different, they simply don’t fully understand what happens or they are deliberately confusing you for some purpose of their own.

There are some hardware device that attempt to maintain a constant loudness regardless of the signal fed to them. The Automatic Loudness Control (I think that’s the label), at one time widely used on car radios, is one such hardware approach. These methods have never been considered HiFi because of how much they mangle the audio in the process. However, if you play your audio CD in a system with such a control, then, and only then, can you get the loudness results you want without having changed the tracks before you put them on the CD.

If you hide this fact from yourself by utilizing Mp3Gain, or any other means that does not change your hard disk source, it is still being done for you. The program you use creates a temporary file with the changes, writes that temporary file to the CD, then deletes that temporary file so you never see it.

If you apply Group Waveform Normalize in CoolEdit, then do a Save As and write the changed output to a different directory, so that your original source remains unchanged, then write the CD from the files in that different directory, you do the same thing without lying to yourself about it.

If you have no use for the original source on hard disk after writing the CD, it is simply silly to do the different directory thing since you don’t have any reason to care that the original source gets changed. You are only going to delete it all once the CD is finished. But regardless of how you do it, and regardless of whether you insist on calling a change a loss, what you hear will always be created from samples with different numerical values than those in the diverse sources you started with. To think otherwise is to confuse yourself.
Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-26 20:43:58
-
Title: is WAV normalization lossless?
Post by: Shade[ST] on 2006-03-26 20:46:03
Right. It's automatically 89 db.
Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-26 22:05:11
-
Title: is WAV normalization lossless?
Post by: Shade[ST] on 2006-03-26 22:32:09
Quote
oh my... that's really curious isn't it... never thought foobar would do the same 89 db... !
[a href="index.php?act=findpost&pid=375527"][{POST_SNAPBACK}][/a]

You _can_ set it if you like.  There's a slider, when you change it from album mode to track mode (or at least in .9, which is faster, there is)
Title: is WAV normalization lossless?
Post by: Bourne on 2006-03-27 03:24:15
-
Title: is WAV normalization lossless?
Post by: Tahnru on 2006-03-27 03:39:29
Quote
I wonder WHY CDs are being mastered SO LOUD these days!? Any CD I rip, any genre... if it's in MP3 all of them get clipping and usually displays 100 dB or over. And CD's from mid 80's and early 90's they're not so crazy loud!

Is there any reasonable explanation why CDs are being mastered so loud nowadays?
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=375626")


This link gets posted fairly often in response to the loudness race:
[a href="http://www.prorec.com/prorec/articles.nsf/articles/8A133F52D0FD71AB86256C2E005DAF1C]http://www.prorec.com/prorec/articles.nsf/...6256C2E005DAF1C[/url]
Title: is WAV normalization lossless?
Post by: jeo on 2006-04-23 07:07:04
1) encode the WAV files with a lossless audio codec (FLAC, WavPack, etc.)




have i use EAC to extract the tracks in Flac or wave? thanks!

about normalizations with audition:
'The Normalize effect lets you set a peak level for a file or selection. When you normalize audio to 100%, you achieve the maximum amplitude that digital audio allows--0 dBFS.

The Normalize effect amplifies the entire file or selection equally. For example, if the original audio reaches a loud peak of 80% and a quiet low of 20%, normalizing to 100% amplifies the loud peak to 100% and the quiet low to 40%.

To apply RMS normalization, you must use the Group Waveform Normalize command. If desired, you can apply that command to only one file. '

is RMS normalization lossless? 
Title: is WAV normalization lossless?
Post by: singaiya on 2006-04-23 17:47:48
is RMS normalization lossless? 


Read the thread and find out    The answer is the same regardless of whether you use peak or RMS method.
Title: is WAV normalization lossless?
Post by: jeo on 2006-04-23 22:13:05

is RMS normalization lossless? 


Read the thread and find out    The answer is the same regardless of whether you use peak or RMS method.


thanks!
i read the whole thread yesterday and did some tests:
source Beatles-Martha my dear extracted with EAC.
in audition:
to see how much the track need to amplify to 0dB was used amplify/fade
with peak level in 0dB that show me 4.14dB(62,9%) of amplification with lock left/right!
than i:
normalize the track to 100%-  saved as norm100.wav
using 'calculate now' to amplify the track to 0dB- saved as ampl0dB.wav

using the "saved norm100.wav" and normalize again to -4.14dB(62.9%)- saved as finalnorm.wav
using the "saved ampl0dB.wav" and amplify/fade to -4.14dB(62.9%)- saved as finalampl.wav

comparing source ripped with the "finalnorm.wav" and "finalampl.wav",
nothing is change all tracks seems(waveform view) and sounds equals,
for more than i listen or use the zoom tool to compare!
 
please,give me more explanations and tell me if i forgot something!
thanks.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2006-04-23 23:28:25
The entire point of this thread is that the changes are always much too small to notice any change with human senses, regardless of how you may wish to label the results. You can try till the cows die of old age and you will achieve nothing. You can MEASURE that there are small changes if you use the right tools. This is absolutely standard, so well established that you might as well worry whether or not hydrogen will forget how to fuse and produce helium as to fret with it any further.
Title: is WAV normalization lossless?
Post by: KikeG on 2006-04-24 10:58:23
The entire point of this thread is that the changes are always much too small to notice any change with human senses, regardless of how you may wish to label the results.

It depends on the source material. I could make a 16-bit wav with high dynamic range variations on the audio that would be audibly affected by replaygaining it. The replaygain process would reduce the dynamic range in a way that when reversed would result in an audible increase of the noise floor and loss of the lowest level detail. In real world, in most cases this won't happen, but you can't say it won't ever happen.

Now, in case of 24-bit wavs I don't think I could make a wav where an audible difference could result as a consecuence of replaygaining. And 32 bit floating point (and higher) wavs can be replaygained in a in practice lossless way for all purposes.
Title: is WAV normalization lossless?
Post by: 2Bdecided on 2006-04-24 11:32:27
ReplayGaining .wav files clearly isn't lossless, and isn't reversible.

It's also not as "lossy" as, say, mp3 encoding.

I'm still happy calling it "lossy", but for those who want to draw a distinction, call it "near lossless".

This matches the situation with some "lossless" audio codecs which can be forced to reduced the bitrate by operating in a "near lossless" mode, which sacrifices the accuracy of the LSBs in order to reduce the bitrate - but not nearly as dramatically as, say, mp3.


KikeG just beat me to an important point: if you have a carefully noise shaped dithered 16-bit file with a huge dynamic range, then a slight level change (implemented without dither, or with optimal but spectrally flat dither) could introduce audible noise into the quiet parts, if you turn the volume up when listening.

The chances of it happening are small, even in an intentionally contrived "worse case" situation, but they are there.


I think AndyH-ha is wrong about "the real world". Most people who own a computer will be familiar with the concept of "lossless", even if they can't name it. It means no loss, which implies no change, which implies I can do something as many times as I want without causing any problem what so ever.

So I can zip and unzip documents, copy them from memory to disk to network to where ever, pass them on to friends and let them to the same multiple times - and if so much as a single character changes in the document, I'll say that there's a fault somewhere - because these operations are lossless.

Similarly, if ReplayGaining .wav files was lossless, I could ReplayGain them as often as I want, to whichever loudness I choose. I could pass the files onto friends and let them do the same. The file could pass through the hands of every person in the world, each one changing the gain to a different level, and when I get the file back I could just change it back, and have my original file.

This is clearly nonsense. If I tried this game of ReplayGain Chinese Wispers with a .wav file, I'd be lucky to get any music back at all! However, if I tried it with an mp3 file, there would have to be a fault somewhere to prevent me from recovering my original file at the end of it.

There are "degrees of lossy", and you might argue that some of them are "near lossless" - but there is only 1 "lossless" - it has a very strict, clear definition.

Cheers,
David.
P.S. thank you to those who gave useful answers to the OP - I'd wavegain before burning a CD and not think anything of the "loss".
Title: is WAV normalization lossless?
Post by: chrizoo on 2010-06-22 00:21:08
Hi folks. I recently did some readings to find out whether quality loss caused by normalization is neglibile or indeed harmful (and my personal conclusion aligns with AndyH-ha's opinion here: http://www.hydrogenaudio.org/forums/index....st&p=449552 (http://www.hydrogenaudio.org/forums/index.php?showtopic=50200&view=findpost&p=449552) ). But before coming to this conclusion, I tried to establish what the consensus on this topic would be, and surprisingly enough ... there was none. Even - and particularly - audio professionals didn't agree for whom this is their daily bread, they make their every-day living with.

So I made a collection of information and sorted it by "negative", "positive" and "neutral" opinions. It was an interesting endevour for me and I thought maybe someone would like to read this ... so here we go.

I am aware that there are more current threads about normalization, but I didn't want to hijack an ongoing discussion with this ... uhm, lenghty posting, so I thought, I'd pick an old thread where it wouldn't matter too much.

Kind regards.

------


point of departure:


Quote from: NorseHorse link=msg=0 date=
I do a lot of live on-site recordings. Often, I don't get a significant sound check (if any) and am not always given a clear heads up about the program material. I naturally loathe digital clipping, and I prefer to play-it-safe while tracking. Hence, I record at 24-bits, and for most shows, my levels peak between -12db and -15db. After I import the audio into the DAW (Sonar, in my case), I turn the channel GAIN up before editing so that my highest peak is -1db or -2db.

Quote from: Alan Cassaro link=msg=0 date=
... I have a lot of OTHER tracks from old tape masters that were digitally transferred over to DAT tape by a respected engineer, who recorded them at such a  low level that most of them were about 50 percent of full gain. He said, "No problem, you can raise them later in the PC, it's all digital, and it doesn't matter, you won't be adding any hiss." He wanted to allow himself plenty of headroom, he said.


OK, so here is what I found in terms of (conflicting) answers:

NEUTRAL:

A while back I responded to a "lossy normalization" thread saying it is rather silly to call normalization lossy, and furthermore, most of the professional audio world does not. While there is a permanent change, it does not result in any artifacts or other loss of quality such as  can be the result of lossy compression.


Quote from: sleepwalker link=msg=0 date=
Myth#1: Never normalize, every additional application of math on your digital audio will add distortion, etc.
This just isn't true, especially with normalize. If you don't believe me. Take an audio file and normalize it to -5dB. Save it as #1. Now normalize it to -4dB. Finally, normalize it again back to -5dB. Now save it as #2. These files will null out completely. That means it's a bit for bit copy. THat means NOTHING HAS BEEN DONE TO YOUR PRECIOUS AUDIO. [...] It's just crazy to hear people talk definitively about desctructive changes it makes when a 2 minute test proves the exact opposite.

[later]

... Looks like Adobe Audition's normalize is better than Wavelab's if you did the exact same test and it didn't null. Don't remember if I mentioned it, but I'm using 44.1 and 32bit float files.

However, using more drastic normalization did not null out, so I do stand corrected. Starting with a -10dB Bonham drum track, I normalized to 0db, then to -1, then to -5, then -3, then to -10 again and compared against the original. I get (inaudible) low level noise at -144dB.

Still, I think -144dB is in inaudible range to anybody I know. I just think it's funny that people fret over normalize, but use track automation which in some cases is even stairstepped pretty significantly. Thumbing your nose at inaudible artifacts while introducing real artifacts left and right just doesn't make sense.


Quote from: Corran link=msg=0 date=
Using Sonar, I took a short clip, doubled it on another track, and phase reversed it. Complete cancellation, of course. I normalized both tracks to -1, no output at all. I normalized them again to -20, and then back up to -1. Guess what? No output. Therefore, the normalization has not changed the audio file at all, or, at least has not changed it in a random way which would be akin to distortion. I tried this with the gain increase/decrease function rather than normalization and it worked the same way. If I increase the gain a few db on one track and push the fader up the same amount, I did not get a complete cancellation, but it was far below hearing threshold (-60 or so). Upping the fader on both channels the same amount cancels out completely.

My personal opinion based on these observations, my testing, and my personal experience is that normalization does not "degrade" anything. I think that in normalizing a file, you are adding say 5.347 db of signal, and if you just add 5.3 db on another file of course it won't "cancel out" because it has .047db difference in signal. Most likely, whatever minute difference in the signal that one might suspect was a change due to normalization is not a "degradation" but rather just a slight difference in signal. Somewhere on this thread it was mentioned that each bit is 6.03 db of resolution I believe, meaning adding "one bit" to a signal or some such will increase the gain by just over 6 db. So there cannot be a perfect addition of say 5 db (in terms of just adding a bit) but the math still works out and the actual signal is not changed. I'm sure there will always be endless debate over this but to my ears and my eyes on the signal indicator normalizing does not do anything destructive and I will keep right on using it for various things.

Quote
Quote
My personal opinion based on these observations, my testing, and my personal experience is that normalization does not "degrade" anything.
We know this from digital theory. All you did was prove it :thumbsup:

Title: is WAV normalization lossless?
Post by: chrizoo on 2010-06-22 00:23:12
(NEUTRAL ... continued)

Quote from: chris319 link=msg=0 date=
Quote
at best this has been at the cost of extra noise, distortion or DC offset
Please explain how this distortion is introduced. Of course the noise floor comes up but that's going to happen any time you add gain. A properly-written program will obey the signs of the samples and there will be no DC shift.
[later]
Given a signal with 72 dB dynamic range at 24 bits, distortion due to truncation/rounding error amounts to 1/((2^24)-4096) or 0.000006%. Think you can hear 0.000006% distortion?


Quote from: chris319 link=msg=0 date=
Quote
at best this has been at the cost of extra noise, distortion or DC offset
Please explain how this distortion is introduced. Of course the noise floor comes up but that's going to happen any time you add gain. A properly-written program will obey the signs of the samples and there will be no DC shift.
[later]
Given a signal with 72 dB dynamic range at 24 bits, distortion due to truncation/rounding error amounts to 1/((2^24)-4096) or 0.000006%. Think you can hear 0.000006% distortion?
[later]
OK, I wrote a program which takes a 10-second sine wave generated algorithmically (using Goldwave) at 24 bits and -60 dBFS and loads the samples into two floating-point arrays; one array is the test array and the other is the control array. I then digitally increased the gain of all the samples in the test array by 60 dB (multiplied by 1000) and then reduced the gain of the samples by 60 dB (divided by 1000). 60 dB is much more gain than you would apply to a typical real-world audio file. The increase and decrease of digital gain was repeated for 1,000 cycles. The program then compared the samples in the test array to the samples in the control array. I then normalized all of the samples in both arrays to values ranging from -1 to 1 (divided by 2^24) and repeated the experiment. In both cases there were zero errors in the bit patterns. This demonstrates that there is no degradation caused by applying and removing 60 dB of digital gain at 24 bits over 1,000 increase/decrease cycles. Here is the PureBasic source code: ...
Quote
neat. Is it possible to load in some real recorded audio? Just to see. And do like 25db instead, some off number that won't be an exact multiple.

Wow! Good call! For a 25 dB gain reduction we multiply the sample values by .0562. Using just any old 24-bit music file, there was indeed a .000002% error, with 0.32% of the samples in error. More interestingly, we get the same error with 1, 10, 100 and 1,000 cycles of gain changing. This tells us that the error is not cumulative, provided the same gain multiplier is used. The .000002% error was arrived at by calculating a checksum of the control samples and a checksum of the modified samples. The error percentage was the difference in the two checksums divided by the checksum of the control samples.
[later]
The checksum error creeps up to a whopping .000003% if, after performing the initial 25 dB reduction/increases, we subsequently modify the samples twice more using arbitrary values. So error is introduced but it is so tiny as to likely not be audible. Further, there is zero error provided the gain multiplier is a multiple of 20 dB (1, 10, 100, 1,000, etc.).
[later]
Repeating this test with 1,000 gain modification cycles using random gain scaling factors, the error comes out to .000003% or 3 parts out of every 10,000,000 (three of ten million).
Title: is WAV normalization lossless?
Post by: chrizoo on 2010-06-22 00:24:32
POSITIVE:

Quote from:  link=msg=0 date=0
Normalization is often used when remastering audio tapes for CD production, in order to maximize the signal level while not changing the signal to noise ratio.
[blockquote][blockquote]My question: If the SNR remains unchanged, this means that the noise level is actually amplified by the same amount as the signal level, right? So what is the benefit?
Answers may vary:
Quote from: NorseHorse link=msg=0 date=
The first engineer I ever worked with swore there was a difference. He normalized EVERYTHING. "Doesn't that just increase the noise too?" I asked him. "I can't explain it, but it actually lowers your noise floor," he responded. And as noted above, Lagerfeldt suggests it may actually deteriorate audio quality, and Sleepwalker suggests it does nothing at all.
[/blockquote][/blockquote]

Quote from: themixingbowl link=msg=0 date=
Once you've completed manipulating the audio, I'd recommend running the file through WaveGain. This is based upon the Replaygain standard and will effectively apply gain (volume) adjustments directly by adjusting the scaling of the samples. Unlike Replaygain, this is not a lossless process an cannot be reversed. It basically means the files are adjusted to -89db, which normally results in a smaller file size too, as most people tend to record at too high a level.


Quote from: Mike Caffrey link=msg=0 date=
If you were to set something to normalize to 0dbFS it would search your selection, find the peak and increase gain evenly through the section that peak reached 0dBFS. If your trach had clipped, there'd be no change. If your highest peak was -1.5 dB, it would give you the same results as increasing the gain by 1.5dB. I could see normalizing being useful if you had a track that was recorded too low and you wanted to increase the gain as much as possible without peaking and you didn't want to have to guess several times.


Quote from: David Spearritt link=msg=0 date=
as a final mastering step to properly encode a cold recording for the delivery medium, it is technically responsible and necessary. If done correctly and competently with plenty of math precision it results in no audible degradation. It forms part of a mastering person's required skills. In my field of live classical, sometimes we record cold because we do not get a sound check, or we simply underestimate the SPL in the first place, or the program has very loud contrasting with very soft and we are not able to change gain mid concert, there are lots of reasons for cold source material. Now to not change the level because of some unjustified fear of gain changing in the digital domain makes no sense. High precision quality digital mixing and gain changing sounds superb in my humble experience.


Quote from: NorseHorse link=msg=0 date=
I disagree with those of you who have ruled out normalization as part of the mastering stage. Are you the folks creating the music that I can't hear in my car?! Not every system is capable of infinitely adjustable volume. Listening systems have noise floors too, and every dB of nothingness you leave at the top increases the relative height of the noise floor (because the listener has to turn up their volume). I haven't normalized in years, but I do manually adjust the gain of whole pieces or concerts to make sure I'm not wasting signal. If I can help listeners overcome the shortcomings of various systems by making sure my music peaks around -.5dBFS, I'm happy to. After all, it doesn't cost me dynamic range - it just means they have less hiss in the way.
Title: is WAV normalization lossless?
Post by: chrizoo on 2010-06-22 00:28:45
NEGATIVE:

You generally *don't* want to normalize wav files.  The procedure is not lossless.

Quote from: DeeDrive link=msg=0 date=
Quote
So when do I know it's a good idea to normalize or not? Im a little confused when it comes to this? Little help?
Never, that's when. Normalizing is useless. It does nothing but raise the peak value to a determined level, which is completely based on peak level, and therefore useless. Average level is a much better indicator of volume, and the only way to set the volume of something is to use yours ears.

Quote from: dualflip link=msg=0 date=
Never normalize, period

Quote from: Lagerfeldt link=msg=0 date=
many types of destructive processing (such as normalizing) is performed at 16 bits using truncation, despite the DAW being able to handle at least 32 bits float - another reason to stay away from this type of handling. [...] [in] cases where the peak reference is more relevant than the minor possible deterioration of the sound quality, normalizing can be performed.

Quote from: shotmillions link=msg=0 date=
I dont personally normalize. Normalizing just push's the wav forms to the highest therotical volume 0db i only normalize if i want to have a closer look at the wav form for chopping then i put it back how it was.

Quote from: mixerguy link=msg=0 date=
NEVER normalize.

Quote from: Robert Randolph link=msg=0 date=
Quote from: sleepwalker link=msg=0 date=
Myth#3: Record the hottest possible signal without clipping.
When we were using 8bit converters, that wasn't bad advise. People seem to think that you need to hit 0 dB to get the *full* 16 bits. Not so. The loud stuff is covered in the 1st few bits. By the time you get to the 16th bit we're talking way way way low level stuff here. If you're tracking in 24 or 20 bit, feel free to leave headroom, you'll end up with 16bits of usable data anyway, there's no need to bludgen your AD and make mixing harder for absolutely no improvement in sound.

#3 as described is just plain wrong. [...] if normalization, which is just an amplitude adjust is pefect as in said myth 1. Why does it matter if you record full scale? If you get a full signal that does not clip, and bring it down 24db, by the logic of "dispelling myth #1" the signal will be without degredation. But that's just not true now is it?
Title: is WAV normalization lossless?
Post by: chrizoo on 2010-06-22 00:30:13
(NEGATIVE ... continued)

Quote from: mogWai link=msg=0 date=
Well Myth#1 ... I did exactly what you suggested using 'Audio File Compare' in WaveLab 5. I used a 24bit - 48kHz mix. I also trust WaveLab's internal data integrity. Result - 7482365 differences (albleit inaudible)
But wait - comparing exactly the same file -
Result - can't be done 
so, original file opened in Wavelab, saved under a new name - compare with original.
Result - EQUAL
Control - Original file normalised to -3db and saved. Original file opened again, normalised to -3db and saved to another name.
Result - EQUAL

Conclusions -
1. Making multiple copies of the same file doesnt effect the integrity of the file.
2. Normalising sucks.

Quote from: Bob Olhsson link=msg=0 date=
There's actually a fair bit of literature that suggests transparent gain changes aren't nearly as easy to accomplish as many people assume. Floating point files are the only ones that can POTENTIALLY be "normalized" without damage. Considering that it buys you nothing at best, it's not a good idea unless you KNOW the gain change has been properly implemented. I learned the hard way years ago to never assume that software developers know what they are doing.
[...]
Normalizing means you are multiplying the original numbers and then truncating, rounding or, hopefully, dithering the result down to a number that you can write in a file. The only thing you have gained is level but at best this has been at the cost of extra noise, distortion or DC offset. Should this not be the final level, it's going to require even more noise, distortion or DC offset to produce the final level.In an ideal world, we would record audio and then in one grand computation calculate our final digital audio signal. Adding unnecessary math, noise and distortion to a recording is utterly foolish yet that's precisely what normalizing does.
[...]
The point is that normalizing, exactly like every gain change and other form of digital signal processing, degrades the signal. There are many legitimate reasons to change the gain but just mindlessly applying an extra gain change when you are going to need to turn right around and change it again is pretty silly.


Quote
Prompted by a similar debate elsewhere I put "Myth 1" to the test recently myself.
I did extensive testing in Logic on the normalising question, and I could clearly hear a difference between a normalised file and the original - I could pick one from the other blind every time, easily. I used an analog mixer to match the levels and I made sure to flip channels and D-A outputs to eliminate the possibility of other sonic differences affecting my judgement. Can someone please explain in plain English (as my math is none too hot) that if normalising supposedly 'does nothing to the sound' why I could in fact hear a difference?

Quote from:  link=msg=0 date=0
Well it does waste time and drive space. If you normalize a signal down in level it's possible you might lose some useful information; normalizing up in level probably won't have much effect...unless the DAW does use 16bit precision on a 24 bit file (which would cause me to remove the programmer responsible from the production team)


Quote
The only type of normalization I fine useful is Average level or RMS normalization and only in the broadcast or sample creation field. Peak level normalization is an ancient destructive process that was more of a time saving measure carried over from pre-plugin DAW's.

Quote from: aracu link=msg=0 date=
What normalizing software normally accomplishes normally sounds distorted, no matter what the normal mathematical or normal scientific explanation of it normally is.


... uff, done
Title: is WAV normalization lossless?
Post by: Axon on 2010-06-22 01:54:20
There's a profound amount of FAIL in the NEGATIVE comments there, particularly regarding TOS8.

Look. Fundamentally, peak normalization is scalar multiplication. PERIOD. It does not truncate, it does not add distortion. Those are purely effects impinging on it for some signal processing systems. Nothing's preventing you from defining an audio system that operates in 128-bit quad precision with quantization noise levels literally -2000db down from full scale. Nothing's preventing you from defining your input signals entirely algebraically and doing all your processing symbolically, eliminating quantization noise entirely (until you evaluate all the sample values of course).

In terms of the actual operation on the signal, peak normalization is exactly the same as RMS normalization. They're both multiplication by a constant.

You need to look at the quantiztion noise introduced by the normalization operation to gauge the quality loss. You need to look at the internal numeric format for computations vs the output numeric format and the noise/distortion imposed by each of them. You need to look at whether or not dithering/noise shaping is employed at the output stage. You need to look at how overflow/underflow are handled in the internal numeric format.  And if you're talking about audibility, if you don't employ a good DBT, you must look at ALL OF THIS in BOTH the time and frequency domains to analyze audible effects.

Very little of that, beyond what little commonality exists in choice of numeric formats, can be generalized beyond one digital audio application or another, or depending on configuration differences, even between different versions of the same app.

That isn't to say that evaluating normalization issues is somehow unknowable or that we should never care about it - dealing with quantization-related issues is a well-established (if complicated!) aspect of digital signal processing. But generally, once you are computing with a mantissa larger than 16 bits, employ dithering, and have a listening environment far noisier than the dither noise (read: all of them), you have nothing to worry about.

There's more I could say about the role of audio engineers in this debate but I would be saying things which are not nice at all so I'll stop.
Title: is WAV normalization lossless?
Post by: [JAZ] on 2010-06-22 19:12:28
You may have mixed several meanings/uses of the word normalization.


Normalizing is applying a gain, yes. But the gain is not the problem itself. The problem is the need of using normalization.

When the average joe talks about normalization, it talks about peak normalization. Pushing everything up doesn't necessarily give any benefit (the SNR is mainained so the noise is increased too). Also, nowadays there's little (if anything) to normalize, because everything is compressed ("clipressed" some would say).

Also, there are several fields of application:
It is not the same to normalize when recording than to normalize on playback.  Using too low or too high gain value when recording can either increase the background noise (decrease SNR), or clip inevitably (in case of recording in digital. With analog you had a safe margin).
Instead, normalizing on playback is basically the same than using a volume. If the user want to attach several volume knobs one after another it's up to him.
And in this case it's where the talk about the exactness of gaining in software or hardware plays a role.
Title: is WAV normalization lossless?
Post by: chrizoo on 2010-06-22 19:28:54
Using too low or too high gain value when recording can either increase the background noise (decrease SNR) ...

what is the optimal gain value then?
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2010-06-23 02:15:06
“gain staging” is the widely used term. Most recording chains contain a number of devices between microphone and recorder. The trick is to adjust each stage for the best gain-noise compromise, aiming for the final value desired at the end of the chain. Maybe there are some difference practices today, but for many decades, for most professionals, that overall gain goal was that the expected highest peaks would be at -20dBfs on the VU meter. This generally gave plenty of headroom for unexpectedly high peaks.

Most analogue devices have relatively low noise at low gain that gets noticeable worse at some point of increasing gain. For example, my modest microphone preamp is nice and quite as long as the gain knob isn’t rotated too high. Noise starts going up very noticeably at about 75% of the way to maximum rotation. Therefore I would set it at o more than 75% – if I can get enough signal, and not too much, to the soundcard at that setting.

In many recording chains there is at least a mixer, containing a line level preamp, and sometimes several other devices, before the ADC (or some analogue recording device). Each has its own characteristics, and thus its own settings. A particular combinations of devices, for a particular style of recording, or particular type of source, may require different settings on some of the devices than when they are being used for a different recording job.

And to think anything will be harmed in any slightest way by modifying the gain after recording, as necessary to fit the desired mix, is just plain silly.
Title: is WAV normalization lossless?
Post by: 2Bdecided on 2010-06-23 11:53:26
chrizoo,

I appreciate that you're trying to help, but IMO I think block quoting gearslutz threads on HA isn't helpful. I don't think many of us are interested in other people's subjective unsubstantiated blind-test-free opinions. The "consensus" of a set of such opinions is kind of irrelevant, unless you believe that the wisdom of crowds is a better way to figure something out than to look for verifiable facts. (Please don't delete it, but IMO think twice before doing something like it again!)

It always amazes me how little people on other forums understand audio, but post about it anyway! I guess it's because, if I don't understand something, I either keep quiet, post to ask a question, or preface my opinion with "I don't understand this, but...". Yet the internet is full of people who are happy to pass on their muddled misunderstanding of something as "fact".

Cheers,
David.
Title: is WAV normalization lossless?
Post by: Akkurat on 2010-06-23 16:10:57
Yet the internet is full of people who are happy to pass on their muddled misunderstanding of something as "fact".

Hmm, your "misunderstanding" might be a "fact" to them at that point (or for eternity if they can't grasp the issue). You do understand what you're saying is leading to? One should consider everything that one knows as a fact as false? So, we only know that we don't know?  Not understanding something needs an understanding that you don't understand. I bet that you have some "facts" in your head that are in fact "misunderstandings" (and sometimes say them out loud).  Maybe this is not what you meant?
Title: is WAV normalization lossless?
Post by: dv1989 on 2010-06-23 19:27:54
Uh-oh, internet philosophy…
Title: is WAV normalization lossless?
Post by: Axon on 2010-06-23 20:49:10
I appreciate that you're trying to help, but IMO I think block quoting gearslutz threads on HA isn't helpful. I don't think many of us are interested in other people's subjective unsubstantiated blind-test-free opinions. The "consensus" of a set of such opinions is kind of irrelevant, unless you believe that the wisdom of crowds is a better way to figure something out than to look for verifiable facts. (Please don't delete it, but IMO think twice before doing something like it again!)

It always amazes me how little people on other forums understand audio, but post about it anyway! I guess it's because, if I don't understand something, I either keep quiet, post to ask a question, or preface my opinion with "I don't understand this, but...". Yet the internet is full of people who are happy to pass on their muddled misunderstanding of something as "fact".

Honestly I'm a little more annoyed by the thread bumpage, but this brings up a topic which has been very much on my mind recently, which really has nothing to do with the OP. (Mods, feel free to fork threads.)

My perception - both about this specific normalization issue, and about half the crap we rant on about on HA - is that not only do most other forum posters seem to not understand the fundamental audio concepts, but that many and perhaps most practicing audio engineers do not understand the fundamental concepts, going all the way up to what is printed in trade mags and repeated by top-tier professionals. The internet is full of misinformed blowhards when they post about crap outside their area of expertise. For lay professionals in a field to also be blowhards is... really rare.

For instance, you'd be very hard-pressed to find an audio engineer who uses spectrum displays in their work while understanding what the effects of windowing are (much less understanding how to compute it). If you find somebody who dislikes MP3s, it is almost never nuanced in terms of encoder version, CBR vs VBR, the superiority of AAC, or even the intrinsic advantages of lossless coding indirectly related to sound quality. No - what I'd suspect you'd hear is something along the lines of "it's obviously poor quality" or "just listen to MySpace".

I've had an audio engineering student tell me with a straight face his understanding that WAV is higher quality than FLAC (which I quickly corrected albeit perhaps not in the most polite terms).

As I've mentioned before, a shockingly large number of audio professionals (both engineers and producers AFAIK) object to the loudness normalization implementations present in Spotify, last.fm etal - all of which are exactly or materially the same as ReplayGain - because they think it compromises sound quality.


This sort of thing is what led me to post this (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=79003&view=findpost&p=692412) in exasperation. It's easy to just ride the schadenfreude on this, but to be completely fair, this represents a tremendous gap in education efforts, which the AES ought to be filling.
Title: is WAV normalization lossless?
Post by: chrizoo on 2010-06-23 22:37:47
@Akkurat: good point!

@2Bdecided: I largely agree with you. That's why I picked an old, long forgotten thread, where - as I said above - it wouldn't matter too much. I don't plan on re-doing this, but I found it honestly very interesting to read, and I don't think it was in vain as a couple of people replied. Also note that it wasn't one but various threads on the forum you mentioned which I summarized, plus other sources, too. Many of the quoted users state they are audio professionals (Recording and Mastering Engineers), and as can be seen from Axon's posting above, this sparks interest.

“gain staging” is the widely used term. Most recording chains contain a number of devices between microphone and recorder. The trick is to adjust each stage for the best gain-noise compromise, aiming for the final value desired at the end of the chain. Maybe there are some difference practices today, but for many decades, for most professionals, that overall gain goal was that the expected highest peaks would be at -20dBfs on the VU meter. This generally gave plenty of headroom for unexpectedly high peaks.

Most analogue devices have relatively low noise at low gain that gets noticeable worse at some point of increasing gain. For example, my modest microphone preamp is nice and quite as long as the gain knob isn’t rotated too high. Noise starts going up very noticeably at about 75% of the way to maximum rotation.


AndyH-ha, this is very interesting. Because I always thought that I should do what they called myth#3 above, namely "record the hottest possible signal without clipping". But your posting suggests a completely different approach.
If I follow your logic correctly, what I should rather do is trying different recordings, each at a different gain level, then - on the final recordings - adjust the volume so that they are equally loud (in terms of RMS, right?) in order for them to be comparable and see which recording has the lowest amount of noise. Repeat this process until you narrow it down to the best gain level for your specific hardware, e.g. below 75% for the microphone preamp you mentioned.

What I didn't understand though, is why you first suggest one should aim for "the best gain-noise compromise" but in the very next sentence you said that one should aim for -20dBfs ...
While I understand that this gives you good security with regard to clipping, I don't understand why the "best gain-noise compromise" is necessarily at this value.
Title: is WAV normalization lossless?
Post by: AndyH-ha on 2010-06-24 08:04:07
Yes, experimenting before recording for real is the way to learn the characteristics of your equipment.

The target recording level (i.e. -20dBfs) is independent of “the best gain-noise compromise.” If the gain that gives good noise figures is not adequate to provide the target input level, then the optimum course is to put another gain stage between that and the ADC (e.g. a mixer in between the microphone preamp and the ADC inputs.) In general, this can give you more gain without as much increase in noise as turning up the microphone preamp’s gain beyond its good working range.
Title: is WAV normalization lossless?
Post by: 2Bdecided on 2010-06-24 09:58:02
My perception - both about this specific normalization issue, and about half the crap we rant on about on HA - is that not only do most other forum posters seem to not understand the fundamental audio concepts, but that many and perhaps most practicing audio engineers do not understand the fundamental concepts, going all the way up to what is printed in trade mags and repeated by top-tier professionals. The internet is full of misinformed blowhards when they post about crap outside their area of expertise. For lay professionals in a field to also be blowhards is... really rare.
You're spot on, and I agree 110%, except...

Professional audio has created for itself a parallel universe. The rules of science, evidence, objectivity etc don't apply there. There are different realities which people accept.

...and in those realities, they're very knowledgeable. The "best" people there don't lack anything.

If you were being kind, you'd say that it's the intersection of art and science, and why should those on the art side be excepted to understand the science.

Why indeed. Problem is, they believe that they do, and happily spout about it. We, here in the scientific real world, know its unsubstantiated bollocks, but in their world, it's accepted "truth".

Quote
This sort of thing is what led me to post this (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=79003&view=findpost&p=692412) in exasperation. It's easy to just ride the schadenfreude on this, but to be completely fair, this represents a tremendous gap in education efforts, which the AES ought to be filling.
I think you're being generous to the AES. While there's lots of hard science in there, some people who are proponents of what you criticise are paid up members - and vocal ones at that. The AES as a body doesn't subscribes to TOS 8 / DBTs you know!

Cheers,
David.
Title: is WAV normalization lossless?
Post by: Notat on 2010-06-24 15:57:47
My perception - both about this specific normalization issue, and about half the crap we rant on about on HA - is that not only do most other forum posters seem to not understand the fundamental audio concepts, but that many and perhaps most practicing audio engineers do not understand the fundamental concepts, going all the way up to what is printed in trade mags and repeated by top-tier professionals. The internet is full of misinformed blowhards when they post about crap outside their area of expertise. For lay professionals in a field to also be blowhards is... really rare.

I don't think it is particularly rare. You certainly see a lot of this in the practice of medicine.
Title: is WAV normalization lossless?
Post by: knutinh on 2010-06-24 20:24:21
If the applied gain can be expressed as a integer bitshift of fixed-point representation data, and the dynamic range of input data as well as target channel permits, then gain could be lossless I think.

For other situations, gain would be lossy as in "original data could be non-recoverable", but no one in for the music and audio quality would care. Only those obsessive about perverse audiophile stuff would care, and miss the chance to enjoy their music :-)

This discussion is similar to the debate of digital vs analog volume control I guess.

-k
Title: is WAV normalization lossless?
Post by: Axon on 2010-06-24 22:49:55
You're spot on, and I agree 110%, except...

Professional audio has created for itself a parallel universe. The rules of science, evidence, objectivity etc don't apply there. There are different realities which people accept.

...and in those realities, they're very knowledgeable. The "best" people there don't lack anything.

If you were being kind, you'd say that it's the intersection of art and science, and why should those on the art side be excepted to understand the science.

Why indeed. Problem is, they believe that they do, and happily spout about it. We, here in the scientific real world, know its unsubstantiated bollocks, but in their world, it's accepted "truth".

Well, yeah, but...

It is extremely important to clarify here: what we call a "parallel universe", really is their reality. Outside the relatively small world of theoretical audio engineering, the audio field is by and large a subjectively defined reality, especially for corporations. Look at how consumer prejudice of 128kbps MP3s has dictated what MP3 bitrates are considered acceptable nowadays for band downloads etc, which tend to have no relationship whatsoever with the actual quality of the encoder. Look at stories on forums about how clients come to mixing/mastering engineers with other bands' albums as reference points. I don't think there is anything "kind" about bringing art into the discussion - I think that, in the grand scheme of things (especially with what the vast majority of people in the audio field do for a living), the notion of a purely objective reality for audio engineering is something of an abberation.

It is far, far too easy for us with 4-year engineering degrees (at least!) to whip out bottomless resorvoirs of elitism here. After all, audio engineering is one of the few engineering professions where a 1-2 year technical diploma is considered acceptable, if not above average. Orthogonal to the art/science axis here, I think that those of us who sit more on the analytical/theoretical side of the field know very little about the practical/technical side, and vice versa. And people talking out of their league without realizing it seems to be the root issue here.

Sometimes it seems like two or more completely different fields are rolled under "audio engineering", and calling somebody an audio engineer in one field seems to give that person authority to comment on all the other fields under the same name. I'm reminded of jj recently starting a thread on The Womb about how mixing/mastering engineers there craft their mono mixes. That sh*t is important! And in a very real sense, "we" know far less than "they" do about it.

(Funny side anecdote: I remember once talking to a guy who, when talking to an EE graduate student, realized the student had no idea what a relay was.)

Elitism is definitely a bad sentiment here. I would even go so far as to say that personality largely influences the mindset of anybody in this controversy. Some people are just intrinsically more attuned to a subjective/objective viewpoint than others. And art, of course, is all about the subjective and the human.

To be honest I feel kinda guilty for ragging on lay audio professionals after seeing/engaging in really good discussions about bridging the divide on The Womb, which jj has been tirelessly working towards (whereas I've had considerably less stamina with the subject). In fact after thinking more about the practical/analytical dichotomy I'm going to walk back the comment about understanding power spectra, at the very least. It's really easy to b*tch about the situation but impugning pros and authority figures gets us nowhere. Education is the way out, and not just "force everybody to take more math".

I'd also like to opine that the liability for failure in an audio engineering context is spectacularly lower than for virtually any other engineering field. A lot more kinds of mistakes will not impact a bottom line in audio engineering, compared to other fields. That's a good thing in some ways and a bad thing in others. In particular, I think it's one of the leading reasons for the low cost of entry into the field (and thus the despicably low wages...).

Quote
I think you're being generous to the AES. While there's lots of hard science in there, some people who are proponents of what you criticise are paid up members - and vocal ones at that. The AES as a body doesn't subscribes to TOS 8 / DBTs you know!

Of course I'm being generous, but it isn't like we have a choice. I think that the AES is far and away the organization with the greatest potential of actually educating people about a lot of subjects like this.
Title: is WAV normalization lossless?
Post by: 2Bdecided on 2010-06-25 11:00:14
I think you're being generous to the AES. While there's lots of hard science in there, some people who are proponents of what you criticise are paid up members - and vocal ones at that. The AES as a body doesn't subscribes to TOS 8 / DBTs you know!

Of course I'm being generous, but it isn't like we have a choice. I think that the AES is far and away the organization with the greatest potential of actually educating people about a lot of subjects like this.
You'd be surprised how many people point to HA first.

...and I'm only half joking.

Cheers,
David.