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

hiccup

  • Sr. Member
  • ****
  • Posts: 7871
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
  • Sr. Member
  • *****
  • Posts: 34350
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

  • Sr. Member
  • ****
  • Posts: 7871
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

  • Sr. Member
  • ****
  • Posts: 7871

Steven

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