Author Topic: Most played songs in the year  (Read 870 times)

Vico

  • Newbie
  • *
  • Posts: 6
I wonder if is possible within musicbee to display the most played songs in the year (or any time interval), similar to Spotify Wrapped or Last.FM's Top Tracks.

Pickles7853

  • Full Member
  • ***
  • Posts: 153
I am not familiar with Spotify Wrapped or Last.FM's Top Tracks.  But I think I can get the general idea from your brief description.
Left click the hourglass (search icon) in the search bar and choose Custom Search (or hit ctrl-f)
You want to match [play count] [has a value]
With the search results edit the displayed fields and add in [play count]
Now sort this field to show highest results at the top

You can more fields onto the first so it only applies within certain date ranges etc.
This would be the last played field.

Pickles7853

  • Full Member
  • ***
  • Posts: 153
I just had a thought.  What I outlined above is for a total play count.
As such sorting by date doesn't mean much.
In order for MusicBee to know how many times a song was played within a date range it would need to store that information somewhere.  Like <album> <track> <date/time> for every song played.  And I do not think MB does that right now.  Could be wrong on this.
So the above amounts to "highest played track of all time type of thing"...

tjinc

  • Sr. Member
  • ****
  • Posts: 833
What Pickles7853 has said is essentially correct - MusicBee only stores total play count and last played date. Therefore you cannot create a 'most played songs of the year' playlist directly.

However, as with a lot of things in MusicBee there are ways with a small amount of effort. Here is one way:

  1. If you do not have it already, install the AT&RT plugin. (We are going to use the Copy Tag function provided by this.)

  2. Create a custom tag (named "PlayCt Snapshot") - you can leave it as 'Save To MusicBee database only'.

  3. Create a virtual tag (named "PlayCt Year") as follows:
Code
$If(<PlayCt Snapshot>="",<Play Count>,$Sub(<Play Count>,<PlayCt Snapshot>))
 4. You will need to configure both of these new fields as type 'Number'.

That's it for the configuration.


So now all you have to do is, on the stroke of midnight each New Year's Eve, put down that beer/wine/champagne/your choice and leave that girl/boy/your choice, and head back to MusicBee :
  • Select all files: Tools > Additional Tagging & Reporting Tools > Copy Tag...
  • Configure for: Copy Tag  <Play Count> to tag <PlayCt Snapshot>
  • Preview (so you can see what is going to be changed) and then Proceed.
This sets the value of your custom tag <PlayCt Snapshot> to be the same as the current <Play Count>.
Your new virtual tag <PlayCt Year> will now contain the number of plays since you last did this reset.

Obviously I have no idea how well you know MusicBee. I have not gone into explicit details here so if you are not sure about any of these steps please feel free to ask.
Last Edit: May 25, 2025, 05:13:41 AM by tjinc

Vico

  • Newbie
  • *
  • Posts: 6
What Pickles7853 has said is essentially correct - MusicBee only stores total play count and last played date. Therefore you cannot create a 'most played songs of the year' playlist directly.

However, as with a lot of things in MusicBee there are ways with a small amount of effort. Here is one way:

  1. If you do not have it already, install the AT&RT plugin. (We are going to use the Copy Tag function provided by this.)

  2. Create a custom tag (named "PlayCt Snapshot") - you can leave it as 'Save To MusicBee database only'.

  3. Create a virtual tag (named "PlayCt Year") as follows:
Code
$If(<PlayCt Snapshot>="",<Play Count>,$Sub(<Play Count>,<PlayCt Snapshot>))
 4. You will need to configure both of these new fields as type 'Number'.

That's it for the configuration.


So now all you have to do is, on the stroke of midnight each New Year's Eve, put down that beer/wine/champagne/your choice and leave that girl/boy/your choice, and head back to MusicBee :
  • Select all files: Tools > Additional Tagging & Reporting Tools > Copy Tag...
  • Configure for: Copy Tag  <Play Count> to tag <PlayCt Snapshot>
  • Preview (so you can see what is going to be changed) and then Proceed.
This sets the value of your custom tag <PlayCt Snapshot> to be the same as the current <Play Count>.
Your new virtual tag <PlayCt Year> will now contain the number of plays since you last did this reset.

Obviously I have no idea how well you know MusicBee. I have not gone into explicit details here so if you are not sure about any of these steps please feel free to ask.

Thanks mate! Will do your suggestion, specially since i already have AT&RT installed here. The only annoying thing i noticed is that i need to adapt the virtual tag code to replace "Play Count" tag by its Portuguese translation since i use MusicBee in this language.

boroda

  • Hero Member
  • *****
  • Posts: 5244
offtopic: may it be widely useful to have the ability to auto-run some ASR presets at given days or dates (discarding year part)?

tjinc

  • Sr. Member
  • ****
  • Posts: 833
offtopic: may it be widely useful to have the ability to auto-run some ASR presets at given days or dates (discarding year part)?

That's an interesting idea Boroda, I had not considered that.
Whether there would be enough usage of this to make the work worthwhile, I'm not currently sure. Others may have ideas on how it might be used and I will keep it in mind - if I see anything else that might use this I'll let you know or send them your way.

Good to see you back by the way - it looks like you are making up for your absence by having one massive posting session today!  :D