Here are a few things I've coded for Foobar2000's formatting for various things.
The Tech Specs column just displays some basic information; codec, rate/bitdepth, bitrate, and possibly HDCD info. This converts sample rates in to kHz/MHz despite foobar2000 syntax not supporting decimal.
$if($stricmp($right(%filename_ext%,3),iso),%codec%/SACD,%codec%) | $ifgreater(%samplerate%,1000000,$insert($div(%samplerate%,100000),'.',$sub($len($div(%samplerate%,100000)),1)) MHz,$ifgreater($mod(%samplerate%,1000),0,$insert($div(%samplerate%,100),'.',$sub($len($div(%samplerate%,100)),1)) kHz,$div(%samplerate%,1000) kHz))$if($info(bitspersample),/$info(bitspersample)-$ifgreater($info(bitspersample),1,bits,bit)) | %bitrate% kbps) | $if($info(hdcd),'(HDCD:',) $if(%__hdcd%,PE: %__hdcd_peak_extend% LLE: %__hdcd_gain% TF: %__hdcd_transient_filter%')')