These display -1800 when track/album grain is zero.
$sub(-1800,$replace(%replaygain_track_gain%,.,))
$sub(-1800,$replace(%replaygain_album_gain%,.,))
So are you wanting to have a track/album gain of zero when the real volume of the file is -23 dB and the track/album gain info in the tags says +5 dB?
I posted the wrong number as the starting point. Another attempt to edit. Hopefully it's just a matter of subtracting the track/album gain from 5. Or is it the other way around...
$sub(500,$replace(%replaygain_track_gain%,.,))
$sub(500,$replace(%replaygain_album_gain%,.,))
This is the formatting I use (almost). Change -1800 to 500, %replaygain_track_gain% to %replaygain_album_gain%, and LUFS to dB is it floats your boat.
$if(%replaygain_track_gain%,$puts(X,$sub(-1800,$replace(%replaygain_track_gain%,.,)))$ifequal($get(X),0,0,$ifgreater($get(X),0,$replace(+$substr($num($get(X),4),1,2),+0,+),$replace($substr($num($get(X),5),1,3),-0,-))).$substr($num($get(X),5),4,5) LUFS))
Same again, but the playing track is highlighted to match the rest of my playlist columns (I have highlighting is enabled in the default GUI).
$if(%replaygain_track_gain%,$puts(X,$sub(-1800,$replace(%replaygain_track_gain%,.,)))$puts(VOLUME,$ifequal($get(X),0,0,$ifgreater($get(X),0,$replace(+$substr($num($get(X),4),1,2),+0,+),$replace($substr($num($get(X),5),1,3),-0,-))).$substr($num($get(X),5),4,5) LUFS)$if(%isplaying%,>>>$get(VOLUME)<<<,$get(VOLUME)))