|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | |
Member
Join Date: Jul 2008
Posts: 61
|
Smart View to apply a rating weighted, not played recently filter
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: Quote:
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.: http://forums.winamp.com/showthread.php?t=238524 http://forums.winamp.com/showthread.php?t=273021 http://forums.winamp.com/showthread.php?t=179512 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.) Last edited by TimbreWolf; 11th April 2015 at 14:25. |
|
![]() |
![]() |
![]() |
#2 |
Forum King
|
cool stuff.
check out this thread: http://forums.winamp.com/showthread.php?t=351953 btw, afaik, winamp will write ratings to tags (if enabled in prefs) for mp3, wma, m4a, FLAC, and probably some others. (ALAC in a m4a, etc) PENN STATE Radio or http://www.LION-Radio.org/ -- BUG #1 = Winamp skips short tracks Wish #1 = Multiple Column Sorting Wish #2 = Add TCMP/Compilation editing |
![]() |
![]() |
![]() |
#3 |
Forum King
Join Date: Aug 2011
Location: Phoenix, AZ
Posts: 4,890
|
Hi TimbreWolf,
Thank you for your contribution. It belongs in the "Tech Support Greatest Hits" archive, imo. I especially appreciate the tip about using Query Builder when Advanced Mode alone is not enough. Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system |
![]() |
![]() |
![]() |
#4 | |||
Member
Join Date: Jul 2008
Posts: 61
|
Quote:
It appears that Crashguard303 and pasemes both managed to achieve something very similar to the above using the standard Smart View editor. Looking at this again, I think the problem that I had was that I was probably trying to use all square brackets with this syntax (as is suggested by the "Query Language Documentation" section in Advanced Mode), whereas from their posts it seems clear that you actually need to use a mixture of square and round brackets... (Or maybe it is actually the same syntax in both. Can't remember what I tried exactly and very tired now). Something people less familiar with Winamp might get confused by when reading that thread is the statement about the Smart View updating when you re-open Winamp. This is true, but you have to bear in mind that updating the Smart View does now change the current playlist. So if you leave your Smart View playing, close and re-open Winamp the next day, you will still have the playlist as it was when you first started playing the Smart View. i.e. you will still need to e.g. double-click on it again sometime to update your playlist with the latest info. There's a couple of good ideas there from Crashguard303 on properly applying rating weightings to the probability of a track being played. One very simple, and one more sophisticated. I hope these sorts of ideas are kept track of and properly considered in the new development drive. Quote:
![]() Quote:
![]() |
|||
![]() |
![]() |
![]() |
#5 |
Member
Join Date: Jul 2008
Posts: 61
|
P.S. Bah, no edit button in this forum. Hopefully people have the sense to read down a bit before making too many conclusions based on the possible inaccuracy regarding the necessity for Query Builder in my first post.
![]() |
![]() |
![]() |
![]() |
#6 |
Join Date: Sep 2003
Posts: 27,873
|
post the edits you need made (or just a complete new version) and a moderator will be able to do it for you (and there is an edit action, but it's time limited).
|
![]() |
![]() |
![]() |
#7 | ||
Member
Join Date: Jul 2008
Posts: 61
|
Quote:
Quote:
![]() |
||
![]() |
![]() |
![]() |
|
Tags |
not recently played, rating weighted, shuffle, smart view |
Thread Tools | Search this Thread |
Display Modes | |
|
|