Author Topic: working of functions $Sum $Min $Max $Count ?  (Read 1752 times)

hiccup

  • Hero Member
  • *****
  • Posts: 5874
I noticed these functions are now available for virtual tags:

$Sum(<field>,<grouping-field>)
$Min(<field>,<grouping-field>)
$Max(<field>,<grouping-field>)
$Count(<grouping-field>)

I think they were implemented to be used together with Additional Tagging and Reporting plugin.

But I am wondering if they also could serve a purpose by themselves without using the plugin.
Could somebody explain in plain English what they do, and perhaps give an example how 'field' and 'grouping-field' would be used?

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32748
I think they were implemented to be used together with Additional Tagging and Reporting plugin.
The ones in the virtual tag editor are native to musicbee and dont require any plugin - they were originally added because the ones in the tag tools plugin werent working but i think boroda has since fixed his ones.
For the native functions see:
https://getmusicbee.com/forum/index.php?topic=35587.msg194606#msg194606

hiccup

  • Hero Member
  • *****
  • Posts: 5874
Thanks, I now see that I had seen that.
But it seems it didn't stick in my brain.

I'll repeat what it says there, so it may be easier to find for others too:

$Count(<album>)                                     counts the number of files in the same album
$Count(<album>, <album artist>)          counts the number of albums for an album artist
$Sum(<play count>, <album>)               sums the total play count for all tracks in an album
$Sum(<play count>, <album artist>)     sums the total play count for all tracks by an album artist


edit:
And what about $Min and $Max?

hiccup

  • Hero Member
  • *****
  • Posts: 5874

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32748
i am sure there are better examples but
$Min(<play count>, <album>)
would get the minimum play count from all files in an album