I just uploaded WaveGain V0.9 to Roberto and to Speek.
I've added options to apply a 6dB Hard Limiter and Dithering to the output. Should be available soon.
QUOTE
Originally posted by john33
I just uploaded WaveGain V0.9 to Roberto and to Speek.
I've added options to apply a 6dB Hard Limiter and Dithering to the output. Should be available soon.
Thanks John. It's uploaded:
http://home.wanadoo.nl/~w.speek/wavegain.htm
Somebody
Aug 10 2002, 19:36
Thank you, Speek, John, and Roberto.
Madrigal
Aug 10 2002, 21:50
@john33:
Thank you. I have been using the first version of WaveGain, together with Speek's front end, ever since you released it, and have been very happy with the results. Thank you very much for the work you have put into it.
I have just upgraded to version 0.9, and this raises a few newbie-level questions with me:
1. Does the order of the options matter? In other words, is there any difference between -a -y -d and -a -d -y, for example?
2. I have only a fuzzy knowledge of dithering at best, and my only experience with it (a less-than-ideal method, I know) has been using the MAD decoder (madplay.exe, not the plugin) to decode mp3's. Briefly, what criteria should be used in deciding whether or not to use dithering with WaveGain? Is it something that should be always or never used, or is it a sometimes thing?
3. I have no clue whatsoever as to what a 6dB Hard Limiter is, and therefore no idea as to when (if ever) I should use it. Any brief explanation and/or guidelines would be very helpful to me.
Once again, thank you very much for developing WaveGain. It has improved my audio experience immensely.
I will content myself with -a -y for now, pending your response about dithering and the hard limiter.
Best regards,
Madrigal
john33
Aug 11 2002, 12:13
@Madrigal
Thanks for your comments.
To answer your questions:
1.) No, the order you specify the options doesn't matter except that they should come before the input files!
2.) In reality, dithering is only applied to the 8 and 16 bit output. Without going into great technical detail (and I'm not sure I'm qualified to do that anyway!!), the priniciple of dithering is to try to 'maintain the resolution of digital audio'. Simply put, when you mess with the original data using more than the original 16bit integer format, it is best to try to preserve some of the information contained in the least significant bits when converting back to 16bit integer. Dithering does this reasonably satisfactorily. So, if you input a 16bit integer wave file into WaveGain and you want 16bit, or 8bit, output, it is best to have that output dithered.
3.) 6dB Hard Limiter. If you wish to override the WaveGain recommendations regarding the output volume and use the manual gain option to boost the volume, you run the risk of causing a number of samples to clip. The Hard Limiter prevents this. If you are happy with the standard output, then ignore this. If you wish to increase the volume of the output, you may wish to add this option to prevent clipping.
Madrigal
Aug 11 2002, 16:34
@john33:
Thanks for the prompt, easily-to-understand reply. You are a gentleman!
As for my questions:
1. Understood. Therefore, using WaveGain with Speek's front end and not as a command-line operation, the order does not matter. That's what I suspected, but I'm glad to have it confirmed.
2. My only use of WaveGain will be standard PCM 16-bit signed .wav in, and standard PCM 16-bit signed .wav out. I will therefore use dithering, as you suggest.
3. I am, and always have been, quite happy with the standard output, and will therefore have no use for the hard limiter. My whole .mpc collection has been ripped, trimmed, WaveGained, encoded, Tagged, and then ReplayGained, and I am very happy with the results.
Once again, thanks for a great utility.
Regards,
Madrigal
QUOTE
Originally posted by Madrigal
My whole .mpc collection has been ripped, trimmed, WaveGained, encoded, Tagged, and then ReplayGained, and I am very happy with the results.
Why do you use wavegain on the files before encoding?
The resulting volume when playing the replaygained files would be the same anyway. By using it you only lower the quality of your files for no reason at all. Wavegain only makes sense for files that is kept as wav files (or other formats without any replaygain support), or before burning to CD.
/Andreas
Madrigal
Aug 11 2002, 17:57
@ancl:
Please read posts #22 and #23 in the following thread:
http://www.hydrogenaudio.org/forums/showth...hlight=WaveGain
Personally, I agree with John33's opinion and approach in post #23, especially as regards encoding from the adjusted file. That is why.
Regards,
Madrigal
Note that john33 doesn't mention he applies replaygain to the encoded files. Replaygain adjusts the audio volume to a certain level. You are making this adjustment twice. (Wavegain is replaygain only for wavs). Wavegain introduces rounding errors when scaling the wav. Replaygain that works on mpc's does not. If the difference can be heard is debatable, but why not save yourself an extra step and potential loss of sound quality?
Madrigal
Aug 11 2002, 19:09
@Gecko:
Thanks for your comments. I do not have an objectively logical answer for your question.
I have tried leaving out the WaveGain step, but as crazy as it may sound, to my ear WaveGain actually enhances the sound of the .wav files, and the resulting encoded files.
Maybe it's only me, but then again it's only my files that are being affected by my methods. I never intended to advocate them to others, by listing them in my earlier post. Sorry if that's how it was taken.
But on the other hand, if anyone else wanted to try the extra step, just out of curiosity, and wound up feeling the same way about the results as I do, then I would be delighted to have been the impetus for that happening.
Regards,
Madrigal
rjamorim
Aug 11 2002, 19:50
QUOTE
Originally posted by Gecko
Note that john33 doesn't mention he applies replaygain to the encoded files. Replaygain adjusts the audio volume to a certain level. You are making this adjustment twice. (Wavegain is replaygain only for wavs). Wavegain introduces rounding errors when scaling the wav. Replaygain that works on mpc's does not. If the difference can be heard is debatable, but why not save yourself an extra step and potential loss of sound quality?
According to Mr. David Robinson (2Bdecided), the quality loss introduced by wavegain is smaller than the quality loss introduced by Musepack --insane.
I believe everyone can live with that.
i could take this sentence
capitalize it: I COULD TAKE THIS SENTENCE
apply caesar chiffre: A UGMDV LSCW LZAK KWFLWFUW
capitalize it: A UGMDV LSCW LZAK KWFLWFUW
decypher: I COULD TAKE THIS SENTENCE
and waste some of my time.
It doesn't change the result in any way if I capitalize twice. Madrigal, you will probably notice that when you replaygain your mpc files the suggested gain will be close to zero. I agree with rjamorim that it probably won't affect the resulting mpcs much, if the input file has been rescaled. After all, clipping phobics do it all the time.

Speaking of which, I hope you take care that wavegain does not amplify your wav files so that they clip (could happen with music rich on dynamics). On the other hand: yeah, those are your files, do with them what you like. But when you allready have taken the plunge and use mpc I assume that you are interested in accuracy. Why trade a lossless procedure for a lossy one if the result is the same?
matthijsln
Aug 12 2002, 08:11
QUOTE
Originally posted by john33
3.) 6dB Hard Limiter. If you [...] use the manual gain option to boost the volume, you run the risk of causing a number of samples to clip. The Hard Limiter prevents this. If you are happy with the standard output, then ignore this. If you wish to increase the volume of the output, you may wish to add this option to prevent clipping.
Some files in my collection which are a bit quiet need clipping prevention even with +0.0 dB preamp. Only a few files, but as hard limiting degrades the sound quite a bit I thought I'd nitpick on this...
Madrigal
Aug 12 2002, 10:24
QUOTE
Originally posted by Gecko
i could take this sentence
capitalize it: I COULD TAKE THIS SENTENCE
apply caesar chiffre: A UGMDV LSCW LZAK KWFLWFUW
capitalize it: A UGMDV LSCW LZAK KWFLWFUW
decypher: I COULD TAKE THIS SENTENCE
and waste some of my time.
I strongly disagree that my method is analagous to this silly example.
QUOTE
But when you allready have taken the plunge and use mpc I assume that you are interested in accuracy.
Wrong. I am primarily interested in what sounds the best to me.
At any rate, I have neither any wish for a long, protracted argument, nor any inclination to defend my choices any further. Please do us both a favor: let me have the last word on this here and now, and let's both drop the issue. That way, neither one of us will be wasting his time.
Regards,
Madrigal
Sorry, if you have been offended. That was not my intention. When I said "and waste some of my time" I didn't mean that I was wasting time debating with you. I meant I was wasting time by "capitalizing" twice. It was the best and simplest example I could come up with, perhaps I should have invested more time. I couldn't find an example where if you apply a step twice it has no effect the second time (I thought about EQing etc). I was just trying to illustrate that you are doing the same thing twice and that the second run has no further effect. That is where I see the anology.
I will give "wavegained + encoded" vs. "encoded + replaygained" a listen but I doubt I can hear any difference. Like I allready said before, if it makes you happy, do whatever you like with your stuff. Sorry for stealing the last word, but give a guy a chance to excuse himself. Peace!
Madrigal
Aug 12 2002, 13:17
@Gecko:
No offense meant or taken. If the tone of my last post indicated that, then it is for me to apologize, not you.
I may be all wet, but I always thought that an encoder had to use some sort of algorithm to decide which pieces of information to retain, and which to discard. Further, I always thought that with two .wav's, one fairly loud and the other somewhat quieter, the difference in loudness had some sort of effect on the encoder's decision as to which parts of the overall sound were significant enough to retain, and which could safely be ignored and discarded.
If, in the foregoing paragraph, I am wrong, then you are probably right, and I am wasting a bit of time with the extra step. But if I am right, then the two encodes would be slightly different, and my preference for encoding from a quieter source file might have some merit.
Please rest assured that I have tried it both ways, and I do have a preference for encoding from a WaveGained source file.
Also, applying ReplayGain to the encoded file is not duplication in any event, since ReplayGain writes information to the encoded file that would not otherwise be there, in the event that there was some need to decode the file some time later on. Also, without the application of ReplayGain to an .mpc, the configuration choices for the Winamp plugin would be unduly limited.
If you really mean to give WaveGained + encoded a listen, versus encoded + ReplayGained, then you would really need to compare WaveGain + encode + Replaygain, versus simply encode + Replaygain, in order to make a fair comparison.
By all means, peace. Sorry if my earlier post led you to think I was offended.
Regards,
Madrigal
QUOTE
Further, I always thought that with two .wav's, one fairly loud and the other somewhat quieter, the difference in loudness had some sort of effect on the encoder's decision as to which parts of the overall sound were significant enough to retain, and which could safely be ignored and discarded.
I don't know about other codecs, but just yesterday I stumbled upon some
good news (allthough it's rather old

). Basically, when the music volume gets lower, mpc becomes more sensitive. In theory a "regular" codec discards more info on quieter files since more samples are bellow the absolute threshold in quiet. I hardly believe these thresholds are so high that it would matter though, yet this is the reason why many normalize quiet tracks (dunno if it actually helps, but I doubt it).
QUOTE
...then you would really need to compare WaveGain + encode + Replaygain, versus simply encode + Replaygain, in order to make a fair comparison.
What should I let the Winamp plugin do? Title/album based replaygain; clipping protection?
Cheers! :beer:
Madrigal
Aug 12 2002, 15:26
QUOTE
Originally posted by Gecko
What should I let the Winamp plugin do? Title/album based replaygain; clipping protection?
I recommend the following settings:
- equalizing by MusePack
- dynamic range 6
- ReplayGain Album (or Title) based - Clip protection OFF
- headroom K14
- dithered output
This is as also recommended here:
http://www.hydrogenaudio.org/forums/showth...plugin+settings
Regards,
Madrigal
Sachankara
Aug 13 2002, 10:42
QUOTE
Originally posted by john33
I just uploaded WaveGain V0.9 to Roberto and to Speek.
I've added options to apply a 6dB Hard Limiter and Dithering to the output. Should be available soon.
Could you add a feature to the log function that adds the command line to the log file? And also perhaps the ability to decide the filename of the log file via the command line, instead of renaming the file manually?
john33
Aug 13 2002, 11:27
QUOTE
Could you add a feature to the log function that adds the command line to the log file? And also perhaps the ability to decide the filename of the log file via the command line, instead of renaming the file manually?
I'll certainly take a look at adding those options. I'll think in terms of adding the command line automatically, but provide an option to specify the logfile name which, if not specified, will revert to the default. Is that what you had in mind?
Sachankara
Aug 13 2002, 13:28
QUOTE
Originally posted by john33
I'll certainly take a look at adding those options. I'll think in terms of adding the command line automatically, but provide an option to specify the logfile name which, if not specified, will revert to the default. Is that what you had in mind?
Yep, that's exactly what I had in mind...
john33
Aug 14 2002, 10:11
WaveGain V0.91 uploaded to Roberto and to Speek.
The user now has the option to specify the name of the log file, and the command line used is written at the beginning of the log.
Happy now?
rjamorim
Aug 14 2002, 10:21
WaveGain 0.91 already available at RareWares.
Regards;
Roberto.
Edit: Sources are now available too.
Sachankara
Aug 14 2002, 11:46
QUOTE
Originally posted by john33
WaveGain V0.91 uploaded to Roberto and to Speek.
The user now has the option to specify the name of the log file, and the command line used is written at the beginning of the log.
Happy now?
Perfect, works like a charm... Thanks a lot...
Can aif input and output support be easily added to WaveGain if it is not already there? Of course aif input would be more important to me so I would not have to convert my aif files to wave files first. Thank you
john33
Aug 15 2002, 08:45
@spies
New version uploaded to Roberto and to Wim with 'aif' input/output support. Please see Help.txt.
I've only been able to test this against 'aif' files generated by CoolEdit. Please let me know if it's OK, or not!
rjamorim
Aug 15 2002, 09:33
New version already uploaded to RareWares.
Regards;
Roberto.
Somebody
Aug 16 2002, 19:29
And once again, thank you rjamorin, john33, and Speek.
Love the the added log options.
Somebody
Aug 26 2002, 15:00
Just noticed that there is a new WaveGain v0.94 available.
CODE
-d, --dither X Dither output, where X =
0 for dither OFF (default).
1 for dither without Noise Shaping.
2 for dither with Light Noise Shaping.
3 for dither with Medium Noise Shaping.
4 for dither with Heavy Noise Shaping.
Which one is recommended?
Additionally, if I do want to use the 6dB hard limiter, should I include it with the command line next to the replaygain settings, or should I do it after?
Example:
--album -d 1 -y --log
and then
--limiter -d 1 -y --log
or just
--album -d 1 --limiter -y --log?
OR:
Is the hard limiter supposed to be used with a --gain x setting?
--gain X --limiter?
I'm so lost. Someone help me.

EDIT: Once again.
It is apparent that --limiter is used with --gain X
Question, is it possible for me to use
--album -d 1 -y --gain x --limiter --log all at the same time, so it does the album gain then adds whatever gain I wanted it to be added, instead of doing it in two steps?
john33
Aug 28 2002, 04:14
QUOTE(Somebody @ Aug 26 2002, 10:00 PM)
Just noticed that there is a new WaveGain v0.94 available.
CODE
-d, --dither X Dither output, where X =
0 for dither OFF (default).
1 for dither without Noise Shaping.
2 for dither with Light Noise Shaping.
3 for dither with Medium Noise Shaping.
4 for dither with Heavy Noise Shaping.
Which one is recommended?
Noise-shaping techniques re-equalize the spectrum of the dither while retaining its average power, moving the noise away from the areas where the ear is most sensitive (circa 3 KHz), and into the high frequency region (10-22 KHz). There isn't a hard and fast rule about which one to use, it will depend upon the input, although, theoretically, 4 should give best results.
QUOTE
Additionally, if I do want to use the 6dB hard limiter, should I include it with the command line next to the replaygain settings, or should I do it after?
It makes no difference what order you specify the options in.
QUOTE
OR:
Is the hard limiter supposed to be used with a --gain x setting?
--gain X --limiter?
I'm so lost. Someone help me.

There is really little, or no, point specifying the hard limiter with normal replaygain settings, you're right, it's really intended where you wish to apply a positive gain above the recommended level.
QUOTE
EDIT: Once again.
It is apparent that --limiter is used with --gain X
Question, is it possible for me to use
--album -d 1 -y --gain x --limiter --log all at the same time, so it does the album gain then adds whatever gain I wanted it to be added, instead of doing it in two steps?
Yes, you can specify all this at one time. The manual gain you specify is added to whatever relaygain value was calculated.
Sorry for the delay in replying, I only just saw this!
Somebody
Aug 28 2002, 12:16
Thanks a lot for the information, john.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.