PDA

View Full Version : Replay Gain in next nightly/firmware 22



vidurapparao
2005-09-15, 17:28
Latest svn and the next nightly build (along with Squeezebox2 firmware
22) implements volume normalization/Replay Gain for various audio and
tag formats - ogg, FLAC, MP3Gain (APETAGEX), AACGain, RVAD (MP3 via
iTunes) and RVA2.

There is now a Replay Gain setting under the Player Settings > Audio
section of the web interface. This setting can take the following values:
1) Disable Replay Gain
2) Use Track Gain (if present) - uses only track gain information.
3) Use Album Gain (if present) - uses only album gain information.
4) "Smart" gain selection - uses ideas and code from James Sutula's
Dynamic Transition Updater/Smart Gain plugin to dynamically choose
between track and album gain. The idea is that album gain is used if
successive tracks are from the same album and in track order, track gain
is used otherwise.

The last is the default value of the setting. Please give this a try,
post feedback and file bugs if you see any. I'm open to alternate ideas
for the setting choices and default.

Thanks to Dan Sully for tag parsing/database work and James Sutula for
his plugin.

--Vidur

JJZolx
2005-09-15, 17:43
Latest svn and the next nightly build (along with Squeezebox2 firmware
22) implements volume normalization/Replay Gain for various audio and
tag formats - ogg, FLAC, MP3Gain (APETAGEX), AACGain, RVAD (MP3 via
iTunes) and RVA2.

There is now a Replay Gain setting under the Player Settings > Audio
section of the web interface. This setting can take the following values:
1) Disable Replay Gain
2) Use Track Gain (if present) - uses only track gain information.
3) Use Album Gain (if present) - uses only album gain information.
4) "Smart" gain selection - uses ideas and code from James Sutula's
Dynamic Transition Updater/Smart Gain plugin to dynamically choose
between track and album gain. The idea is that album gain is used if
successive tracks are from the same album and in track order, track gain
is used otherwise.

The last is the default value of the setting. Please give this a try,
post feedback and file bugs if you see any. I'm open to alternate ideas
for the setting choices and default.

Thanks to Dan Sully for tag parsing/database work and James Sutula for
his plugin.

--Vidur
Fantastic. I'm not sure if Replay Gain has an enormous amount of appeal for the typical dyed-in-the-wool audiophile, although it's a godsend for casual listening.

I love the Smart Gain idea, but I'm not so sure I agree with requiring track order. If you queue up an album, then you delete a track (you know, that one track that always ruins the album-listening experience :-) will Smart Gain revert to Track Gain? I don't think it should. I'd prefer logic along the lines of "if three or more tracks in a row are from the same album, then use Album Gain, otherwise use Track Gain".

Bruce Hartley
2005-09-16, 00:02
What's the recommended software (windows) for applying replaygain tags to MP3s and to FLACs?

Foobar or something else?

Thanks,
Bruce.

Robin Bowes
2005-09-16, 01:37
Bruce Hartley wrote:
> What's the recommended software (windows) for applying replaygain tags
> to MP3s and to FLACs?

I wrote a perl script to apply replaygain to my library of flac files.

I can tidy it up and release it if there's any interest.

R.
--
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?

max.spicer
2005-09-16, 06:03
This doesn't quite sound like it will do what I want. I would want ReplayGain enabled if I'm playing random tracks, and off otherwise. Am I right in thinking that smart mode would end up turning replay gain on permanently?

Max


Latest svn and the next nightly build (along with Squeezebox2 firmware
22) implements volume normalization/Replay Gain for various audio and
tag formats - ogg, FLAC, MP3Gain (APETAGEX), AACGain, RVAD (MP3 via
iTunes) and RVA2.

There is now a Replay Gain setting under the Player Settings > Audio
section of the web interface. This setting can take the following values:
1) Disable Replay Gain
2) Use Track Gain (if present) - uses only track gain information.
3) Use Album Gain (if present) - uses only album gain information.
4) "Smart" gain selection - uses ideas and code from James Sutula's
Dynamic Transition Updater/Smart Gain plugin to dynamically choose
between track and album gain. The idea is that album gain is used if
successive tracks are from the same album and in track order, track gain
is used otherwise.

The last is the default value of the setting. Please give this a try,
post feedback and file bugs if you see any. I'm open to alternate ideas
for the setting choices and default.

Thanks to Dan Sully for tag parsing/database work and James Sutula for
his plugin.

--Vidur

jth
2005-09-16, 07:40
Max - what's wrong with using album gain when listening to full albums?

topster
2005-09-16, 11:07
Max - what's wrong with using album gain when listening to full albums?
Since replaygain is done digitally, to reduce the volume of the music, it needs to truncate bits.

If this truncation is done after it's been bit-extended to 24 bits, then it might not result in any information loss, if not, then you'd lose info -- a big no-no for audiophiles.

Can someone confirm which is the case?

And if it does the 'right' thing, maybe someone else with more expertise can calculate what's maximum attenuation in dB the extra 8 bits buy us without data loss.

Thanks!

pfarrell
2005-09-16, 11:35
On Fri, 2005-09-16 at 11:07 -0700, topster wrote:
> And if it does the 'right' thing, maybe someone else with more
> expertise can calculate what's maximum attenuation in dB the extra 8
> bits buy us without data loss.

8 bits is 48 dB.
Each bit is 6 dB, times 8 gives 48.

Now 6 is just an approximation, the real value is 6.020599913
but that is close enough to six for us friends.

Humans have a hard time noticing a sound that is 70 dB below
another, most recording engineers consider -70 dB to be a total
cut. This is how most perceptual lossy compression for audio works.


for more, see
http://www.pfarrell.com/prc/bits.html


--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

PhilNYC
2005-09-16, 12:42
Forgive me if this is a dumb question, but...what does replay gain do?

fuzzyT
2005-09-16, 12:50
PhilNYC wrote:
> Forgive me if this is a dumb question, but...what does replay gain do?

<http://en.wikipedia.org/wiki/Replay_Gain>

--rt

topster
2005-09-16, 12:52
8 bits is 48 dB.
Each bit is 6 dB, times 8 gives 48.

Ah, thanks!

That means as long as the output is at maximum gain, and the album gain isn't unusually low, having replaygain on shouldn't be audible, even with good gear.

Good to know!

max.spicer
2005-09-16, 14:46
So, does keeping replaygain turned on result in a reduction in audio quality that is likely to be noticed?

Max


On Fri, 2005-09-16 at 11:07 -0700, topster wrote:
> And if it does the 'right' thing, maybe someone else with more
> expertise can calculate what's maximum attenuation in dB the extra 8
> bits buy us without data loss.

8 bits is 48 dB.
Each bit is 6 dB, times 8 gives 48.

Now 6 is just an approximation, the real value is 6.020599913
but that is close enough to six for us friends.

Humans have a hard time noticing a sound that is 70 dB below
another, most recording engineers consider -70 dB to be a total
cut. This is how most perceptual lossy compression for audio works.


for more, see
http://www.pfarrell.com/prc/bits.html


--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

dean
2005-09-16, 17:57
On Sep 16, 2005, at 2:46 PM, max.spicer wrote:
> So, does keeping replaygain turned on result in a reduction in audio
> quality that is likely to be noticed?

No. The gain adjustments are done with 24 bit precision, so it's
very unlikely that you'd hear any quality issues. Also, if you don't
have replaygain tags (or the equivalent ID3 or iTunes settings) for
your songs, there should be no change at all to the bits.

max.spicer
2005-09-17, 02:00
In that case, I guess the need to have a "replaygain only when shuffling option" is far less pressing. Nevertheless, it would probably be a good option to have to keep the audiophiles happy. Should I file an RFE?

Max


On Sep 16, 2005, at 2:46 PM, max.spicer wrote:
> So, does keeping replaygain turned on result in a reduction in audio
> quality that is likely to be noticed?

No. The gain adjustments are done with 24 bit precision, so it's
very unlikely that you'd hear any quality issues. Also, if you don't
have replaygain tags (or the equivalent ID3 or iTunes settings) for
your songs, there should be no change at all to the bits.

jth
2005-09-17, 06:51
I don't understand why you suddenly might become less of an audiophile when you hit the shuffle button.

max.spicer
2005-09-17, 08:08
It's simply a convenience thing. Not having to potentially have to reach for the volume control every time a new track is played in shuffle mode could be considered a sufficient advantage to outweigh a potential loss in sound quality. However, when listening to albums, you should only have to adjust the volume once, so getting the best possible sound quality becomes more of a priority.

Max


I don't understand why you suddenly might become less of an audiophile when you hit the shuffle button.

seanadams
2005-09-17, 09:35
I don't understand why you suddenly might become less of an audiophile when you hit the shuffle button.

Audio = audio
philos = love

It doesn't say anything about how much you spent on cables or speakers, what file format you listen to, how you shuffle your music, or whether your volume knob is analog or digital.

:)

kelsey
2005-09-17, 09:49
When I received my Squeezebox in Sept. 2004, I was thrilled with the product but a little dismayed to discover that it provided no sort of output normalization functionality. Imagine my excitement then to see that this feature, filed as a bug in Dec. of 2003, has finally been implemented. Upon receiving an email update indicating that bug 80 was fixed, I downloaded the latest nightly and discovered... nothing.

Visiting the forums for some idea about what is going on, I see that it is only implemented for Squeezebox2. Will this feature be implemented for Squeezebox? Is there any technical reason that this cannot be implemented for Squeezebox? Is it the case that with the introduction of S2, Squeezebox is considered a non-supported product and won't receive and feature type upgrades?

hopefully,
Kelsey Kennedy

dean
2005-09-17, 09:59
Squeezebox1 continues to be supported.

The way to implement this on Squeezebox1 is by pre-compensating the
main volume level.

It's technically possible (within the capabilities of the decoder's
volume control), but that code hasn't been written yet. Would love
to see a patch, now that the hard parts have been done.

We did make a call to do the SB2 implementation first in part because
to do it right we needed to update the firmware.


On Sep 17, 2005, at 9:49 AM, kelsey wrote:

>
> When I received my Squeezebox in Sept. 2004, I was thrilled with the
> product but a little dismayed to discover that it provided no sort of
> output normalization functionality. Imagine my excitement then to see
> that this feature, filed as a bug in Dec. of 2003, has finally been
> implemented. Upon receiving an email update indicating that bug 80 was
> fixed, I downloaded the latest nightly and discovered... nothing.
>
> Visiting the forums for some idea about what is going on, I see
> that it
> is only implemented for Squeezebox2. Will this feature be implemented
> for Squeezebox? Is there any technical reason that this cannot be
> implemented for Squeezebox? Is it the case that with the introduction
> of S2, Squeezebox is considered a non-supported product and won't
> receive and feature type upgrades?
>
> hopefully,
> Kelsey Kennedy
>
>
> --
> kelsey
>

seanadams
2005-09-17, 10:08
Will this feature be implemented for Squeezebox?

possibly. It would need to be implemented differently though, by having the server send volume commands to the client at the right times. patches welcome.


Is there any technical reason that this cannot be implemented for Squeezebox?

Yes. Squeezebox1 used a third-party DSP chip for decoding audio, and we do not have access to that chip's internal software as we'd need in order to add codecs and features such as this. Squeezebox2 is a new architecture with vastly more CPU power and memory, and all the audio DSP is our own implementation, so we can do these things now.


Is it the case that with the introduction of S2, Squeezebox is considered a non-supported product

Absolutely not. We support our products and continue to add new capabilities for them in SlimServer, all the way back to serial #0000001.


and won't receive and feature type upgrades?

We are not adding new firmware features in Squeezebox1 at this point due to limits of the architecture and our engineering resources. We would still go back and do a firmware rev if some critical bug were found - i.e. we shipped at least one firmware update for our first product, SLIMP3, many months after it was no longer in production.

m1abrams
2005-09-18, 07:52
Why can you not use the FLAC decoder on the server to handle the replaygain? This seems to me would be a simplier solution for the SB1 instead of trying to do volume changing on the SB?

Bruce Hartley
2005-09-19, 11:25
because it might not just be FLACs that want replaygaining?

This would create unnecessary transcoding with RG'd MP3s?

But could be an interim solution?

so many answers, that are questions ;-)

m1abrams
2005-09-19, 11:27
because it might not just be FLACs that want replaygaining?

This would create unnecessary transcoding with RG'd MP3s?

But could be an interim solution?

so many answers, that are questions ;-)

Well for mp3's yeah your SOL without doing unneed transcoding. But atleast have FLAC decoder handle the RG would be a start. Seems it would be simplier solution then making the firmware do volume following.

Saam
2005-09-22, 02:11
Is replaygain supported for musepack (MPC) files?

Thanks

street_samurai
2005-09-22, 09:49
because it might not just be FLACs that want replaygaining?

This would create unnecessary transcoding with RG'd MP3s?


While I know that you were using MP3s as an example, mp3gain (http://mp3gain.sourceforge.net/) will fix this problem for MP3s (and AACs I believe). Although you'll have to choose between Track or Album gain when you do the gaining.

For other formats, yes you are SOL for now.

ss.

WildCoder
2005-10-27, 20:37
I wanted to experiement with the new replaingain settings using my softsqueeze (the one included in 6.2 slimserver) but I can't find a replaigain setting under the player's audio setting. I guess I need to wait for the next release of softsqueeze?

bernt
2005-10-27, 23:46
I added ReplayGain to all my files using Foobar2000. Did a fresh install of Slimserver 6.2 and the latest Softsqueeze.
I could see ReplayGain in Softsqueeze.

Removed ReplayGain from all my files upgraded to Slimserver 6.2.1
and I can't see ReplayGain in Softsqueeze anymore.

Do I need to add ReplayGain to my files or should Slimserver do it on the fly?

max.spicer
2005-10-28, 04:21
You need to add it. SlimServer does not add info to your files, it just reads what is already there.

Max

I added ReplayGain to all my files using Foobar2000. Did a fresh install of Slimserver 6.2 and the latest Softsqueeze.
I could see ReplayGain in Softsqueeze.

Removed ReplayGain from all my files upgraded to Slimserver 6.2.1
and I can't see ReplayGain in Softsqueeze anymore.

Do I need to add ReplayGain to my files or should Slimserver do it on the fly?

bernt
2005-10-28, 04:36
You need to add it. SlimServer does not add info to your files, it just reads what is already there.

Max

Ok, thanks.

mrfantasy
2005-10-29, 18:00
I'm adding replay gain data to my files now. I see it comes up in the track information both in the player and in the web interface. Which means it's in the tag database.

If there's a file with the replaygain tags that hasn't been rescanned yet (or if you're playing from a file via Browse Music folder) will the server read the gain tag info from the file and adjust accordingly? Or does the server only use gain values from the tag database?