Author Topic: Alternative technical track details info for the Track Details Panel  (Read 7488 times)

hiccup

  • Sr. Member
  • ****
  • Posts: 7791
I noticed that diego had found a nice 'wave' icon somewhere hidden in the MDL2 assets font, and that motivated me to finally update my 'track details' code a little bit.
It aims to display only the most relevant technical information about a track.

- The sample rate is only displayed when it is not the usual 16 bit, but e.g. 24 bit.
- The sample rate is not displayed for lossy and dsd files. (because it doesn't make much sense for those)

- The amount of audio channels is not displayed for two-channel audio, only for multi-channel. (and mono, if that information is available from the metadata)

- DSD files have the DSD version displayed, not their bitrates.
   E.g. instead of something like "DSF 88.2 kHz, 5645k" , it will just display "DSD64" for the standard version.
   Or DSD128 and DSD256 for double- and quadruple- data rate versions.

- There is an icon that represents if a file has Track Gain. (or not)

This is how it would display in the Track Details panel:



These are a few examples of what it shows for different sorts of files:



This is the code. Just copy it into a field in: Track Details > Customize Panel:

Code
{font: Segoe MDL2 Assets;Regular;10}{contrast: 85}"  "{font: Segoe UI;Regular;8}$If($IsMatch(<.Ext>,"APE|ALAC|FLAC|TAK|WAV|AIFF")="T",$Upper(<.Ext>)" "$If($IsMatch(<.Ext>,"DFF|DSF")="T",,{contrast: 65}$IsNull(<Bit Depth>,,$If(<Bit Depth>=16,," "<Bit Depth>" bit"))),$If($IsMatch(<.Ext>,"DFF|DSF")="T",DSD$Replace($Replace($Replace($Replace($Replace(<Bitrate>,5645k,64),11290k,128),14112k,64),16934k,64),22579k,256),$Upper(<.Ext>)"  "{contrast: 65}$If($Contains(<Bitrate>,VBR)=T,$Replace(<Bitrate>,VBR,"~"),<Bitrate>)))$If($Contains(<Channels>,Stereo)=T,""," "{contrast: 65}$If($IsMatch(<Channels>,5 Channels)="T",5.0,<Channels>)){font: Segoe MDL2 Assets;Regular;9}{contrast: 80}"      "{font: Segoe UI;Regular;8}{contrast: 85}$IsNull(<Track Gain>,"  No RG",){font: Segoe MDL2 Assets;Regular;8}{contrast: 85}"         "{font: Segoe UI;Regular;8}{contrast: 90}<Time>



For those who get a little bit nervous and insecure when they don't see '16 bit', '2-channel', track gain, sample-rates specified for all their tracks, I made a second version which will display like this:




This is the code:

Code
{font: Segoe MDL2 Assets;Regular;10}{contrast: 85}"  "{font: Segoe UI;Regular;8}$If($IsMatch(<.Ext>,"APE|ALAC|FLAC|TAK|WAV|AIFF")="T",$Upper(<.Ext>)"  "{font: Segoe UI;Regular;8}{contrast: 65}<Bit Depth>/$Split($Split(<Sample Rate>," ",1),.,1),$If($IsMatch(<.Ext>,"DFF|DSF")="T",DSD$Replace($Replace($Replace($Replace($Replace(<Bitrate>,5645k,64),11290k,128),14112k,64),16934k,64),22579k,256),$Upper(<.Ext>)"  "{font: Segoe UI;Regular;8}{contrast: 75}<Bitrate>" / "<Sample Rate>)){contrast: 65}$If($Contains(<Channels>,Stereo)=T,"  2.0","  "{contrast: 65}$If($IsMatch(<Channels>,5 Channels)="T",5.0,<Channels>)){font: Segoe MDL2 Assets;Regular;9}{contrast: 80}"         "{font: Segoe UI;Regular;8}{contrast: 85}$IsNull(<Track Gain>,"No RG",<Track Gain>){font: Segoe MDL2 Assets;Regular;8}{contrast: 85}"         "{font: Segoe UI;Regular;8}{contrast: 90}<Time>
Last Edit: November 15, 2020, 04:42:33 PM by hiccup



hiccup

  • Sr. Member
  • ****
  • Posts: 7791
Thanks for the appreciation!

I haven't been able to test it extensively on all sorts of audio files, since I myself am aiming to keep my library restricted to stereo, FLAC, mp3 and APE only.

So feedback from anyone who is using other formats than the above and notices issues, please report...

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
The only thing I can see to tweak would be, in the second example script, providing the sample rate (not bit depth of course) for MP3 files as well.  While mostly those default to 44.1 kHz, I do have a fair amount in my collection at 48 kHz.  This isn't present for OPUS either, but not really needed as those are all 48 kHz by codec definition.

hiccup

  • Sr. Member
  • ****
  • Posts: 7791
The only thing I can see to tweak would be, in the second example script, providing the sample rate (not bit depth of course) for MP3 files as well.  While mostly those default to 44.1 kHz, I do have a fair amount in my collection at 48 kHz.  This isn't present for OPUS either, but not really needed as those are all 48 kHz by codec definition.

Good idea, I hadn't thought of that.

The second script now also shows the sample rate for mp3.
(Also for Opus, it doesn't hurt there either)


The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1269
Looks nice. What size and resolution is your monitor? Your font looks tiny, but it seems you're able to see it clear enough?

I do this to display DSD versions. Tad shorter and a little easier to read.

Code
$RxReplace($RxReplace($RxReplace(<Bitrate>,"(?:5645|14112|16934)k","64"),"11290k","128"),"22579k","256")

hiccup

  • Sr. Member
  • ****
  • Posts: 7791
Looks nice. What size and resolution is your monitor? Your font looks tiny, but it seems you're able to see it clear enough?

I do this to display DSD versions. Tad shorter and a little easier to read.

Code
$RxReplace($RxReplace($RxReplace(<Bitrate>,"(?:5645|14112|16934)k","64"),"11290k","128"),"22579k","256")

I specifically choose a monitor for optimum text reading. It has a dot pitch of 93, witch to my eyes is perfect to read text without using any scaling. (and 32" is nice too ;-)

Do you mean the fonts in the screenshot looks small to you, or does it turn out different and smaller in your setup?

Here is a larger overview of how it looks on my system. (MusicBee's default Segoe UI 9 pt. font is used as general setting)




Feel free to share a customized version here with different font settings. I can add it to the start post if you like?

---

That's a bit nicer code indeed. I never knew about the question mark, is that documented somewhere?

edit,
ah, never mind, you are using RxReplace
Last Edit: November 14, 2020, 11:30:16 AM by hiccup

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1269

I specifically choose a monitor for optimum text reading. It has a dot pitch of 93, witch to my eyes is perfect to read text without using any scaling. (and 32" is nice too ;-)

Do you mean the fonts in the screenshot looks small to you, or does it turn out different and smaller in your setup?

Just wondering. I use a second 20" display exclusively for MusicBee and I wish I could use smaller font sizes like yours and still see the information. Lol


Quote
That's a bit nicer code indeed. I never knew about the question mark, is that documented somewhere?

edit,
ah, never mind, you are using RxReplace


Your comment made me realize a few more characters can be gotten rid of.

Code
$Replace($Replace($RxReplace(<Bitrate>,"(?:5645|14112|16934)k","64"),11290k,128),22579k,256)

hiccup

  • Sr. Member
  • ****
  • Posts: 7791
Just wondering. I use a second 20" display exclusively for MusicBee and I wish I could use smaller font sizes like yours and still see the information. Lol

That will depend on it's native resolution.

If it is 1400x1050 you should have a larger font than me, a higher resolution will result in smaller fonts:

https://en.wikipedia.org/wiki/Dot_pitch[/quote]

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1269

That will depend on it's native resolution.

If it is 1400x1050 you should have a larger font than me, a higher resolution will result in smaller fonts:

https://en.wikipedia.org/wiki/Dot_pitch


My eyes also are pretty bad, so that doesn't help. Lol

Here's my Track Information contribution in the form of the Now Playing Bar. I used to use the Track Information panel on all my layouts, but it was more difficult to fit all the information due to my poor eyesight. Haha







Here's the code I use for file details, with some Virtual Tags stuff removed. I don't use DFF files, so it'll only check for DSF extensions, but it's an easy change if anyone wants to use and modify it. I may add icons like @hiccup's at some later point.

Code
$If(<Kind>="DSF audio file",DSD$Replace($Replace($RxReplace(<Bitrate>,"(?:5645|14112|16934)k","64"),11290k,128),22579k,256),$IsNull(<FileCueSheet>,$Replace($Split(<Kind>," ",1),MPEG,MP3),<Kind>" (cue)")$If(<Bitrate>="Unknown Bitrate",," "<Bitrate>)" "$IsNull(<Bit Depth>,,<Bit Depth>"bit ")<Sample Rate>)", "<Channels>" [TR: "$IsNull(<Track Gain>,ERROR,<Track Gain>)", A: "$IsNull(<Album Gain>,$IsNull(<FileCueSheet>,ERROR,<Track Gain>),<Album Gain>)"] "<Size>

hiccup

  • Sr. Member
  • ****
  • Posts: 7791


I got curious about that release, found it, and I think it may become a guilty pleasure...
(there's some Pizzicato Five and Akiko Yano in there that I like)

Thanks for that ;-)

(Echoes of an Era is great too. I bought that on vinyl a long time ago)
Last Edit: November 18, 2020, 09:36:03 PM by hiccup

Xenasys

  • Newbie
  • *
  • Posts: 11
Hi Guys great stuff is it possible to add the code to the Compact Player View?

hiccup

  • Sr. Member
  • ****
  • Posts: 7791
Hi Guys great stuff is it possible to add the code to the Compact Player View?

Sure. You can use the code in a virtual tag.
Depending on how you configure your Compact player it could show like this: