WaveGain Vs Audacity Effect "Amplify"

Hi All,

Audacity 2.1.2

I am trying to set up some rules I can use to convert my WAV library to FLAC. Maybe this isn’t really a question for Audacity board but I don’t know where else to turn.

I have made 3 copies of the same file then WaveGain analyzed two of the 3 matching files, for instance 3 copies of a song by Willie Nelson “Hello Walls” then “level” two of the files using the recommended Db number WaveGain suggests. Using the suggested number results in the Audacity “Amplify” file matching the original WAV file in size. However when I WaveGain the last file I come up with a smaller size file by 44 bytes in the case of this album. I know 44 bytes is probably insignificant to the rest of the world but I want to make sure I do my best to get a full file size before converting to FLAC using Audacity or FooBar2000.

I know this seems confusing but I hope not too much.

Can someone help me understand how using the same Db number recommended by WaveGain, -3.07, by way of Audacity “Amplify” gives a different and larger result than WaveGain in 32 bit mode? To me it means Audacity’s resolution is higher but maybe not. I also had the idea Audacity might be “dithering” and adding just enough information back to the “levelled” file to make it match the original WAV file in size. I tried to read up on dithering in Audacity but got lost. I’m not too smart on all this as you can tell. I’m stuck till the mystery is explained to me so I can decide how to level my songs in each album. Anyway Thanks To All concerned.

The actual level of the audio samples does not affect the file size of lossless formats like WAV. http://www.audiomountain.com/tech/audio-file-size.html. A difference of 44 bytes could be some difference in the file header that precedes the audio data.


Gale

Actually, the amplitude does affect the file size for compressed formats.
It’s easy to see why that happens:
If a track has a peak level of say -12 dB, then the sample values are using at most 14 of the available 16 bits for 16-bit encoding. Most compression formats can take advantage of this by effectively ignoring the unused bits.

However, this is not a good way to reduce the file size, because to achieve a significant reduction in size requires that the level is substantially reduced, which means that you have to turn up the volume to achieve the same loudness, which increases the amount of noise. The reduction in dynamic range (hence sound quality) is a high price to pay for a small reduction in size.

If your media player supports ReplayGain (or similar lossless volume adjustment), then for best quality the original files should be close to 0 dB true peak, then let the player adjust the playback level.

Yes of course, but I understood that plainolguy was using WAV, in WaveGain, which can only analyze or save WAV.


Gale

However when I WaveGain the last file I come up with a smaller size file by 44 bytes in the case of this album.

Although metadata is rare in WAV files, I’d guess you are losing a tag somewhere in the process.

…FooBar2000.

I’m not a foobar2000 user, but foobar’s [u]bitcompare[/u] can compare the audio data in audio files (ignoring headers & tags and allowing you to compare WAV & FLAC).

…Personally, since there’s no editing I wouldn’t use Audacity for this… With the WaveGain Windows front-end you can WaveGain a batch of files. Then I’d use a conversion utility like TAudioConverter to batch-convert the files to FLAC. Finally, I’d tag the files using MP3Tag or another tagging utility. (MP3Tag can tag FLAC files.)

Yes, it is true I am only concerned at this point in my WAV files. And I am not sold only on Audacity to change the loudness of the music. I am happy to use WaveGain. In fact for what I am doing it is quite a bit faster. My questions are more pointed to having the most precise reproduction of the file that I can achieve…at a lower volume level so that if Audacity might better reproduce a file at a quieter level that is what I will use.

I would use MP3Gain or something similar except I have read recently (a nugget of information) that just adding the information to the final compressed file when I finally do that, will mean my MP3 player which can play FLAC and my USB stick will not be capable of adjusting the volume level.

Thank You Guys for helping me try to understand this. I am still puzzled though and I think Gale’s explanation is perhaps the answer to my question. I have used the same -3.07 Db to readjust all the files on the particular album I am experimenting with. No matter which file it is and no matter what WaveGain claims the Db adjustment of each particular file is, and no matter the size of each particular file, there is always a 44 byte difference in the WaveGained file and the Audacity massaged WAV file, which leads to the question of what is WaveGain removing from the file since the Audacity adjusted file and the original file are the same size? Anyway, again thanks, this really has helped.

My search continues…

In fact I remember now some information that says a WAV file has a lot of information in it that any other file might not have so maybe this is part of the answer. Just that I would have thought if WaveGain changes the files header or information it would no longer be a WAV file right? Sinking further and further into the quick sand. I must retire now.

My questions are more pointed to having the most precise reproduction of the file that I can achieve…at a lower volume level so that if Audacity might better reproduce a file at a quieter level that is what I will use.

Volume adjustment is simply sample-by-sample multiplication (or division). There’s no reason any software would do it any better than any other. (Unless you want to dither, etc.) For example, if you want to reduce the level by (approximately) 6dB, you multiply every sample by 0.5.

If you have a player that supports ReplayGain, the audio data in the file is not touched and just some metadata is added to adjust the volume at playback time. One potential advantage of ReplayGain is that there’s an album mode where the album is adjusted as a whole and relative difference between the loud & quiet songs remains. And, once you have the ReplayGain metadata, you can choose between song mode and album mode at playback time.

On Apple devices (or with iTunes on Windows) Sound Check is similar to ReplayGain.

I would use MP3Gain or something similar except I have read recently (a nugget of information) that just adding the information to the final compressed file when I finally do that, will mean my MP3 player which can play FLAC and my USB stick will not be capable of adjusting the volume level.

I don’t know what they are trying to say… None of this stuff will prevent you from using your existing volume control. Any method of volume matching will reduce the volume of many (or most) of your files.

Of course, MP3Gain won’t work with WAV or FLAC. :wink: The big limitation with MP3Gain is that without decompressing (and another generation of lossy compression) you can only adjust the volume in 1.4dB steps. That means you might “miss” the ideal volume target by as much as 0.7dB (which is usually acceptable).



there is always a 44 byte difference in the WaveGained file and the Audacity massaged WAV file, which leads to the question of what is WaveGain removing from the file since the Audacity adjusted file and the original file are the same size?

We don’t know but it’s interesting that the normal [u]WAV file header[/u] is exactly 44 bytes and we know the header isn’t getting deleted…

None of this stuff will prevent you from using your existing volume control. Any method of volume matching will reduce the volume of many (or most) of your files.

Yes and this is the reason I want to ‘volume level’ my archive files so I don’t have to fiddle with my radio, or other gadget while driving or reading etc. …I’m spoiled.

We don’t know but it’s interesting that the normal WAV file header is exactly 44 bytes and now the header isn’t getting deleted…

Now isn’t that something? Oh well, who knows?, at least that helps narrow avenues I don’t need to travel down to make a decision how to treat my music files. Thank You DVDdoug this does help.

If I was interested in this, I would use a Hex Editor like HxD to examine the original and WaveGain saved files. HxD can diff the files and show you what changed in the WaveGain file.

WAV files can store ReplayGain information as ID3 tags, though I don’t know if many players respect that information. Perhaps WaveGain is removing Replay Gain information from the file that is affected by this “loss” of 44 bytes.

Or perhaps it is cleaning up duplicated information in the headers.

If you figure it out you can let us know. :sunglasses:


Gale

Well, Foobar2000 does, but VLC not, on a quick test on Windows 10.


Gale

HxD huh? Well I don’t know much about this but then I knew even less before I started this quest so I will check it out and if I find something I certainly will come back and post. Thanks All!