INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  

Poll

How do you use Replay Gain?

I don't use ReplayGain
I use MC's internal ReplayGain functionality only
I process all my files externally with MP3Gain/VorbisGain
Other (please describe)

Pages: [1]   Go Down

Author Topic: Replay Gain Usage  (Read 5369 times)

yonkiman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 145
Replay Gain Usage
« on: July 15, 2006, 07:09:04 pm »

Just curious to find out how popular Replay Gain is for everyone.  I shuffle play all the time (on MC and on my Rockbox) so I find it extremely useful...

Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Replay Gain Usage
« Reply #1 on: July 16, 2006, 01:57:12 am »

Other - I like the concept, but not the reality.  I do have it on on my PC, but I have given up on my iPod.
On my PC, it makes all of the songs quieter - which means that I have to crank up the volume and 'normal' PC sounds are much too loud.
On my iPod, it makes me have to turn my head unit (in my car) up higher than I am comfortable with just to be able to hear the music.
Logged

Johnny B

  • Galactic Citizen
  • ****
  • Posts: 436
Re: Replay Gain Usage
« Reply #2 on: July 16, 2006, 04:07:40 am »

On my PC, it makes all of the songs quieter - which means that I have to crank up the volume and 'normal' PC sounds are much too loud.

?? Is it really so complicated to make the needed "Adjustment" in the Replay Gain menu? It's soo simple...
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Replay Gain Usage
« Reply #3 on: July 16, 2006, 05:07:15 am »

Exactly  8)

Adjustment - Fixed 9.0dB+

Volume is at 20% and stays that way.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #4 on: July 16, 2006, 08:32:13 am »

Exactly  8)

Adjustment - Fixed 9.0dB+

The Replay Gain systems works by adjusting the level so that the average RMS level is 20 dB below full scale. You should have your playback system "calibrated" so that a song with an average RMS level 20 dB below full scale sounds at a comfortable level. The 'normal' PC sounds of course will sound louder respect to a Replay Gain-compliant output, if they are generated by the same soundcard. You can either use two soundcards (one for the Media Center playback, another for system sounds) going into a mixer, and adjust levels there, or you can adjust the volume of the system sounds using a sound editor (like Media Editor).

When I discovered Replay Gain, at first I was tempted to use a similar adjustment. But when I studied Replay Gain and understood how it works, I found that such an adjustment can be dangerous. Let's call dynamic range of a track the difference between peak level (Media Center expresses it in percent, and not in dB) and its average RMS level. If you adjust the level with a +9 dB gain, then tracks with more than 11 dB of dynamics will clip for sure. The Replay Gain standard allows for tracks with dynamics up to 20 dB, which is rather difficult to exceed (only experimental or demo tracks have a dynamic range of more than 20 dB).

Here is an example of a signal with an average level 20 dB below full scale and a peak level 8-9 dB above that.


Quote
Volume is at 20% and stays that way.

What is the meaning of the volume at 20%?

Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Replay Gain Usage
« Reply #5 on: July 16, 2006, 09:01:01 am »

Options->Startup->Startup Volume->Set Volumeto 20%
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #6 on: July 16, 2006, 09:25:43 am »

Volume set to 20% means a -14 dB gain (I don't understand why levels are expressed in percent and not in dB in Media Center). You have set replay gain to a fixed +9 dB gain. Overall you have a -5 dB gain. This level setting should never clip the output of the sound card, but I don't know exactly the signal path inside Media Center. If it uses fixed-precision arithmetic, it could clip before reaching the soundcard.

To compensate the +9 dB gain the volume can be raised to about 35% (corresponding to -9 dB).
Logged

Johnny B

  • Galactic Citizen
  • ****
  • Posts: 436
Re: Replay Gain Usage
« Reply #7 on: July 16, 2006, 09:37:43 am »

The 'normal' PC sounds of course will sound louder respect to a Replay Gain-compliant output, if they are generated by the same soundcard.

Not true. I have only 1 soundcard and the system sounds do sound at the same volume level all the time - independently to what is set in MC (Replay Gain On or Off, any Adjustment (RG), any Volume (MC) etc...)
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #8 on: July 16, 2006, 10:08:14 am »

I have only one soundcard. The system sounds play at their standard level. Replay Gain in MC, when turned on, decreases the overall volume of MC output. So I have to increase the speakers (or headphone) volume. Therefore system sound become louder.

It seems that in you system activating Replay Gain or changing MC volume has no effect on MC output.
Logged

Johnny B

  • Galactic Citizen
  • ****
  • Posts: 436
Re: Replay Gain Usage
« Reply #9 on: July 16, 2006, 10:15:23 am »

Read my post again...
Of course Replay Gain DOES change the MC output volume level! It does NOT affect the level of the system sounds though...

And if you increase the volume on your speakers / amplifier then obviously EVERYTHING what you hear from your computer sounds louder - except the coolers  8)
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #10 on: July 16, 2006, 11:40:45 am »

We are saying the same thing after all...
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Replay Gain Usage
« Reply #11 on: July 16, 2006, 06:23:25 pm »

?? Is it really so complicated to make the needed "Adjustment" in the Replay Gain menu? It's soo simple...

Sure that is easy to do, but what do you do about high dynamic range music clipping due to the 9db boost?  If all you listen to is modern pop/rock CD's that have had all the original dynamic range squeezed out of them during mixing/re-mixing/mastering then that might be a good solution.  If you listen to anything with actual dynamic range to it you will have clipping issues.  Or am I missing something?
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #12 on: July 17, 2006, 02:35:28 pm »

The meter in my post earlier in this thread illustrated the dynamic range of 20 dB in a standard Replay Gain system (0 dB fixed gain).

http://img.villagephotos.com/p/2006-6/1193856/pink-20-post-log.jpg

If you boost the average level by 9 dB you have only 11 dB of dynamic range remaining. A peak higher than 11 dB will certainly clip (if Media Center does its signal processing with fixed-precision arithmetic, as it is most likely). Even if you then lower the MC main volume, you lower the level of an already clipped signal. BartMan01's remark is right.

Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Replay Gain Usage
« Reply #13 on: July 17, 2006, 02:44:40 pm »

Does peak level have anything to do with this ?

Could say tracks with peak levels closer to 100% be more at risk of clipping than those at lower peak levels.
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Replay Gain Usage
« Reply #14 on: July 18, 2006, 01:50:49 pm »

Does peak level have anything to do with this ?

Could say tracks with peak levels closer to 100% be more at risk of clipping than those at lower peak levels.

Peak level is not as important as total dynamic range of the music.  With modern pop music, it seems that the current philosophy is 'loud = good'.  The tracks are mixed/mastered with their peak being near 100%, but with no dynamic range (load a wav file up in an editor to see this visually).  There is little to no chance of these clipping.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Replay Gain Usage
« Reply #15 on: July 18, 2006, 02:48:45 pm »

ok, still not understanding why there is less chance of clipping, with peak levels close to 100% and a Adjustment - Fixed 9.0dB+
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Replay Gain Usage
« Reply #16 on: July 18, 2006, 03:54:00 pm »

Where does MCs Automatic adjustment come in to play in all this?
Logged

Johnny B

  • Galactic Citizen
  • ****
  • Posts: 436
Re: Replay Gain Usage
« Reply #17 on: July 19, 2006, 05:15:17 am »

To all - don't forget the "Overflow handling - Clip protection" option which works pretty well as an "limiter"; dynamic range may be narrowed ocassionally but no clipping issues are heard...
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Replay Gain Usage
« Reply #18 on: July 19, 2006, 08:49:56 am »

Where does MCs Automatic adjustment come in to play in all this?
I use it with replay gain to boost the sound, get better results this way.

I'm wondering whether peak level has any effect on how much replay gain is calculated ?
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #19 on: July 21, 2006, 01:36:25 pm »

I think that we need a block diagram of MC at this point in order to understand Replay Gain, peaks, clipping and related issues. I just tried to figure out what the audio path inside MC is. But it is just a guess. My posts are based on my assumptions about MC's internals, and might be wrong.

Most decent audio equipment comes with a block diagram. Audio-conscious users want to know what is going on inside the equipment they paid for. I guess that MC users want to know that too.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #20 on: July 22, 2006, 03:37:26 pm »

What's the difference between Audiophile Gain as defined by Replay Gain creators and Album-based Replay Gain in Media Center? They seem to be the same thing. Both base the gain adjustment on the average level of the entire album.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #21 on: July 23, 2006, 05:00:16 am »

Can Media Center apply Replay Gain to live streaming tracks? Tracks from di.fm and sky.fm have a very high average level (about 8 dB below full scale instead of 20 dB as prescribed by the Replay Gain standard).
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Replay Gain Usage
« Reply #22 on: July 23, 2006, 12:15:22 pm »

ok, still not understanding why there is less chance of clipping, with peak levels close to 100% and a Adjustment - Fixed 9.0dB+

Look at your 'all loud' files with peak levels near 100%.  In most cases, the replay gain adjustment is more than -9db.  Starting out at 0 db (max volume), subtract 11db via replay gain, add back in 9 db via adjustment, and you end up with max volume of -2db.

Problem is that with high dynamic range music, the adjustment will likely be less than 9db and some of the music will be pushed into clipping. 

Even without the adjustment, it looks like replay gain will clip problem tracks.  Don't have any good tools to validate this - but using the 'BPM/Intensity/Replay Gain/Peak Level' view scheme, I have one track that shows a peak level of 100%, and a replay gain adjustment of +6db.  Then again, this track has maybe a fraction of a second of sound near 100% and the rest of the track is very quiet.
Logged

modelmaker

  • Citizen of the Universe
  • *****
  • Posts: 1531
Re: Replay Gain Usage
« Reply #23 on: July 23, 2006, 02:11:27 pm »

Can Media Center apply Replay Gain to live streaming tracks? Tracks from di.fm and sky.fm have a very high average level (about 8 dB below full scale instead of 20 dB as prescribed by the Replay Gain standard).


No. MC must first analyze the tracks before RG can work.

My solution to the volume difference issue was to turn off all the system sounds. I have had a very peacefull life ever since, no longer interrupted and annoyed by MS noise. :)
Logged
Jay.

"Life is what happens when you're making other plans"     John Lennon.

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #24 on: July 24, 2006, 01:56:34 pm »

Even without the adjustment, it looks like replay gain will clip problem tracks.  Don't have any good tools to validate this - but using the 'BPM/Intensity/Replay Gain/Peak Level' view scheme, I have one track that shows a peak level of 100%, and a replay gain adjustment of +6db.  Then again, this track has maybe a fraction of a second of sound near 100% and the rest of the track is very quiet.

The analysis you suggest could be implemented via database expressions.

Unfortunately Media Center:
- expresses peak level (as well al master volume) in percent and not in dB;
- populates a field with the Replay Gain value, and not with the Average RMS Level value;
- cannot handle numerical values in Database Expressions, but only strings.

It's rather simple maths thereafter.

Each audio file has an average RMS level AVG (actually Replay Gain applies A-weighting for computing it) and a peak level PK, both of which are calculated by Analyze Audio. Both AVG and PK are not positive (negative or zero) when expressed in dBFS (dB relative to Full Scale).

The average level is translated to Replay Gain using the formula

RG=-20-AVG

Peak Level is expressed in percent, while it would be better to express it in dBFS

PK=20*log10([Peak Level]

According to Bob Katz’s terminology, let’s call headroom the dynamic range of the signal (AVG to PK). It is left unchanged by Replay Gain.

HR=PK-AVG

and cushion the spare part of the system’s dynamics (PK to the system’s full scale), that is actually never used in playback. The cushion is altered by Replay Gain.

CSH=0-PK-RG=-PK-(-20-AVG)=20+(AVG-PK)=20-HR

The output signal clips when there is no cushion (CSH<0), that is, when HR>20 and AVG<-20 (the track dynamic range is more than 20 dB and the average track level is below -20 dBFS -- it's the same you said before, but in formulas RG=+6 dB, PK=0 dB, AVG=-26 dB, HR=26 dB, CSH=-6 dB).

I implemented that formulas by exporting data from Media Center using copy-and-paste into a spreadsheet, and I found that "problem tracks" are very few (tracks that clip after Replay Gain, CSH<0). Most of them are demos of professional musical instruments. You can download them for free:

•   “Flautando” by Herb Tucmandl, a demo of the Vienna Symphonic Library sample library, that shows its high dynamics.
•   “Adagio clean” , a classical piano track used to demonstrate Hybrid Piano 2 by Post Musical Instruments.
•   “Dark Side” by Dan Fisher, a demo of the Kurzweil K2600 synthesizer, that uses a lot of resonant analog filters.

Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #25 on: July 25, 2006, 10:46:10 am »

No. MC must first analyze the tracks before RG can work.

I think that Analyze Audio in Media Center could be greatly improved by adding an additional "Suggested Change in Replay Gain" field on a track-by-track basis. The value will be added to the standard Replay Gain. This could help with two situations:

- "Problem tracks" with average level less than -20 dBFS (and therefore a Replay Gain greater than 0 dB) but a peak level at 0 dBFS (or 100% in Media Center terminology). These track can clip when Replay Gain is applied to them. For these tracks, a negative "Suggested Change" could be specified in order to prevent peaks to overflow the soundcard output. This is an alternative to using the built-in limiter in DSP Studio, that would make the track "radio-sounding" (unnaturally compressed) during critical passages with peaks.

- Streaming Audio, where the Replay Gain value cannot be exactly determined. Streaming audio could be analyzed as well, however. The audio stream could be run for about an hour into the Analyze Audio engine (high CPU usage, though). The resulting Replay Gain, which is only an estimate, could be set as "Suggested Change in Replay Gain", since Replay Gain itself cannot be computed for certain and is therefore 0 dB. Se even audio streams can be adjusted to play at a compatible level with other analyzed tracks. It would then be immediate to notice the heavy compression used on streaming Internet audio (average level about 8 dB below peak level, while the suggested average level for live broadcasting is 12 dB below peak level).
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #26 on: July 25, 2006, 11:12:19 am »

My solution to the volume difference issue was to turn off all the system sounds. I have had a very peacefull life ever since, no longer interrupted and annoyed by MS noise. :)

I don't think your solution is the definitive one, because there are some events that require attention and are notified only via system sounds, such as the completion of CD/DVD burning and some critical system errors. This is less of an issue if you are using a dedicated HTPC for audio playback only, and not for general purpose use, so system events are not so important there. They could even be annoying.

A more compete solution is to use two soundcards, one for the Media Center output using Replay Gain, and one for system sounds and other programs not compliant with Reply Gain. Their output can be fed into an analog mixer and levels can be adjusted there.

I don't know if there's a way to route system sounds differently from the "default" soundcard. One could use:
- An high quality soundcard fed with Media Center output;
- An high quality soundcard fed with output from other audio programs;
- A standard quality soundcard (integrated in the motherboard) fed with system sounds and driving the (low-quality) monitor speakers, that can be muted at will.

This won't work using headphones. The system sounds would always come out of the monitor speakers. This might not be desired.

You should then have three high quality soundcards going into an analog mixer, but this is too expensive and using an high quality soundcard for system sounds is really a waste of money. On the other side, a standard quality soundcard fed into a mixer is just too noisy respect to high quality ones.

Can I disable Windows' system sounds with a single click without disabling the entire default soundcard output using the speaker on the system tray? By the way, high quality soundcards don't show a speaker icon in the system tray for sound quality reasons.

Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Replay Gain Usage
« Reply #27 on: July 26, 2006, 06:20:04 pm »

A more compete solution is to use two soundcards, one for the Media Center output using Replay Gain, and one for system sounds and other programs not compliant with Reply Gain. Their output can be fed into an analog mixer and levels can be adjusted there.

What about this to remove the analog mixer:
On board sound for system sounds.  Output from on board sound sent to input on 'good' sound card.  That input can then be leveled in the audio controls for the 'good' sound card and then will feed out from it to your sound system.  I have both an on-board card and Soundblaster X-Fi (the Fatal1ity variant) card, so I may have to try that.  And YES, I know this is not a true audiophile card but I use the system for games too and it is 'good enough' for my needs.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Replay Gain Usage
« Reply #28 on: July 29, 2006, 07:21:22 am »

This is a good trick in general. It's a matter of overall balance in component quality. If all components are good, you can chain them.

An analog mixer is already part of my audio setup, as I am an amateur musician and I have a synthesizer and an expander going into it, plus spare stuff. So I don't have the need to override the analog mixer.

Also the trick does not work for me. My soundcard's input is already taken because I feed the soundcard output back into its input via the driver's control panel, so that I can monitor the actual soundcard output via VST plug-ins. This is a trick too, and I will use it until Media Center will have a decent VST visualization plug-in interface.

About the "default" sound card quality, it is usually rather noisy and poor, so you could not wish to have it mixed with an high-quality soundcard output, via an external mixer or not.
Logged
Pages: [1]   Go Up