Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: [fb2k v2] Random Pools (foo_random_pools) (Read 209074 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[fb2k v2] Random Pools (foo_random_pools)

foo_random_pools is a foobar2000 component for creating random playlist entries selected and grouped by various pool definitions.

Mainly you can define titleformat expressions for selecting random groups like albums including sorting and filtering from the media library or from playlists. If foo_sqlite is installed some pool attributes can also defined with SQL expressions.

Upgrade Note: If you're upgrading from an older version than 2.0.0, it is highly recommended to backup your current configuration before.

Prerequisites:

Download
Version history


foo_random_pools

Reply #1
Thanks for this plugin. I'm finding it really great to use.

Is there any chance of adding, as an option to number of tracks to add, a duration - say 1hr. In this way I could easily configure any number of tracks with a total length of roughly 1 hr. Obviously not exactly the duration but upto.

Thanks.


foo_random_pools

Reply #3
BRILLIANT!

Finally a way to add random albums to a playlist!
<insert signature here>

foo_random_pools

Reply #4
great plugin!
only one requset: option for preventing adding duplicates

foo_random_pools

Reply #5
THis is goddamn great!
If I want to select 7 random albums I use the group query "%album artist%-%album%, and the query works perfectly. But I want to filter it so I don't get 2 albums from the same album artist, how can I do it?

Also would love to limit the query for filesize instead of group/track count.

GJ!

foo_random_pools

Reply #6
Yes, limit the playlist by filesize would be great feature, especially for portable mp3 devices...

foo_random_pools

Reply #7
A limiting by duration or filesize will be probably implemented, but I won't implement any kind of memory for the random pools, which means there will be no chance to prevent duplicates.

foo_random_pools

Reply #8
just noticed this last night and had a chance to try this morning.
very cool and thanks!!!
adding random albums to a playlist has been something I've always wanted to do with foobar.
this plug-in has lots of possibilities.  back to enjoying the randomness...

foo_random_pools

Reply #9
Nice idea. I've tried to make it crash, but I wasn't successful so far.  There are a few things that could be improved (keep in mind that I'm a perfectionist):
Discoverability
  • foo_whatsnew did not pick up the main menu commands after installation, so I suspect you don't enumerate any, when no pool is configured. I suggest to enumerate the "All pools" command always, but make is disabled and greyed, when there are no pools, and to add a "More..." command that opens the preferences page. The menu tree for foo_random_pools would then look like this:
    Code: [Select]
    File
      Random pools
        All pools
        [insert configured pools here]
        ---
        More...
Preferences
  • Link the "Help" button to the installed help file.
  • Use new preferences page API from the 1.0 SDK.
Dialogs
  • Improve dialog layout. For example, add some horizontal space between buttons. I think Microsoft recommends 7 DLUs.
  • End labels for edit controls with a colon.
  • Improve text for "Don't determine distinct group values" check box. See below for my suggestion.
Here's my suggestion how to modify the "Random pool" dialog with an image and source code. The main reason why I reduced the height of the large edit controls is that it was easiest to show what I wanted that way, Resource Hacker isn't the most convenient tool for editing dialogs.

Code: [Select]
103 DIALOG 50, 50, 332, 295
STYLE DS_FIXEDSYS | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Random pool"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "Ms Shell Dlg 2"
{
  CONTROL "", 1018, EDIT, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 51, 11, 274, 12
  CONTROL "Determine probability for picking groups based on group size", 1004, BUTTON, BS_AUTOCHECKBOX | BS_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 76, 253, 14
  CONTROL "", 1019, EDIT, ES_LEFT | ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 51, 28, 274, 45
  CONTROL "", 1003, EDIT, ES_LEFT | ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 51, 93, 274, 45
  CONTROL "", 1020, EDIT, ES_LEFT | ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 51, 143, 274, 45
  CONTROL "", 1021, EDIT, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 108, 205, 32, 12
  CONTROL "", 1000, EDIT, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 108, 222, 32, 12
  CONTROL "", 1041, EDIT, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 108, 239, 32, 12
  CONTROL "OK", 1, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 220, 276, 51, 14
  CONTROL "Cancel", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 277, 276, 50, 14
  CONTROL "Name:", 1014, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 13, 22, 8
  CONTROL "Group:", 1015, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 30, 38, 8
  CONTROL "Filter:", 1016, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 144, 20, 8
  CONTROL "Priority:", 1017, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 207, 38, 8
  CONTROL "Sort order:", 1002, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 95, 38, 8
  CONTROL "Number of groups to add:", 1039, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 224, 93, 8
  CONTROL "0 = don't consider this pool, when adding items from all pools", -1, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 150, 204, 171, 18
  CONTROL "Limit number of tracks to add:", 1040, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 241, 100, 8
  CONTROL "0 = no limit", -1, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 150, 241, 171, 8
}

foo_random_pools

Reply #10
Nice idea. I've tried to make it crash, but I wasn't successful so far.
Maybe you have to try harder. 

There are a few things that could be improved (keep in mind that I'm a perfectionist):
I'm always open to improvement suggestions.

Discoverability
  • foo_whatsnew did not pick up the main  menu commands after installation, so I suspect you don't enumerate any,  when no pool is configured. I suggest to enumerate the "All pools"  command always, but make is disabled and greyed, when there are no  pools, and to add a "More..." command that opens the preferences page.  The menu tree for foo_random_pools would then look like this:
    Code: [Select]
    [code]File
       Random pools
         All pools
         [insert configured pools here]
         ---
         More...
    [/code]
[/list][/quote]Good point, but I'll add another menu separator after "All pools". This should be possible now with SDK 1.0, at least I found no way to make this with the old SDK.

Preferences
  • Link the "Help" button to the installed help file.
  • Use new preferences page API from the 1.0 SDK.
I overlooked the first point, the second one is, of course, already planned.

Dialogs
  • Improve dialog layout. For example, add some horizontal space between buttons. I think Microsoft recommends 7 DLUs.
  • End labels for edit controls with a colon.
  • Improve text for "Don't determine distinct group values" check box. See below for my suggestion.
Personally, I don't like the first two points, but as a plugin should follow the host application, I will change that. For the third point, your text makes it more clear, what is meant, so I will use it. Regarding the dialog layout in general, I wasn't really happy with it by myself and I already got a proposal in a German Foobar200 forum, so I will also change the layout.[/li][/list]

foo_random_pools

Reply #11
Thank you for this component!

However, why is %added% DURING LAST 6 WEEKS an invalid filter expression?

foo_random_pools

Reply #12
Will be fixed with the next version.


foo_random_pools

Reply #14
So, I have been using this component for some days and it has become one of the most important to me! I love its "weighted randomness". I am using it with album ratings (calculated outside of foobar with a script I wrote). In my case, the component automatically populates my playlist with random albums but in the long run makes me listen to more great albums than bad ones. It also has great synergy with playlist_attribute's "remove played/skipped tracks".

I think, the preferences page could be improved for the next version.  Right now it's pretty inefficient if you want to play around with priorities.

foo_random_pools

Reply #15
Great component. Is it still under development? Cause its listed as problematic, but its features are really cool.

foo_random_pools

Reply #16
Thanks for the hint. I'm already using a newer version and never had a crash, so I wasn't aware of it. I requested the crash reports and will look into them.

foo_random_pools

Reply #17
Thanks for the hint. I'm already using a newer version and never had a crash, so I wasn't aware of it. I requested the crash reports and will look into them.


cool, glad to hear you're still developing.  i've had maybe one crash while running random pools, but i also have foo_uie_lyrics2 which has usually been the source of the crash.

either way, definitely looking forward to trying any new versions of random pools when your ready to release.
using it daily and i'm totally hooked on the ability to populate playlists with random albums!

foo_random_pools

Reply #18
haven't gotten any crashes yet.
this plugin sort of "resurrects" not popular albums in my library, the randomness that mixes known with unknown... damn useful little tool


foo_random_pools

Reply #20
How does this "weighted randomness" work that some people have been talking about?


It works best with parameters which are the same for whole albums (like date, genre, album rating). If you want to listen to more new music, create pools like f.i. (the more pools, the better):

Filter: %date% GREATER 2008, Priority: 20
Filter: %date% LESS 2009, Priority: 10
(Group: %album% for all)

After that specify a playlist for the autoadd feature and when the component should add a new album. Now when you listen to this playlist, the component will choose random albums but newer ones twice as often.

EDIT: I'm also looking forward to a new version. Amazing Plugin!


foo_random_pools

Reply #22
Version 0.0.2 is available. See first post for DL and CL.

foo_random_pools

Reply #23
Thank you very much! Works great so far.

 

foo_random_pools

Reply #24
awesome thanks! looking forward to trying out more thoroughly tomorrow.

just FYI, it appears loading the new version blows away previous settings.

not a biggie for me at all i can easily recreate, just figured i would mention it though.