Hi all,
It seems to be a common complaint of playing a large media library on shuffle, that by the nature of statistics, you are likely hear some tracks repeated often while never hearing other tracks at all. To resolve this, I decided to make a Smart View in Winamp to filter out recently played tracks, but weight it by rating such that higher rated tracks will be played more often than lower weighted tracks. As I struggled a bit to get this working correctly and couldn't find it posted already, I thought I'd post my solution here for the benefit of others.
First off, I wasted a lot of time with the default Smart View editor which results in arguments in square brackets when you switch to Advanced Mode. I'm not sure if there is a bug with this syntax or what but I couldn't get a complex set of nested conditions to work in this mode at all. It seemed to only apply a certain subset of them. In any case, the trick was to switch to "Query Builder" (Edit View -> Advanced Mode -> Query Builder). This gives you a different interface which results in a different round-bracket based syntax. Using this syntax I could achieve what I wanted.
The query for my "Not played recently, rating weighted" Smart View is currently as follows:
As you can probably work out, this gives the following:
5* rated tracks will be included only if they have not been played in the past month.
4* rated tracks will be included only if they have not been played in the past 3 months.
3* rated or unrated tracks will be included only if they have not been played in the past 6 months.
2* rated tracks will be included only if they have not been played in the past 12 months.
1* rated tracks will be included only if they have not been played in the past 24 months.
Note from the first argument that tracks which have never been played will be included regardless of their rating.
So effectively higher rated tracks are allowed to repeat more often than lower rated tracks. As most of my music had no rating to begin with, I set unrated to be treated the same as 3*. I can then adapt my library over time by up voting or down voting tracks to have them repeat more or less frequently respectively.
I'm pretty sure replacing the ">=" with simply "=" in the rating arguments here should make no difference to the results but haven't tested it. The logic may appear to be the wrong way around on the last played "<" x months ago, but this is the way it works in practice.
If you are making with your own adjustments, I found a good way to test it was to take an example album or artist and add some different ratings to the tracks. Add an extra condition to your query to restrict it to just this album/artist and change the times involved from months to minutes or seconds (e.g. 1 – 5 minutes). Then you can quickly discern how your query is working by playing the tracks over the time intervals involved and seeing how they appear or disappear from your Smart View.
Note that for this to work you will need to "Enable 'Recently Played' in the Library" in the Winamp preferences under Media Library -> Local Library. Also note the Info box for the two "Wait..." options here. They are "OR" rather than "AND"! You might want to reduce the first one to just a few seconds, particularly if testing your query as discussed in the previous paragraph.
You will likely wish to adjust the timings in the example query above to your own preferences and size of your media library. For example, I have been running this Smart View and rating a lot of my music over the past month or two, and currently the Smart View includes ~ 64% of my total library. I will see how it goes over the next few months and might consider increasing the delay times to make the filter more drastic.
This approach can also be considered somewhat of a work-around or solution for those who simply want higher rated tracks to play more often, as requested e.g.:
Note however that Smart View is simply a passive filter and so loading it only gives you a playlist based on how the conditions were met at that moment in time. It will not actively update the playlist of its own accord. Therefore you will need to occasionally reload the Smart View to update the playlist. However, assuming your time intervals are long enough, then I think this should be a non-issue for most people. It is only a problem if you wish to leave Winamp playing 24/7 for weeks or more at a time without any user input.
Hopefully this is useful to somebody. Let me know if anything isn't clear or you would like to suggest any additions or improvements.
P.S. Additional note for those like me who are new to using ratings in Winamp. By default Winamp does not save the ratings to file. Therefore they will be lost if you move the files to a different computer / install. To fix this, go to Winamp preferences->Media Library, on the first "Options" tab find "Advanced Library Preferences" and tick the option which says "Save ratings to file for compatible formats (default: off)" and re-apply any ratings you had selected before making this change. I can't find clarification anywhere of what formats are considered compatible here. By inspection of the files it appears to me that mp3, wma and ogg all work OK (Windows doesn't show the ogg rating but by opening the file in a text editor I can see that there is a rating being correctly applied as a percentage, i.e. 5*=100, 4*=80 etc.)
It seems to be a common complaint of playing a large media library on shuffle, that by the nature of statistics, you are likely hear some tracks repeated often while never hearing other tracks at all. To resolve this, I decided to make a Smart View in Winamp to filter out recently played tracks, but weight it by rating such that higher rated tracks will be played more often than lower weighted tracks. As I struggled a bit to get this working correctly and couldn't find it posted already, I thought I'd post my solution here for the benefit of others.
First off, I wasted a lot of time with the default Smart View editor which results in arguments in square brackets when you switch to Advanced Mode. I'm not sure if there is a bug with this syntax or what but I couldn't get a complex set of nested conditions to work in this mode at all. It seemed to only apply a certain subset of them. In any case, the trick was to switch to "Query Builder" (Edit View -> Advanced Mode -> Query Builder). This gives you a different interface which results in a different round-bracket based syntax. Using this syntax I could achieve what I wanted.
The query for my "Not played recently, rating weighted" Smart View is currently as follows:
(lastplay isempty) OR (lastplay < [24 months ago]) OR ((lastplay < [12 months ago]) AND (rating >= 2)) OR ((lastplay < [6 months ago]) AND ((rating >= 3) OR (rating isempty))) OR ((lastplay < [3 months ago]) AND (rating >= 4)) OR ((lastplay < [1 month ago]) AND (rating >= 5))
5* rated tracks will be included only if they have not been played in the past month.
4* rated tracks will be included only if they have not been played in the past 3 months.
3* rated or unrated tracks will be included only if they have not been played in the past 6 months.
2* rated tracks will be included only if they have not been played in the past 12 months.
1* rated tracks will be included only if they have not been played in the past 24 months.
Note from the first argument that tracks which have never been played will be included regardless of their rating.
So effectively higher rated tracks are allowed to repeat more often than lower rated tracks. As most of my music had no rating to begin with, I set unrated to be treated the same as 3*. I can then adapt my library over time by up voting or down voting tracks to have them repeat more or less frequently respectively.
I'm pretty sure replacing the ">=" with simply "=" in the rating arguments here should make no difference to the results but haven't tested it. The logic may appear to be the wrong way around on the last played "<" x months ago, but this is the way it works in practice.
If you are making with your own adjustments, I found a good way to test it was to take an example album or artist and add some different ratings to the tracks. Add an extra condition to your query to restrict it to just this album/artist and change the times involved from months to minutes or seconds (e.g. 1 – 5 minutes). Then you can quickly discern how your query is working by playing the tracks over the time intervals involved and seeing how they appear or disappear from your Smart View.
Note that for this to work you will need to "Enable 'Recently Played' in the Library" in the Winamp preferences under Media Library -> Local Library. Also note the Info box for the two "Wait..." options here. They are "OR" rather than "AND"! You might want to reduce the first one to just a few seconds, particularly if testing your query as discussed in the previous paragraph.
You will likely wish to adjust the timings in the example query above to your own preferences and size of your media library. For example, I have been running this Smart View and rating a lot of my music over the past month or two, and currently the Smart View includes ~ 64% of my total library. I will see how it goes over the next few months and might consider increasing the delay times to make the filter more drastic.
This approach can also be considered somewhat of a work-around or solution for those who simply want higher rated tracks to play more often, as requested e.g.:
Note however that Smart View is simply a passive filter and so loading it only gives you a playlist based on how the conditions were met at that moment in time. It will not actively update the playlist of its own accord. Therefore you will need to occasionally reload the Smart View to update the playlist. However, assuming your time intervals are long enough, then I think this should be a non-issue for most people. It is only a problem if you wish to leave Winamp playing 24/7 for weeks or more at a time without any user input.
Hopefully this is useful to somebody. Let me know if anything isn't clear or you would like to suggest any additions or improvements.
P.S. Additional note for those like me who are new to using ratings in Winamp. By default Winamp does not save the ratings to file. Therefore they will be lost if you move the files to a different computer / install. To fix this, go to Winamp preferences->Media Library, on the first "Options" tab find "Advanced Library Preferences" and tick the option which says "Save ratings to file for compatible formats (default: off)" and re-apply any ratings you had selected before making this change. I can't find clarification anywhere of what formats are considered compatible here. By inspection of the files it appears to me that mp3, wma and ogg all work OK (Windows doesn't show the ogg rating but by opening the file in a text editor I can see that there is a rating being correctly applied as a percentage, i.e. 5*=100, 4*=80 etc.)
Comment