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 (Read 1671 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Replaygain

Hi guys,

I recently bought a DAP that I really love, I reviewed it for Headfi and ABI, feel free to read it here;

http://www.head-fi.org/products/shozy-alie...p/reviews/12415

or here;

http://anythingbutipod.com/forum/showthrea...1447#post651447

Anyway, if you took the time to read the review it's a player that plays only FLAC and WAC. I have converted my main Mp3 library to FLAC no problems but I'm a little lost on what replaygain settings to use. You see (again if u read the review this helps) I will be mostly shuffling individual tracks on this player, therefore im looking for a similar volume from one song to the next (and that song maybe a new modern release and the next something from the 80's etc).

Furthermore, as I collect new music I want to convert and add that to the collection too, also keeping the volume in line with what was previously converted/replaygained.

I'm just not sure which settings are best for this task...

Previously before (when I used Mp3's on other mp3 players) MP3Gain was used and set the db value of 89 db, and any new album I came across sent it to MP3Gain thus everything was being processed to same level.

This is purely for portable audio on my DAP (that doesn't have replaygain feature).

Have i made myself clear?

Can anyone advise?

Cheers,

Bruce

Replaygain

Reply #1
To take advantage of ReplayGain for your converted FLACs you will need to alter the level during conversion. The converter in foobar2000 can do that but it requires your source files to be ReplayGain scanned. If you forget to scan the source files you will not see a warning or error. The new FLACs will simply not have the desired loudness.

The ReplayGain standard default loudness level of 89 dB is probably approriate for you unless you have classical music in your collection. That is one genre that may require the target loudness level to be dropped to prevent clipping. If your goal is maximum loudness out of the device, as quick look at your review suggests, you might want to increase the target level. I'd recommend against that as you increase risk of clipping or alternatively increase risk of running into volume differences introduced by clipping prevention solutions. Advanced Limiter DSP helps protect against clipping but it can't do miracles. If the level is pushed too high the clipped tracks will become noticeably quieter with it.

Here's a screenshot of the converter's processing options showing the settings that will achieve your target.


Save the converter settings as a preset and you can convert any future track for the portable use easily. Just ReplayGain scan your source tracks and run them through the preset with a couple of clicks and the files are ready.

Replaygain

Reply #2
To take advantage of ReplayGain for your converted FLACs you will need to alter the level during conversion. The converter in foobar2000 can do that but it requires your source files to be ReplayGain scanned. If you forget to scan the source files you will not see a warning or error. The new FLACs will simply not have the desired loudness.

The ReplayGain standard default loudness level of 89 dB is probably approriate for you unless you have classical music in your collection. That is one genre that may require the target loudness level to be dropped to prevent clipping. If your goal is maximum loudness out of the device, as quick look at your review suggests, you might want to increase the target level. I'd recommend against that as you increase risk of clipping or alternatively increase risk of running into volume differences introduced by clipping prevention solutions. Advanced Limiter DSP helps protect against clipping but it can't do miracles. If the level is pushed too high the clipped tracks will become noticeably quieter with it.

Here's a screenshot of the converter's processing options showing the settings that will achieve your target.

Replaygain

Reply #3
I recommend using the "Scan selection as albums (by tags)" option so you also have album based ReplayGain values for possible future use. It shouldn't be slower to scan than just plain track gain.

When you get new albums you select only those and run the ReplayGain scanner on them.

You can search all your files without replaygain info by opening Library -> Search and typing this search query: %replaygain_track_peak% MISSING
I use a column in my user interface telling about tagging errors in my files. If you did something similar you could add a string like "$if(%replaygain_track_peak%,,RG missing)" to immediately notify you of tracks that don't have ReplayGain info. Makes it easy to notice which tracks are safe to convert.

Replaygain

Reply #4
I found Axon's peak to dB conversion function and modified it a bit to show new peak value after applying track based ReplayGain. You could add a column with this code in your UI to see how much headroom (if any) you have before things start to clip after processing.

Code: [Select]
$if($and(%replaygain_track_peak%,%replaygain_track_gain%),
$puts(rgain,%replaygain_track_gain%)
$puts(valInt,$replace(%replaygain_track_peak%,.,))
$puts(numericVal,$add($get(valInt),0))
$puts(numOfZeroes,$sub($len($get(valInt)),$len($get(numericVal))))
$puts(isGe5,$ifgreater($substr($get(numericVal),0,1),4,-1,))
$puts(normVal,$cut($pad($ifequal($get(isGe5),-1,0,)$get(numericVal),5,0),5))
$puts(vMinus1,$sub($get(normVal),10000))
$puts(vPlus1,$add($get(normVal),10000))
$puts(frac,$div($get(vMinus1)0000,$get(vPlus1)))
$puts(frac3,$div($mul($get(frac),$get(vMinus1),$get(vMinus1)),$mul($get(vPlus1),$get(vPlus1),3)))
$puts(frac5,$div($mul($get(frac3),$get(vMinus1),$get(vMinus1),3),$mul($get(vPlus1),$get(vPlus1),5)))
$puts(frac7,$div($mul($get(frac5),$get(vMinus1),$get(vMinus1),5),$mul($get(vPlus1),$get(vPlus1),7)))
$puts(logSum,$add($get(frac),$get(frac3),$get(frac5),$get(frac7)))
$puts(logApprox,$muldiv($get(logSum),1737,100))
$puts(resultInt,$div($sub($get(logApprox),$mul($add($get(numOfZeroes),$get(isGe5)),200000)),10))
$puts(isNegative,$strchr($get(resultInt),-))
$puts(resultInt,$pad_right($replace($get(resultInt),-,),3,0))
$puts(resultInt,$add($left($get(resultInt),$sub($len($get(resultInt)),1)),$ifgreater($right($get(resultInt),1),4,1,0)))
$puts(resultInt,$pad_right($get(resultInt),3,0))
$puts(rhs,$right($get(resultInt),2))
$puts(difflen,$sub($len($get(resultInt)),$len($get(rhs))))
$puts(pint,$ifequal($get(isNegative),1,-,)$ifequal($get(difflen),0,0,$substr($get(resultInt),0,$get(difflen))))
$puts(pfrac,$get(rhs))
$puts(pfp,$get(pint)$num($get(pfrac),2))
$puts(gint,$num($get(rgain),0))
$puts(gfrac,$substr($get(rgain),$add($strchr($get(rgain),.),1),$add($strchr($get(rgain),.),3)))
$puts(gfp,$get(gint)$num($get(gfrac),2))
$puts(tmp,$add($get(pfp),$get(gfp)))
$puts(oint,$div($get(tmp),100))
$ifgreater($get(tmp),0,,$puts(tmp,$sub(0,$get(tmp))))
$puts(ofrac,$num($mod($get(tmp),100),2))
$get(oint).$get(ofrac) dB
,)

If you want to utilize this information use the preamp slider in the ReplayGain config appropriately. Note that even if you have headroom now, you may need it for future tracks.

Ps. The code gives only approximate value. I noticed almost 0.1 dB error when track peak was just a bit under 0.5. I don't think I have skills to fix that.