IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Understanding Foobar 2000's Replay Gain
EdPell
post Mar 27 2013, 16:45
Post #1





Group: Members
Posts: 5
Joined: 17-July 10
Member No.: 82331



Using Win XP SP3 and Foobar2000 V1.2.3

I'm compiling a set of bedtime music files (FLAC) for my great-niece. Because her player does not play MP3s, I plan to burn a couple of standard CDs for her. I certainly don't want her to be suddenly jolted awake at 3am and then hate me for the rest of her life.

So I've been reading about the Replay Gain feature in Foobar2000. What confuses me in the Foobar manual is that it smooths out the audio level "... without physically changing the file itself".

That leads me to believe only certain players can read the replaygain values. If that's the case, then it seems to me the smoothing will be lost when I burn the CDs.

I must be missing or misunderstanding some key information. Can anyone shed some light on this for me?

Thanks
EdP
Go to the top of the page
+Quote Post
Andreasvb
post Mar 27 2013, 16:58
Post #2





Group: Members
Posts: 1343
Joined: 6-March 04
From: Sweden
Member No.: 12509



You can write the data to the files as well.
And when you convert you can choose to apply ReplayGain.

http://eolindel.free.fr/foobar0.9/Replaygain.php [ Foobar2000 Manual - Replaygain ]


--------------------
Windows 8.1u3 Pro x64 Media Center // foobar2000 1.3.6
Go to the top of the page
+Quote Post
db1989
post Mar 27 2013, 17:05
Post #3





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (EdPell @ Mar 27 2013, 15:45) *
What confuses me in the Foobar manual is that it smooths out the audio level "... without physically changing the file itself".
The default method of ReplayGain changes the file in the sense of adding tag fields defining the alterations required to bring the file to a defined average perceived loudness. It doesn’t change the audio.

QUOTE
That leads me to believe only certain players can read the replaygain values.
Correct.

QUOTE
If that's the case, then it seems to me the smoothing will be lost when I burn the CDs.
Only correct if the same method is used, but there are other options possible. Example: as implied by Andreasvb, files can be created in which the volume adjustment is applied into the audio itself. These could then be written to CD. Or, for MP3s, there is MP3gain, which losslessly/reversibly alters the MP3 data in a widely compatible way (albeit only to the nearest 1.5 dB).

For everything else, I can only really recommend searching for information, as there is a lot out there. Hydrogenaudio itself, in addition to many discussions, hosts many original documents for ReplayGain; the official specification is still hosted here and in the past had a subdomain all of its own.

Finally, note that foobar2000 since v1.1.6 estimates average loudness using a different and presumably more accurate algorithm: EBU R128. In terms of applying and using the resulting ‘RG’ data, the processes are the same, but be aware that mechanistic explanations you read in older documents will not be directly equivalent to what foobar2000 does now.
Go to the top of the page
+Quote Post
trout
post Mar 27 2013, 17:51
Post #4





Group: Members
Posts: 425
Joined: 26-March 09
Member No.: 68400



Good info in the previous replies. I hope nobody minds another.

QUOTE (EdPell @ Mar 27 2013, 11:45) *
I'm compiling a set of bedtime music files (FLAC) ...
... I plan to burn a couple of standard CDs ...
... it seems to me the smoothing will be lost when I burn the CDs.

It depends on your process / how you burn the CDs.

If you run a ReplayGain scan of the FLAC files, the gain info will be written as metadata/tags to the file. So, yes, only software/hardware that supports ReplayGain can apply the gain adjustments.

If you use a burning application which supports FLAC importing and ReplayGain processing, such as CDBurnerXP (link), then the FLAC files would be ready to burn as-is.

If you use burning software which does not support FLAC and ReplayGain, and you will be converting to WAV before burning, then you can use the "Processing" section of foobar2000's converter (link) to apply the ReplayGain adjustment during the FLAC to WAV conversion. Of course, you can use any other software to convert as long it supports ReplayGain.

This post has been edited by trout: Mar 27 2013, 17:53
Go to the top of the page
+Quote Post
EdPell
post Mar 29 2013, 16:47
Post #5





Group: Members
Posts: 5
Joined: 17-July 10
Member No.: 82331



Thank you all for responding so quickly and thoroughly.

To test the procedure, I copied a few files to a new folder and followed your suggestions using Foobar to scan and update the replaygain tags (single album)

The only way to write the data to the files in Foobar is to convert them. They're already in FLAC format, but I selected FLAC as the output format anyway.
Because I wanted to keep the same file names, I selected %filename% and sent the output to a different folder.
In the ReplayGain section of the Processing sheet, I selected "apply gain".

I have to assume the RG data is now part of the new file because I don't know if a file's properties sheet (using MP3Tag & Foobar) is showing tags or embedded data.

Comments or suggestions welcomed.

EdP
Go to the top of the page
+Quote Post
db1989
post Mar 29 2013, 16:56
Post #6





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



Two ways to test:
(1) Scan converted files for RG and check whether the computed adjustments written to the tags are consistently 0. (Needless to say, you can delete the tags afterwards.)
(2) Disable ReplayGain and listen for differences in volume between original and converted files.

Edit:
QUOTE (EdPell @ Mar 29 2013, 15:47) *
I have to assume the RG data is now part of the new file because I don't know if a file's properties sheet (using MP3Tag & Foobar) is showing tags or embedded data.
You can’t show embedded data. The only equivalence to “embedded data” is that the volume adjustment is done in the audio itself before it is written to the destination file. It’s not written as tags or anything else. (MP3gain is the exception, but that’s obviously not relevant to FLAC.)

This post has been edited by db1989: Mar 29 2013, 16:57
Go to the top of the page
+Quote Post
EpicForever
post Mar 30 2013, 18:18
Post #7





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Understanding of foobar's ReplayGain... Yes, this is something that I need. After so many years of listening to the music on PC I decided that I should try it. I scanned about 1,5k of my Beatport, Juno and Trackitdown files. After scanning and updating file tags I noticed that volume of track that was recently played has dropped down. So I think that it works, but I noticed strange thing. Where are those tags? I can't see them on any file, even after forced reload of metadata. Other thing is that in Preferences I can set "Show warning when applying RaplayGain to MP3 data". And it is checked. About 1/3 of scanned files were mp3 files. I got no warning...
Summarizing:
1. Where are my RG tags? Why I can't see them?
2. Why I wasn't warned about mp3 files?

EDIT:
And point no. 3:
3. Can I scan file twice - one time for "per-track gain" and second for album gain and save both values? I was thinking about listening to the music in various order modes (random/default) and ReplayGain Override plugin... It looks like it simply needs 2 separate values to work?

This post has been edited by EpicForever: Mar 30 2013, 18:29
Go to the top of the page
+Quote Post
Andreasvb
post Mar 30 2013, 18:23
Post #8





Group: Members
Posts: 1343
Joined: 6-March 04
From: Sweden
Member No.: 12509



1. Check the Properties tab, not Metadata.
2. It only warns you if you apply the RG to the MP3 data, that is. Not the tags, the actual audio data itself.


--------------------
Windows 8.1u3 Pro x64 Media Center // foobar2000 1.3.6
Go to the top of the page
+Quote Post
yanni
post Mar 30 2013, 18:37
Post #9





Group: Members
Posts: 85
Joined: 3-June 06
Member No.: 31415



QUOTE (EpicForever @ Mar 30 2013, 18:18) *
And point no. 3:
3. Can I scan file twice - one time for "per-track gain" and second for album gain and save both values? I was thinking about listening to the music in various order modes (random/default) and ReplayGain Override plugin... It looks like it simply needs 2 separate values to work?

When you scan files as albums, both track and album gain values are calculated and saved, so you don't need to scan twice.
Go to the top of the page
+Quote Post
EpicForever
post Mar 30 2013, 18:43
Post #10





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Thx yanni and Andreasvb smile.gif
Go to the top of the page
+Quote Post
EpicForever
post Mar 30 2013, 20:56
Post #11





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Hmmm... I got one more question. What will foobar do when I set "Source mode" to "album" , "Processing" to "apply gain and prevent clipping", but file will be missing album gain and album peak? Does foobar use "track" values instead or just play files as with "Source mode" set to "none" and thus volume will suddenly change?
Go to the top of the page
+Quote Post
Andreasvb
post Mar 30 2013, 21:06
Post #12





Group: Members
Posts: 1343
Joined: 6-March 04
From: Sweden
Member No.: 12509



It will take Album if it has, else Track.


--------------------
Windows 8.1u3 Pro x64 Media Center // foobar2000 1.3.6
Go to the top of the page
+Quote Post
EpicForever
post Mar 31 2013, 23:36
Post #13





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



I got new question smile.gif
Here it is:
I scanned my whole library. While I was analyzing playlists it turned out, that some tracks from few albums, that were already RG scanned have copies in other directories, with slightly different tags. So I decided that in this case I will rescan them again, with option "scan selection as a single album". That were just copies of the files from albums, with unmodified audio content. But here is some strange thing. After rescan Album Gain values has changed. Only slightly (like +/- 0,24 dB) but they changed. My question is why? Is it possible that there is a bug in foobar's RG engine?

Same thing was noticed when I scanned long flac file, and later .cue file that was referencing to this flac. Album Gain calculated for just .flac file was for example 0,05 dB lower than calculated for .cue file that is referencing to exactly the same .flac. Why? I know that these differences are inaudible, but it still seems strange to me.
Go to the top of the page
+Quote Post
garym
post Mar 31 2013, 23:45
Post #14





Group: Members
Posts: 524
Joined: 16-September 06
From: United States
Member No.: 35261



Album gain is a function of the other tracks, if any, that are RG scanned at the same time as part of the "album".
Go to the top of the page
+Quote Post
Andreasvb
post Apr 1 2013, 00:32
Post #15





Group: Members
Posts: 1343
Joined: 6-March 04
From: Sweden
Member No.: 12509



It did what you asked it to, scan all files as same album.
Either choose all files from the album and choose same option, or select every file and choose scan by tags/folder.

I use either scan per-file or by tags, have hidden the other options.


--------------------
Windows 8.1u3 Pro x64 Media Center // foobar2000 1.3.6
Go to the top of the page
+Quote Post
EpicForever
post Apr 1 2013, 07:28
Post #16





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



I understand that it did what I was asking for, I know that. But I can't understand why album gain is changing when I simply copied tracks from the same album and make them appear in playlist twice? All audio properties remain the same - album peak should be the same, tracks peaks should be the same. I thought that if album peak remains unchanged, then the amount of volume change should be the same. And exaple of .cue file and referenced .flac is even more obvious representation of what I expected - that's just the same audio data - one time continuous, one time chopped into parts. But maximum audio peak should remain the same. But it looks like it wasn't detected as the same... Why?
Go to the top of the page
+Quote Post
tedsmith
post Apr 1 2013, 07:56
Post #17





Group: Members
Posts: 91
Joined: 29-January 13
Member No.: 106279



QUOTE (EpicForever @ Mar 31 2013, 23:28) *
I understand that it did what I was asking for, I know that. But I can't understand why album gain is changing when I simply copied tracks from the same album and make them appear in playlist twice? All audio properties remain the same - album peak should be the same, tracks peaks should be the same. I thought that if album peak remains unchanged, then the amount of volume change should be the same. And exaple of .cue file and referenced .flac is even more obvious representation of what I expected - that's just the same audio data - one time continuous, one time chopped into parts. But maximum audio peak should remain the same. But it looks like it wasn't detected as the same... Why?

I'm just guessing but since replay gain is calculated in blocks, the alignment of the blocks with reordered or duplicated tracks change (i.e. any track that isn't an exact multiple of the block size in length will offset the following tracks, at least that's my speculation and expectation.) This would change the album gain result.
Go to the top of the page
+Quote Post
EdPell
post Apr 1 2013, 14:59
Post #18





Group: Members
Posts: 5
Joined: 17-July 10
Member No.: 82331



>You can’t show embedded data.<

DUH ... that should have been obvious to me.
Thanks for your help.

EdP
Go to the top of the page
+Quote Post
2Bdecided
post Apr 2 2013, 00:31
Post #19


ReplayGain developer


Group: Developer
Posts: 5362
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (EdPell @ Mar 27 2013, 15:45) *
it seems to me the smoothing will be lost when I burn the CDs.
fb2k can burn CDs with the audio CD writer plug-in. It will happily apply ReplayGain to the audio tracks when writing them to CD. You can apply whatever DSP you want too.

Cheers,
David.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st December 2014 - 12:02