Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ReplayGain Newbie (Read 2161 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ReplayGain Newbie

I have just found out how to rip my several SACDs to .dsf. For now I have just ripped the multi-channel audio. I then used foobar2000 to convert the .dsf to FLAC 24/44.1. The music plays back quietly and I have read that SACD files are about -6dB quieter in general. So I thought I would look to using ReplayGain to normalise.  So far I have written tags to one sample album from a scan using the option "Scan as a Single Album". I attach a screenshot of the values, which I am not sure how to interpret. Am I naive in thinking that when I play this album back the volume will be normalised? It does not seem to be working that way. What else do I need to do?

My aim was to normalise the ripped and converted SACD FLAC, and then look to more wider use of ReplayGain if I liked the results. I also use Kodi music player which has the option to normalise from "album gain" tags but I do not notice any volume uplift in Kodi either. Any guidance and assistance will be greatly appreciated.



Re: ReplayGain Newbie

Reply #1
If the KODI player can recognize and use Album RG tags, then it should volume normalize.  But in your example, I can see why you would notice no difference in volume. The Album RG value is so small, it is likely not audible. You should test with an album that has much larger album RG adjustment.

Re: ReplayGain Newbie

Reply #2
ReplayGain is designed to be applied across your entire library.  It will bring playback of all files -- soft and loud -- to the target level.  You can load your music library into foobar2000 and "Scan as albums (by tags)" in order to write ReplayGain tags to each file.  (You may want to start with a subset of your collection just to confirm you get what you expect.)  Set Kodi to use RG "Album values", enable "clipping protection", and don't mess with the target dB levels.  I am not familiar with everyday use of Kodi, but with my music server if I change/add RG values I then need to rescan my library for changes before the new values take effect.  Remember, the RG values are tags (which means that you can remove RG via foobar2000 at any time without changing the audio quality of your files.)

If you're not comfortable with this, just amplify your SACD-derived FLAC files by +6 dB and re-save them.  This is easy enough to do with Audacity in batch mode and should approximately match your library average which likely has been affected by the "Loudness War" and the reason why these new files sound quiet to you.

Re: ReplayGain Newbie

Reply #3
Thanks for your help and advice @garym  and @Apesbrain

It does seem I was looking at this the wrong way round. It is not that my SACD rips are quieter, (@garym indicates the example is near the RG target), rather that the CD rips are louder (loudness wars era?).

I have now written tags to the rip I made 8 years ago from the CD layer of the exact same media disc shown in my original post. It used to play back much louder that the recent SACD layer rip. Now that I have added RG tags they both play back at the same level. Below is a screenshot of the CD layer RG values.

I will over time add RG tags to my whole library starting with a subset of folders to check I am getting what I expect. I do want to preserve any relative changes in level from track to track within an album which may be present for artistic reasons. So I assume I need "Album gain" scanning to achieve this.

Re: ReplayGain Newbie

Reply #4
Correct. To retain intra-album track differences, use ALBUM RG.   But when scanning all your albums to add RG tags, I suggest you go ahead and add both TRACK and ALBUM RG tags.  It's just tags and not used unless you tell your player to use it.  And there may be sometime down the road when you want to make some playlists from different albums and then when playing you would want the player to use TRACK RG tag value.  You can use foobar2000 to add these tags, by album, in a batch manner. A couple of mouse clicks and let it run to analyze and add RG tags to 1000s of albums.

p.s. In my own case, all my players support some sort of "Smart" ReplayGain tag use.  That is, if I am playing songs from the same album, Album GAIN is used.  But if I'm playing a mixture of songs from different albums, TRACK GAIN is used.  This is all automatic.  In foobar2000 this is called "by playback order".  In LMS it is called "Smart Gain".

Re: ReplayGain Newbie

Reply #5
Replay gain is terrible at boosting levels. Open your tracks in something like audacity and normalise them to a higher level permanently.
Life-long Music Collection: 747GB / 25,646 Tracks & COUNTING! - 99% Lossless FLAC

Re: ReplayGain Newbie

Reply #6
I was using Winamp during my Windows/dual booting days, which ended in Feb 2020 when Win7 died. Not going to bother with win10, I'm completely a Debian guy now.

I've installed foobar2k through snap. The last question I have regarding ReplayGain (which on other linux players like Banshee or RhythmBox, are complicated, enabling them isn't enough, the cursor is there at -0db and even if your flac files are already tagged (I did most of it using metaflac --add-replay-gain). I like how it's sounding, but I notice the volume button indicated -something decibels). If I set it to Album, and I mostly listen to whole albums, I'm not a mix guy since my teens, when we had mixtapes and CD-R's...we can still do CD-R's, but why bother when my car stereo has a usb stick entry and also plays data DVD's and can navigate through folders, got that in 2005, was way ahead of everyone, the only thing more expensive at the store was some kind of stereo with a small hard drive you could eject and connect to your computer to move files and then slide back in the stereo's slot, wasn't going to pay 720 bucks for that).

Anyways, as I was saying, say the album gain is at -7.73 and I set it to Album in RG. Do I have to reduce the volume to -7.5 or so and only raise the volume through my desktop (which has a pretty great speaker+sub set with it, also sometimes I bring the desktop in the livingroom and plug it to my stereo with SPDIF) so that it truly works? With Rhythmbox and Banshee plugins, setting the correct Db involved algebra...which I'm able to do, but screw that, not doing it on my leisure time. I realized foobar2k took care of that automatically so....is it totally automatic, or the volume slider button has to be set at the closest album gain or if using track,  the track's gain on the id3v2 tags?

Thank you everyone.

Re: ReplayGain Newbie

Reply #7
Unclear what you ask, please clarify the question.

The idea is that after the player has read the RG tags, "full" volume should sound pretty much the same loudness for every album. If you play a "-7.73" album through a ReplayGain-aware player, it will - to that end - reduce the volume with 7.73 dB for you automatically.

And it is in ID3 for files with ID3 tagging yes. Other file types have other tagging schemes, but it works the same way.

Re: ReplayGain Newbie

Reply #8
The official ReplayGain volume of 89dB is actually a sound pressure level based on a SMPTE standard, so it doesn't mean much to humans that way, but it translates to -18dB on an audio meter (it's not the RMS or average volume but it's -18dB in respect to how loud a track sounds). That target volume for ReplayGain is fixed.

The ReplayGain data saved to tags contains the Track or Album gain required in order to adjust the volume to the ReplayGain target volume. It's automatic, so if you enable TrackGain or AlbumGain in preferences and leave the "With RG Info" slider on 0dB, for TrackGain each track is adjusted to the target volume. For AlbumGain, an entire "album" is adjusted, but the relative volume between tracks stays the same. They're two different sets of data though. TrackGain is specific to each track. AlbumGain is specific to a group of files you scanned as an album. I've not used metaflac but from what I can tell --add-replay-gain can be used to scan a group of files as an album so I assume you scanned them that way?

If the AlbumGain info saved to tags is -7.73dB and AlbumGain is enabled and the "With RG Info" slider is on 0dB, the volume of each track in the album will be reduced by 7.73dB so the album is at the ReplayGain target volume. If the "With RG Info" slider is set to +3dB then the album tracks will be adjusted to the ReplayGain target volume plus 3dB. If the "With RG Info" slider is -5dB they'll be adjusted to 5dB lower than the ReplayGain target volume. Mostly, you'd leave the slider on 0dB.

In preferences, for the ReplayGain settings, the Source Mode needs to be set to Track or Album gain as you prefer and the Processing option needs to be set to "apply gain" or "apply gain and prevent clipping according to the peak". The latter will automatically adjust to the target volume, or a volume lower than the target volume as required if there's peaks that will be clipped at the target volume, and of course the appropriate track or album gain data must be saved to tags for the volume to be adjusted.

The player's output volume is an overall volume and has nothing to do with the ReplyGain volume adjustment.

Re: ReplayGain Newbie

Reply #9
Thanks for getting what I mean. But isn't leaving the sound bar at 0db, be at the loudest the "volume" bar can be? So again, I will have to rely on the volume setting of the speakers for it to be playing as it should be (to my ears)?

I only ask because unlike other players, the volume slider/setting indicates -db settings when you lower the sound, which had me wonder, of course it made sense, I'm lowering the volume, decibels are lowering too. Just wanted to be sure how I should set the volume/gain bar, they don't seem to be both at the same time with other players. Thanks!

Re: ReplayGain Newbie

Reply #10
Adjusting the volume of the player's over-all output with the volume slider doesn't effect the ReplayGain adjustment. If ReplayGain is enabled in preferences the tracks or albums are adjusted to the same volume. The player's volume control adjusts the over-all output volume so it's much like turning the volume up or down on your speakers. You can use it to adjust the volume for your preferred listening level but it doesn't effect the ReplayGain volume adjustment for making all tracks/albums the same volume.

Re: ReplayGain Newbie

Reply #11
My question about ReplayGain is this, if I use the ReplayGain when working with my music at home, will the ReplayGain set in Foobar work with a different player on my laptop later?

Re: ReplayGain Newbie

Reply #12
yes, doesn't matter how added, RG tags will work with any RG-aware server/player.

Re: ReplayGain Newbie

Reply #13
Thank you so very much for the response!

Rawill :)

 

Re: ReplayGain Newbie

Reply #14
My question about ReplayGain is this, if I use the ReplayGain when working with my music at home, will the ReplayGain set in Foobar work with a different player on my laptop later?

As long as the player understands the ReplayGain tags and it's configured to adjust the volume. If it does and it is, it's doing what foobar2000 would do. It'd be using the info in the tags to adjust the volume on playback. If you're using foobar2000 on the laptop then obviously it can adjust the volume on playback as it does on your PC. The ReplayGain info in tags is just information. It doesn't physically change the volume of the files themselves.

If the laptop player doesn't support using the ReplayGain info to adjust the volume, the alternative is to convert the files with foobar2000 while applying the ReplayGain adjustment so they're physically converted to the ReplayGain volume and therefore don't need ReplayGain tags or further adjustment.

There's a ReplayGain section under Processing in the converter configuration. It works just like the ReplayGain configuration in preferences for adjusting the volume on playback, except it applies the volume adjustment while converting. To use it the files being converted must be previously scanned and the ReplayGain info saved. I do it that way when converting tracks to MP3 for my portable player as it doesn't support ReplayGain, so I adjust the volume using the ReplayGain configuration when converting to MP3. That way, the MP3s are already at the ReplayGain target volume so it doesn't matter that the portable player doesn't support adjusting the volume using ReplayGain tags.

If your source files are lossless you can convert them to flac while applying the volume adjustment. Even though flac is a lossless format, the conversion wouldn't be technically lossless because there's no way to convert the new flac files back to the original volume again, but you can always keep the originals too if that bothers you.

For MP3 and AAC foobar2000 can scan the files, save the tags, then use the info to physically adjust the track volume without converting them again. That's because MP3 and AAC contain info about the decoding volume in the audio stream, and foobar2000 can adjust it, changing the MP3 and AAC playback volume. It's lossless in that there's no re-encoding so the audio isn't changed. It's not lossless in respect to being able to change the files back to their original volume though, because there's no way to know what it was. The option for "losslessly" adjusting MP3 and AAC audio is from the right click menu, "Replay Gain/Apply Track gain to file content" (there's an option for Album gain too). It only works for MP3 and AAC.