Help - Search - Members - Calendar
Full Version: The thing with replaygain...
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
tom_vienna_at
This is a thing I wanted to discuss here for a long time, as it's driving me nuts...

I have my flacs replaygained (both values) and play them on foobar , my PC's connected to a good stereo. Replaygain should have leveled out all volume-differences between the tracks and the perceived volume should be equal.

Well... it isn't. Not in track-mode. There are tracks with a prominent bass that just boom in your face, others come very weak. The same happens if I have a playlist with several albums in it that is played with "shuffle" and "album"-replaygain-mode.

It seems to play a role if it's a hot mastered CD or not; it seems to play a role if there are silent passages in a track (replaygain makes it very much louder), it seems to play a role if there is a singer or not (that's the strangest thing! Take the vocal version and the dub from the very same album... in replaygain-track mode both will have very different volumes: the dub will be significantly louder - yet on the original cd both are about the same volume).

Yes, I have read about replaygain and how it works, but didn't understand it at all. I take it that replaygain scans only a portion of a soundfile or only a certain range of a soundfile and calculates the RG-values from it. That would make sense and explain this strange behaviour.

I hope I could point out the problem I am experiencing, any advice appreciated. At the moment I am correcting RG-values manually, so to say... and am looking for a solution that allows tracks to be heard at a truly same volume.

Thank you,
Tom.
Engywuck
just to sort some potential problems out:
- do you have an "extra-strong" bass booster or are your speakers more or less "linear" over the frequency range?
- do you use some sort of "signal processing", i.e. some sort of equalizer?
tom_vienna_at
QUOTE (Engywuck @ Nov 21 2007, 20:09) *
just to sort some potential problems out:
- do you have an "extra-strong" bass booster or are your speakers more or less "linear" over the frequency range?
- do you use some sort of "signal processing", i.e. some sort of equalizer?


No eq, no bass-booster whatsoever.
Lyx
IMHO, replaygain in track-mode is useless on a larger scale.

The problem is the one which you already described. RG has no way of knowing when certain songs are MEANT to sound quieter than others. It has no "ballad-mode" :-) This only affects trackgain though, because when using albummode, RG is automatically "calibrated" to the loudest track of the album, therefore keeping ballad-type tracks at reduced volume.

For this reason, i never use trackgain, even though i listen to mixed playlists most of the time.
DVDdoug
Replay Gain is not perfect...

The first problem is human perception. If you asked 3 different people to set the volume of two songs to make them sound equally loud, you would get 3 different settings.

The second problem is trying to make a computer program that models human perception.

And, things get difficult... If you have two (or more) different styles of music, the problems get harder. If you tried to make a classical piece the same level as a heavy metal song, you would have difficulty, because the average volume of the heavy metal can be louder than the classical, while the classical has louder peaks.

You can have a similar issue if you have some bass-heavy tracks and some more normal tracks. ...The first song is louder, but the other one has louder bass.

Or, what do you do with a song that has a quiet first half, and a loud 2nd half? If you use the average volume, the 2nd half will be too loud. So, you have to compromise and use your judgment.... something computers are not very good at.

Radio stations use several techniques to keep "constant volume". First, they stick to one style/genre of music. They use limiting & compression to make "everything loud". They manually adjust the volume for each song. (In the old days, the DJ had his hand on the volume control. Now, I assume it's done with something similar to a Replay Gain setting in their computer.) Then, they program the music so that they don't play a slow-quiet song immediately after a loud-fast song. They will play a medium-song in the middle (they call this a "music curve"), or there might be some talking or a commercial in-between.
greynol
Please Google Fletcher-Munson.
=trott=
The way I understood it, album gain was added in addition to track gain to provide for those songs which are meant to sound louder or quiter than the other tracks of the same album. So, album gain would be useless when not playing back an entire album in sequence.
Track gain is effectively the best way to level-gain your songs when playing a random selection of songs coming from different albums.
Then again, it's the best we have and I certainly can't come up with a better algorythm. Although I must admit when comparing a random selection of tracks levelled with replaygain or levelled with eg Apple's soundcheck both seem about the same (regrettably soundcheck is only available within iTunes).
greynol
QUOTE (=trott= @ Nov 21 2007, 13:49) *
The way I understood it, album gain was added in addition to track gain to provide for those songs which are meant to sound louder or quiter than the other tracks of the same album. So, album gain would be useless when not playing back an entire album in sequence.

Despite being off-topic (did either you or Lyx actually read the original post?), this is not true. Album gain allows songs that are quiet in the context of an album to remain quiet in the context of a compilation or shuffled sequence.
tom_vienna_at
Hmmm... I guess the perceived volume of music tracks is a very subjective thing.

If I have several tracks from several albums, I can choose for instance the bass and drums as my reference range for setting the replaygain-values (hence the volume) on all tracks. If I'd choose the singers voice as a reference range, things would look totally different, as there are tracks with a more silent voice and tracks with a very prominent voice (same goes for any other instrument - like the aformentioned bass & drums).

Sooo... I take it that replaygain is a very objective thing and has no mind of its own and chooses... well, what as a reference range?

If in fact listening is a very subjective, individual thing, objective techniques like replaygain are useless. It can give a rough estimate though but obviously has to be "manually" adjusted... that's how I work with it at the moment.

Funny thing... if I do a mix with track-replaygained flacs and convert them to one single wav-file with replaygain added, the resulting long wav file looks like extreme hills & valleys... no wonder there is no perception of equal volume in the end.
danbee
This might seem like an obvious question and I'm surprised nobody has asked it yet. Is your player definitely picking up the replaygain info and applying it on playback?
tom_vienna_at
QUOTE (danbee @ Nov 22 2007, 10:58) *
This might seem like an obvious question and I'm surprised nobody has asked it yet. Is your player definitely picking up the replaygain info and applying it on playback?


Yes, it does. I've tried both values - playback with applied track-rg-values and with applied album-rg-values. I even made my foobar show the values in the playlist and made a shortcut so I can easily correct them.

One thing though: I have never chosen the foobar-action "apply gain and prevent clipping according to peak" because I thought it isn't necessary... what is there left to clip if rg-values are something like -9dB? Maybe that is a false conclusion and I should try that option.

Another thought...: If I'd listen only to today's heavily-compressed-radio-friendly pop-music... chances are that all sounds equally loud, no? Isn't that what heavy compression does... everything screams in your face?

edit: typo
danbee
QUOTE (tom_vienna_at @ Nov 22 2007, 11:28) *
One thing though: I have never chosen the foobar-action "apply gain and prevent clipping according to peak" because I thought it isn't necessary... what is there left to clip if rg-values are something like -9dB? Maybe that is a false conclusion and I should try that option.


You're right that any file with a negative replaygain value will not clip, but a very dynamic, quiet piece may have a positive replaygain value, which could cause the player to clip the peaks on playback. This option will cause replaygain to reduce the level of the track so that peaks will not clip.

Another solution to this would be to insert a limiter into the DSP chain.
tom_vienna_at
QUOTE (danbee @ Nov 22 2007, 11:31) *
You're right that any file with a negative replaygain value will not clip

That is if no preamp is involved. I normally set it to +5dB, otherwise the overall-volume is much to low compared to my CD-Player.

QUOTE (danbee @ Nov 22 2007, 11:31) *
Another solution to this would be to insert a limiter into the DSP chain.

Limiter? Guess I better do a search on this one here... but doesn't a limiter alter the sound?
Martin F.
QUOTE (danbee @ Nov 22 2007, 12:31) *
You're right that any file with a negative replaygain value will not clip

I think this is only true for lossless codecs, because codecs like MP3 can have peaks above 1.
BrownRB
I use Replaygain in album setting with my Squeezebox. I am very pleased with the relative volume of songs when I play random tracks.

Occasionally a track will be too loud. In almost all cases it's because I forgot to apply Replaygain after I ripped the CD to flac. The only other thing I notice is that mono tracks, like the first few Beatles' CD's, seem a bit quieter.
2Bdecided
QUOTE (DVDdoug @ Nov 21 2007, 19:50) *
Replay Gain is not perfect...
That's the problem.

I don't have the solution, but DVDdoug listed some of the issues that can't easily be overcome. Even beyond these, ReplayGain isn't perfect.

Despite this, it seems to do remarkably well most of the time.

FWIW I don't use Track gain, ever.

EDIT: I've just remembered a compilation CD I made before I invented ReplayGain. Later, I had to use TrackGain for this to even out the unwanted volume differences that I'd faithfully copied from the original discs onto that single disc. If I re-made the compilation now, I'd AlbumGain the original tracks before copying them over onto a single disc. It is possible to find bad compilations like this from other people (where the quieter tracks are quieter by accident) that also need track gain to fix them.

Cheers,
David.
tom_vienna_at
Just an idea for an experiment:

What if I converted an album of flac files one more time to flac, applying the album-RG in conversion... and play the resulting (altered) flacs with applied track-RG?

I guess any intentional dynamics would be gone, but could that make the tracks sound all equally loud?

Guess I have to check that out.
greynol
QUOTE (tom_vienna_at @ Nov 22 2007, 06:48) *
I guess any intentional dynamics would be gone, but could that make the tracks sound all equally loud?

I'm not exactly sure what you're suggesting, but RG will never alter the dynamics within a track unless it's causing the track to clip (severely). It can alter the dynamics between tracks though (hence the reason why people don't like to use track gain).
tom_vienna_at
QUOTE (greynol @ Nov 22 2007, 17:50) *
I'm not exactly sure what you're suggesting, but RG will never alter the dynamics within a track unless it's causing the track to clip (severely). It can alter the dynamics between tracks though (hence the reason why people don't like to use track gain).


I was talking about dynamics within an album... which will be gone anytime track-gain is involved; at least that's my understanding.
greynol
Assuming you've calculated track RG values after you applied album gain during re-compression, then yes, track gain will remove the dynamics between tracks within the album when you apply track gain.

You did have a look at Fletcher-Munson, right?

Here's an interesting test you might want to try...
http://www.phys.unsw.edu.au/jw/hearing.html
tom_vienna_at
QUOTE (greynol @ Nov 22 2007, 18:02) *
You did have a look at Fletcher-Munson, right?

Here's an interesting test you might want to try...
http://www.phys.unsw.edu.au/jw/hearing.html


It shows that lower frequencies do sound quieter than high frequencies - despite being played at the very same volume. Is that what you mean? And if yes... can I make my foobar do the test too and will it afterwards start to play all my tracks at an equal volume?

(sorry, couldn't resist)
greynol
Yes, and it's different from person to person. This should in part help to explain how RG works and why various tracks don't sound equally loud to you. It should especially explain why tracks with vocals have lower RG values than dub tracks of the same thing.
tom_vienna_at
QUOTE (greynol @ Nov 22 2007, 19:04) *
Yes, and it's different from person to person. This should in part help to explain how RG works and why various tracks don't sound equally loud to you. It should especially explain why tracks with vocals have lower RG values than dub tracks of the same thing.

Thank you, this makes very much sense. Although I think you mean vocal-tracks have *higher* RG-values (more db's) than the respective dub-tracks, and that's why the dubs are always a few db's louder (like vocal track: -7.50 dB, respective dub-track: -3.50 dB)
Borbus
-7.5 dB < -3.5 dB...

Vocal tracks have a lower Replay GAIN (gain is the keyword) because human hearing is most sensitive at about the same frequencies as the human voice.
tom_vienna_at
QUOTE (Borbus @ Nov 22 2007, 19:47) *
-7.5 dB < -3.5 dB...

Vocal tracks have a lower Replay GAIN (gain is the keyword) because human hearing is most sensitive at about the same frequencies as the human voice.


Oh, thanks - I understand now.

I wonder if there is a way to make replaygain take the human perception of sound into account... after all, we hear with our ears, and those are partial when it comes to sound.
greynol
QUOTE (tom_vienna_at @ Nov 22 2007, 10:59) *
I wonder if there is a way to make replaygain take the human perception of sound into account... after all, we hear with our ears, and those are partial when it comes to sound.

RG already does take this into account, but again, not everybody is the same and I have no idea how closely it follows standard equal loudness curves. Then there's the difficulty in determining what value to use as the peak when dealing with real music.

RG would be a lot less precise if it didn't at least try to take these things into account.
buktore
2Bdecided, Did you already "finished" developing replaygain? No further development?

Cause like you said, it's not perfect. but i perfectly understand that it's would be very hard to improve it and it would be a lot of trouble to implement new version of it because it already standard, but it seem that it still could be done.

Just ask out of curiosity. smile.gif
tarsier
QUOTE (buktore @ Nov 24 2007, 01:46) *
2Bdecided, Did you already "finished" developing replaygain? No further development?

I've been thinking for a while that we need a Replaygain 2.0.

The last few AES conventions have presented research that shows that A weighting isn't as good as other weightings for percieved loudness measurement. Leq(R2LB) seems to show the most promise as a loudness indicator, even though it doesn't have as much experimental data as Leq(RLB). But I don't necessarily think that any Leq measurement is the way to go. I think the original Replaygain statistical analysis was a better method.

So perhaps Replaygain with a R2LB weighting?

I also think there should be a replaygain parameter for "dynamic range" that can somehow be set and used. (some AES papers also make this suggestion.) So for most pop music the dynamic range is small, but for most classical, the dynamic range is large.

Here's a PDF file of a Power Point presentation that touches on this a bit.
Axon
ReplayGain uses a custom-built filter that is considerably more complex than R2LB (or RLB). There isn't any well-known intrinsic property about RLB that would make it work any better than the existing RG filter, except that it happens to be more academically tested, and is used professionally a bit more often.

Moreover, the errors between predicted loudness and subjective loudness are still quite large. Look at the Leq(RLB) results: you can't get anything accurate to under 1.5dB. Now look at the HEIMDAL results: with an algorithm probably an order of magnitude more complex than Leq(RLB), and all of that work results in... accuracy to only 1db. Gee, what a big gain. Hardly any estimators work significantly better than Leq(RLB), but I'm tempted to indict the current state of the art rather than praise Leq(RLB) as a superior solution.

In that context, unless there are significant outliers that RG screws up on, I'd doubt that switching to RLB would improve things. Actually, since people are already talking R2LB, maybe somebody should submit the RG filter to the 1770 WG? It's certainly just as reasonable a filter to use, it seems.
Bourne
to the Original Poster:

I know what you mean... and this is just mainly because of CD mastering... at least for me it's the only thing that stood out as a symptom. You can go crazy with the most hundred different mastered CDs because each one of them were mixed a certain way and this varies a lot. I don't believe ReplayGain will fullfill those deficiencies, RG is just about volume. But I'll list some things for you to take this out of your mind:

1) Store your music collection as albums.
2) Store your albums by year, old albums will sound quiet, newer, louder. Don't mix up older and newer albums in the same folder.
3) For the stand-alone tracks, try grabbing the tracks you need from compilations that are on a single CD. (Eg. I need 5 Queen tracks from 5 different LPs, but I choose to grab the 5 of them from a compilation CD so they are mastered equally, at maximum having very close year-gap between 2 CDs.
4) Use a pre-amp but that will kill loudness-overall benefit.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.