Hydrogenaudio Forums

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: fbuser on 2010-01-02 17:15:40

Title: foo_random_pools
Post by: fbuser on 2010-01-02 17:15:40
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.

Title: foo_random_pools
Post by: Black_Over_Bills_Mothers on 2010-01-03 09:01:02
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.
Title: foo_random_pools
Post by: Chris Norman on 2010-01-03 12:08:05
Looks like a great idea - going to test it.
Title: foo_random_pools
Post by: xbullethammer on 2010-01-03 19:57:30
BRILLIANT!

Finally a way to add random albums to a playlist!
Title: foo_random_pools
Post by: realhaiy on 2010-02-13 09:25:39
great plugin!
only one requset: option for preventing adding duplicates
Title: foo_random_pools
Post by: NullString on 2010-02-13 17:03:42
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!
Title: foo_random_pools
Post by: Xezzy on 2010-02-13 20:03:54
Yes, limit the playlist by filesize would be great feature, especially for portable mp3 devices...
Title: foo_random_pools
Post by: fbuser on 2010-02-14 00:11:57
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.
Title: foo_random_pools
Post by: mrinferno on 2010-02-14 14:24:04
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...
Title: foo_random_pools
Post by: foosion on 2010-02-14 14:37:35
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.
(http://foosion.foobar2000.org/misc/foo_random_pools.png)
Code: [Select]
103 DIALOG 50, 50, 332, 295STYLE DS_FIXEDSYS | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENUCAPTION "Random pool"LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_USFONT 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 }
Title: foo_random_pools
Post by: fbuser on 2010-02-14 15:45:43
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]
Title: foo_random_pools
Post by: exxecutor on 2010-02-14 16:14:04
Thank you for this component!

However, why is %added% DURING LAST 6 WEEKS an invalid filter expression?
Title: foo_random_pools
Post by: fbuser on 2010-02-14 17:10:54
Will be fixed with the next version.
Title: foo_random_pools
Post by: Fractal_Mortality on 2010-02-14 20:05:42
Anyone have any idea how I could rig a script for this in order to draw random pools of albums only from the past week/month/etc. using the %added% tag?
Title: foo_random_pools
Post by: exxecutor on 2010-02-23 12:54:04
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.
Title: foo_random_pools
Post by: Xezzy on 2010-03-29 23:48:11
Great component. Is it still under development? Cause its listed as problematic, but its features are really cool.
Title: foo_random_pools
Post by: fbuser on 2010-03-30 18:51:04
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.
Title: foo_random_pools
Post by: mrinferno on 2010-03-30 19:00:32
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!
Title: foo_random_pools
Post by: NullString on 2010-03-30 19:19:41
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
Title: foo_random_pools
Post by: Fractal_Mortality on 2010-03-31 07:35:02
How does this "weighted randomness" work that some people have been talking about?
Title: foo_random_pools
Post by: exxecutor on 2010-03-31 08:31:51
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!
Title: foo_random_pools
Post by: Fractal_Mortality on 2010-03-31 08:48:05
Gotcha, thanks for the explanation
Title: foo_random_pools
Post by: fbuser on 2010-04-04 22:28:28
Version 0.0.2 is available. See first post for DL and CL.
Title: foo_random_pools
Post by: exxecutor on 2010-04-04 23:33:55
Thank you very much! Works great so far.
Title: foo_random_pools
Post by: mrinferno on 2010-04-05 03:28:13
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.

Title: foo_random_pools
Post by: Fractal_Mortality on 2010-04-05 06:46:52
So does this mean we can now perform filters like ADDED within LAST SIX WEEKS etc?

If so, what is the exact format?
Title: foo_random_pools
Post by: fbuser on 2010-04-05 08:40:27
just FYI, it appears loading the new version blows away previous settings.
Aargh, I think I noticed it, but later I forgot it, as it only happens by updating from version 0.0.1 to 0.0.2.

Edit: Fixed now ith version 0.0.2.1
Title: foo_random_pools
Post by: fbuser on 2010-04-05 08:41:26
So does this mean we can now perform filters like ADDED within LAST SIX WEEKS etc?

If so, what is the exact format?
Standard query syntax (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Query_syntax)
Title: foo_random_pools
Post by: Fractal_Mortality on 2010-04-05 09:02:35
Ahhh, it appears this isn't working for me because my %added% format is

20100403

(YearMonthDay with no spaces or dashes)

I totally understand that this is simply a convention I've held onto, but would it be hard to edit the plugin to also support this date format?
Title: foo_random_pools
Post by: fbuser on 2010-04-05 09:17:16
Ahhh, it appears this isn't working for me because my %added% format is

20100403

(YearMonthDay with no spaces or dashes)

I totally understand that this is simply a convention I've held onto, but would it be hard to edit the plugin to also support this date format?
Sorry, but that is not possible. As the query syntax for dates doesn't seem to support something like $left(%added%,4)-$substr(%added%,5,2)-$right(%added%,2), the only thing you can do is to use masstager and convert your added field in that way. Title: foo_random_pools Post by: Fractal_Mortality on 2010-04-05 09:20:06 Hmm, ok... Any idea how I'd go about that in masstagger? edit: Nevermind, figured it out Title: foo_random_pools Post by: fbuser on 2010-04-05 09:36:18 "Format from other field" with the destination field ADDED and the pattern mentioned above should do it. Title: foo_random_pools Post by: mrinferno on 2010-04-05 14:49:14 Edit: Fixed now ith version 0.0.2.1 confirmed, tested the new version on my other install of foobar, settings are now preserved. Title: foo_random_pools Post by: q-stankovic on 2010-04-17 15:10:23 Since the component offers the limitation by time, size and number of tracks i tried to replicate simple playlist generating functionality - means: no random picked and then limited group is added but the limitation is applied on whole library. That is a a standard feature of playlist tree. I found out that title formatting expressions are possible that gives back the whole library as one group. I would like to ask for a simple feature: before we have to type in weird expressions to create a group that consists of all media library items wouldn't it be more intuitive to do the same by leaving the group textbox just empty? Title: foo_random_pools Post by: fbuser on 2010-04-17 15:56:26 You don't need weird expressions to achieve this. Just use a field you don't have in your library, something like %all%. This should be simple enough. On the contrary, I found it a little bit confusing to get the whole library back, when no group was entered. That's why I restricted the group field to be non-empty. Title: foo_random_pools Post by: q-stankovic on 2010-04-17 16:05:56 You don't need weird expressions to achieve this. Just use a field you don't have in your library, something like %all%. Or for example %library%? Good to know! Maybe you can do anything that is more obvious than using empty box or non-existing fields? Title: foo_random_pools Post by: fbuser on 2010-04-17 21:22:04 I don't see a need to do anything here. To get the whole library as one group you just need field with the same value for all tracks in the library. So, you could define a field and tag it for all tracks with an arbitrary value (obviously not the best solution) or you even use a field which has the value "undefined", which is the case, if a field doesn't exist. Title: foo_random_pools Post by: q-stankovic on 2010-04-18 21:29:03 I don't see a need to do anything here. Well, now i know how to do it but what about other users? There is a useful feature that is hidden and could only be used by secret knowledge. A simple checkbox would do the job IMO. I have a question: If we have a one added random pool that consists of more than one group, is each group of the pool random or is a random repetition avoided? Title: foo_random_pools Post by: fbuser on 2010-04-18 22:04:53 [quote author=q-stankovic link=msg=701353 date=1271622543]Well, now i know how to do it but what about other users? There is a useful feature that is hidden and could only be used by secret knowledge. A simple checkbox would do the job IMO.[/quote]There is nothing hidden and there is no secret knowledge, it's just logic. A checkbox would only be redundant, without any further benefit. [quote author=q-stankovic link=msg=701353 date=1271622543]I have a question: If we have a one added random pool that consists of more than one group, is each group of the pool random or is a random repetition avoided?[/quote]From the help file: Quote Number of groups to add: Defines how many groups should be determined for adding tracks to a playlist. If "Determine probability for picking groups based on group size" is not selected, it is guaranteed, that no duplicates will be selected. In this case, if the number of distinct groups is less than the number of groups to add, the lesser number will be used. Title: foo_random_pools Post by: carpman on 2010-05-05 03:27:22 Hi all, Great component fbuser. Looking forward to seeing how it develops. I'm trying to understand the "All Pools" selection. Am I right in thinking for example that if you choose All Pools it will, based on the weighting, give you a selection of each Pool mixed together? So for example, if one pool is limited to 1 hour and has a priority of 10 and another is limited to 2 hours with a priority of 20 you are likely to get a playlist of approx. 1 hour 30 mins? The reason I ask is because I've been getting strange results from a test: I've 2 pools. Both apply filters: 1) %path% HAS "chamber" 2) %title% HAS "adagio" OR %title% HAS "andante" OR %title% HAS "cantabile" They have equal priority. Yet when I select "All Pools", ALL the results contain tracks with either adagio, andante or cantabile in the title. Any idea why? I expected about 50% of tracks to be chamber music since "chamber" will appear in the directory name (%path%) and 50% of tracks with either adagio, andante or cantabile in the title. Finally, each Pool works fine when selected independently, it's only a problem when All Pools is chosen. All help much appreciated. Thanks, C. Title: foo_random_pools Post by: carpman on 2010-05-05 06:30:55 Forget it. Seems like a freak occurence of randomness. Basically I ran it many times and each time every track had adagio etc ... Have run it many many more times and I'm getting a mix. Sorry for the false alarm. C. Title: foo_random_pools Post by: carpman on 2010-05-06 02:32:14 Okay, after some more testing of this component I'm beginning to feel stupid. Can someone explain to me what All Pools is supposed to do? My expectation was that it would give you a mix of the various pools based on weighting. I've applied equal weighting to each of three pools, and I seem to be getting the results of one pool OR another, but never a combination. Is that what's supposed to happen? Again any help greatly appreciated. Or if someone can point me to the appropriate place in foo_random_pools_help.html that would be good. Many thanks, C. Title: foo_random_pools Post by: Wooops on 2010-05-06 08:25:14 There´s no option to run "all pools" simultaneously or one after one, but you can try this (hopefully it will do what you want), instead of using 2 pools merge them into one, such that it contains your both criteria’s (for your pool 1 and 2) specified in the group field and set in "number of groups to add: 2" It should add tracks from those 2 groups into a single playlist mix, you can use in the sort field "rand()" to get it really mixed Now looking more closely to your pools it doesn´t seem possible to get both filters into one pool, but you can try using the same criteria as in your Pools 1 (%path%) for your Pool 2. Hopefully you have your adagio, andante or cantabile songs stored in a folder of the same name. Create a new pool and configure it as this: Code: [Select] Group field:%directoryname%Number of Groups to add: 2Filter : (%path% HAS "\Music\chamber") AND ((%path% HAS "\Music\adagio") OR (%path% HAS "\Music\andante") OR (%path% HAS "\Music\cantabile")) Note: if you need to exclude a directory use (NOT (%path% HAS "\directory\")) Hope it helps. Title: foo_random_pools Post by: fbuser on 2010-05-06 21:08:46 Again any help greatly appreciated. Or if someone can point me to the appropriate place in foo_random_pools_help.html that would be good. An explicit explanation of "All pools" is missing indeed. It's only implicitly explained for the priority field. With "All pools" one pool is picked from all pools with a priority unequal to zero. If you really need more than one pool to be added to a playlist, you have two options: • bind a keyboard shortcut to the "All pools" menu entry and hit this key as often as needed • define an autoadd playlist with a high value for "Add, when the playlist has X items or less", clear the playlist, add one pool and start playback on this playlist afterwards Title: foo_random_pools Post by: carpman on 2010-05-07 09:27:50 Thanks for the reply. I got it now. So basically All Pools is a lucky dip where you pick one pool from all the pools - which matches with the results I've been getting. In which case I have a feature request. Can you have a Run All Pools (except for those with a priority of 0) feature. This would be the equivalent of manually selecting each of the pools in the list. Because so far what foo_random_pools can't do is provide a selection of tracks from a number of varied criteria, and this would allow for that, because you've made is easy to set the limits on each pool quite small (i.e. just a few tracks). So you can have a little of this, a little of that and a little of the other. Cheers, C. Title: foo_random_pools Post by: NullString on 2010-05-07 14:31:30 In which case I have a feature request. Can you have a Run All Pools (except for those with a priority of 0) feature. This would be the equivalent of manually selecting each of the pools in the list. that sounds promising, like some sort of "alias" for groups of pools Title: foo_random_pools Post by: Fractal_Mortality on 2010-05-08 00:31:50 Because so far what foo_random_pools can't do is provide a selection of tracks from a number of varied criteria, and this would allow for that, because you've made is easy to set the limits on each pool quite small (i.e. just a few tracks). So you can have a little of this, a little of that and a little of the other. Aye, this sounds like a great feature. The new "all pools" could also have a group amount, just like individual pools (i.e. if I wanted 20 random albums chosen from all of my pools, and selected according to their ranking, I could do it). Title: foo_random_pools Post by: laite on 2010-06-21 18:22:33 Hi, it seems that if same album is on random playlist twice, automatic add doesn't work. In other words, I have set this to add new album when there is 5 or less songs left, and it works correctly if album at the end of the list has only one instance on playlist, but doesn't work if same album is twice (or more) on playlist. Title: foo_random_pools Post by: fbuser on 2010-06-21 21:18:54 Thanks for reporting. Fixed with version 0.0.2.2. Title: foo_random_pools Post by: hesher on 2010-07-08 14:29:28 Could someone give an example for usage of the plugin? I'm not sure I completely understand how it works and an example a little more practical than the one in the help file could really help. Thankx Title: foo_random_pools Post by: mrinferno on 2010-07-08 15:51:23 one of my favorite ways to use it is as a virtual album changer [in conjunction with foo_removeplayed (basically just removes songs from the playlist after they finish playing)]. Example Random Pool: Code: [Select] Name: Album-Pop/RockGroup: %album artist% - %date% - %album%Number of groups to add: 1Filter: (NOT %album artist% IS "Various Artists") AND (%genre% IS Pop/Rock)Limit: 0, 0, 0, uncheckedSort: %path_sort%Sort / limit each group: checkedPriority: 10 Random Pools - Autoadd settings: "Playlist patterns" set to "Random*" "Add, when the playlist had X items or less" set to 1 "Add, when the playback position is X items..." set to 1 then i name a playlist Random1, manually populate the 1st pool, File -> Random Pools -> Album-Pop/Rock, and hit play. Once playback starts, foo_random_pools will monitor that playlist (based off my settings above). after each album plays down to the last track a new random album will be en queued to the playlist. thus creating the virtual changer effect. there are tons of stuff you can do with the plugin, this is just one example. Title: foo_random_pools Post by: hesher on 2010-07-10 00:08:42 one of my favorite ways to use it is as a virtual album changer [in conjunction with foo_removeplayed (basically just removes songs from the playlist after they finish playing)]. Example Random Pool: Code: [Select] Name: Album-Pop/RockGroup: %album artist% - %date% - %album%Number of groups to add: 1Filter: (NOT %album artist% IS "Various Artists") AND (%genre% IS Pop/Rock)Limit: 0, 0, 0, uncheckedSort: %path_sort%Sort / limit each group: checkedPriority: 10 Random Pools - Autoadd settings: "Playlist patterns" set to "Random*" "Add, when the playlist had X items or less" set to 1 "Add, when the playback position is X items..." set to 1 then i name a playlist Random1, manually populate the 1st pool, File -> Random Pools -> Album-Pop/Rock, and hit play. Once playback starts, foo_random_pools will monitor that playlist (based off my settings above). after each album plays down to the last track a new random album will be en queued to the playlist. thus creating the virtual changer effect. there are tons of stuff you can do with the plugin, this is just one example. Great Example! Thanks! Title: foo_random_pools Post by: Bodhi on 2010-09-05 22:04:01 fbuser a billion thanks, I was looking for that for a long time! Title: foo_random_pools Post by: Sixth Street on 2010-09-06 17:29:56 Just started playing around with this component, it is great! How would I go about populating a new playlist with one random album from each genre in my library? Title: foo_random_pools Post by: q-stankovic on 2010-09-06 17:39:23 Not possible because that would require not only one group but also a subgroup. Title: foo_random_pools Post by: Sixth Street on 2010-09-06 17:55:06 [quote author=q-stankovic link=msg=721616 date=1283791163]Not possible because that would require not only one group but also a subgroup.[/quote] That's what I was suspecting. Thanks for the quick reply though. As a workaround, I just setup a pool for each genre I have and then manually select each one from the random pools menu to populate. Not as elegant as what I was hoping for, but plenty good enough. This is great for iPod syncing with foo_dop. Much thanks to the dev! Title: foo_random_pools Post by: q-stankovic on 2010-09-06 18:51:21 I remember that the @limit function inside playlist tree gave the opportunity to create such queries. Fbuser, what dou you think about field for a subgroup and a sub-subgroup (no more, no less ) - that would make possible fancy queries ... with one random album from each genre in my library? Another request: easy option to choose all groups Title: foo_random_pools Post by: Bodhi on 2010-09-07 10:29:47 Hi, Is there a limitation in MBs? It works fine until I chose a limitation big enough. If I pick, for example, a limitation of 5000 MBs, There's not even 1000MBs of tracks (group = %track%)! Thank you! Title: foo_random_pools Post by: fbuser on 2010-09-11 12:28:33 Is there a limitation in MBs? No, fixed in 0.0.2.3. See first post for download. Title: foo_random_pools Post by: Bodhi on 2010-09-11 12:35:24 Great, thanks! Title: foo_random_pools Post by: laite on 2010-09-21 15:08:42 First of all, let me say that I really like this component. Along with foo_scheduler it is probably most essential component to my listening. That said, I have two suggestions: 1. How about making autoadding choose possible pools depending on what playlist is active. For example, if it's "random tracks", foo_randompools would pick only from pools named with TR_* (or perhaps some pool specific option at which playlists they attend to). 2. I would like to see somekind of simple "master query" in options. For example, I have quite complex system with ratings, playcounts, hyped statuses and so on with my pools. Sometimes though, I would only like to listen certain type or aged music and easiest way that comes to my mind is that on options-page I coul write something like '%genre% HAS "metal"' and it would automatically be added to every poolquery. So, if my "%rating" EQUAL 3" was selected (randomly) the whole query would be '%genre% HAS "metal" AND %rating% EQUAL 3'. Does this make sense? The component is sufficient the way it is, but I think these improvements would make it even better. Title: foo_random_pools Post by: TakuSkan on 2010-10-05 09:25:16 I'm terrible at figuring out code to get FB2K to work for me. Could someone tell me if it would be possible to write code for foo_random_pools that would target directories with large numbers of files, and then set a low playback priority for them in the 'Random Pool' preferences? I like to have FB2K play tracks from my entire library at random. But the problem is that even with a randomized playlist, and 'Shuffle (tracks)" set, FB2K tends to play the artists more frequently with large numbers (complete discographies) of files. I've experimented with foo_random_pools, and have found something that works. I can create a pool for, say all 'Rock' genre tracks, but that excludes an artist with a huge number of files, with a high priority: (%path% HAS "\MP3s\Rock-Pop") AND (NOT %artist% IS "UB40") Priority: 30 Then I can create another pool that loads that artist, and sets its priority low: %artist% IS UB40 Priority: 1 I could create a separate pool for each artist with large numbers of tracks, and set the priority of each low. And then go into the pool that plays all files, and add every artist that has high numbers of tracks. But that seems like more work than should be needed. Is it possible to write code that limits playback based on the number of tracks in an artist's folder/subfolders? That would just require two pools: 1 – One with artists with less than say 100 tracks set to a high priority 2 – One with artists with more than 100 tracks set to a low priority Title: foo_random_pools Post by: fbuser on 2010-10-05 20:38:57 Just create only one pool with using %artist% as your group definition and %path% HAS "\MP3s\Rock-Pop" as your filter. Then for each artist you will get the same probability to get picked, independent from the number of tracks you have for an artist. Title: foo_random_pools Post by: TakuSkan on 2010-10-06 06:48:41 Wow... this is closing in on something I've been thirsting for since the 1st copy of Winamp ever released. As you suggested, I set %artist% as my group definition, but dropped 'Rock-Pop' and set %path% HAS "\MP3s" as a filter for my entire library. I say 'closing in' because, while I am getting few if any repeat artists played with things configured as you suggested, I'm finding that foo_random_pools seems to dwell within some folders more than others. I played about a half hour's worth of my entire library, and noticed that I was hearing a lot of tracks from my 'World' folders. And I was hardly hearing any classical tracks at all. I have a foo_np_simple script logging everything FB2K plays. So I opened the log file and ran searches to see how many files from each genre's top folder were played. I should point out that I only set foo_random_pools to add 1 track to the queue at a time. I won't post all the results, but here's enough to make a point: Code: [Select]  Play Total Folder Count Files 12 402: Miscellaneous MP3s 1 31 557: Miscellaneous MP3s 2 6 1840: Classical (Choral) 7 655: Classical (Instrumental) 6 416: Classical (Vocal) 2 323: Country 51 4651: Folk-World 7 448: Jazz 6 50: Jazz Collections 10 48: Jazz Webcasts 13 183: Pop FM Broadcasts 34 7960: Rock-Pop 42 656: Rock-Pop Collections 8 109: Soundtracks 72 835: World -- 324 Total played (genres with only few files not listed above). Look at the proportions: Out of 835 files in the 'World' folders, 72 of them were played. Out of 1840 classical choral files, only 6 were played Out of 655 classical instrumental files, only 7 were played Out of 414 classical vocal files, only 6 were played Then look at the numbers for the 'Rock-Pop' files, and the 'Rock-Pop Collections' play counts: Out of 7960 'Rock-Pop' files, 34 were played. Out of only 656 'Rock-Pop Collections', 42 were played. That one really startled me. I'll test this a bit more, but I guess with a little code added to set priorities, I can level things out. After about 1/2 hour of normal playback, I started to skip forward to quickly play the next queued tracks (a total of 324). Without waiting the 60 seconds FB2K requires to recognize them as having been 'Last Played', foo_random_pools would sometimes queue the same file again, or queue another track from the same album folder. Not a problem with normal playback, but it makes it a little hard to evaluate performance. I'm still not clear on a few aspects of this component, but I'll hold off on questions until I've played with it a bit more. Overall it's really a fantastic tool for customizing random track playback. Thanks for all your effort on this fbuser. Title: foo_random_pools Post by: fbuser on 2010-10-06 19:02:12 Wow... this is closing in on something I've been thirsting for since the 1st copy of Winamp ever released. As you suggested, I set %artist% as my group definition, but dropped 'Rock-Pop' and set %path% HAS "\MP3s" as a filter for my entire library. This is a different scenario and so the results you described are not very suprising. If you want to equalize the results for the folders you should use$directory(%path%) as group and for using all tracks of your entire library you can leave the filter empty. If you have any subfolders in your folders, it will not work as described, but can be adjusted.

Without waiting the 60 seconds FB2K requires to recognize them as having been 'Last Played', foo_random_pools would sometimes queue the same file again, or queue another track from the same album folder.
'Last Played' and foo_random_pools are not related at all. foo_random_pools does not have any memory, therefore it can happen, that the same file will be picked twice in a row.

Title: foo_random_pools
Post by: TakuSkan on 2010-10-06 20:08:06
...you should use $directory(%path%) as group and for using all tracks of your entire library you can leave the filter empty. I'll give that a try. Quote If you have any subfolders in your folders, it will not work as described, but can be adjusted. Under each genre's main subfolder under \MP3s I used to have separate folders for each 'artist - album'. But as the library grew over the years, I began to create a single folder for some artists, and group that artist's albums in sub-directories on that one. So you're saying that will require some tweaking? Would that mean creating a pool for each genre's folder, and setting a priority for each? Title: foo_random_pools Post by: fbuser on 2010-10-07 20:32:07 Would that mean creating a pool for each genre's folder, and setting a priority for each? That could be solution. It is not necessary, if you are able to describe the structure of your folders with one title format expression. Basically, it should be possible, but the expression might become complicated. Title: foo_random_pools Post by: TakuSkan on 2010-10-08 10:10:47 Could you just lay out a brief abstract of what needs to be done here? I'm not at all clear on why changing the group and filter as we did here changed the whole dynamic of what's going on. This thread is about the only source of information on this component... si/no? Title: foo_random_pools Post by: fbuser on 2010-10-08 19:02:28 Could you just lay out a brief abstract of what needs to be done here? Mainly you need to find a title format expression for grouping, which matches your root folders. Something like$puts(Remainder,$stripprefix(%path%,<your base path>))$left($get(Remainder),$sub($strchr($get(Remainder),\),1)) could be a starting point, maybe it already works.

I'm not at all clear on why changing the group and filter as we did here changed the whole dynamic of what's going on.
The filter is used to restrict the tracks of the media library before building the groups. For each track of the media library, which is not filtered out by the filter expression, the group expression is evaluated. All evaluations with the same value are building one group. Normally one such complete group will be randomly picked, but this behaviour can be customized by several attributes, e.g. you can limit the picking to only one track per group. So, for your described cases it should be obvious, that using %artist% as group leads to a different result than using $directory(%path%) as a group. This thread is about the only source of information on this component... si/no? Besides the help file, most probably yes. Title: foo_random_pools Post by: TakuSkan on 2010-10-09 23:08:16 Something like$puts(Remainder,$stripprefix(%path%,<your base path>))$left($get(Remainder),$sub($strchr($get(Remainder),\),1)) could be a starting point, maybe it already works.

Well if one of the main purposes of this component for me is to avoid constantly playing tracks by artists I have huge numbers of files for, after a quick test, that code seems to do just the opposite.

I'll try to read up on those title formatting values and see if I can figure out what they do and how to tweak things to work for me.
Title: foo_random_pools
Post by: fbuser on 2010-10-10 09:00:19
the main purposes of this component for me is to avoid constantly playing tracks by artists I have huge numbers of files for, after a quick test, that code seems to do just the opposite.
This code is not meant to do this. It is meant to balance the groups determined from different folders. If you want to balance the groups determined from different artists, you have to go back to use just %artist% as group. You need to decide for one of these. Both together is logically not possible.
Title: foo_random_pools
Post by: TakuSkan on 2010-10-12 04:22:58
If you want to balance the groups determined from different artists, you have to go back to use just %artist% as group

If I could set %artist% as the group, and then as a filter, set a path for each genre I have folders for, and then set a priority for each within the filter code string, I think I could accomplish what I'm after.

But even though Wooops suggested that it should work in an earlier post, (http://www.hydrogenaudio.org/forums/index.php?showtopic=77460&view=findpost&p=704128) apparently I can't set more than just one path as a filter.  For instance this filter will lock up FB2K:

(%path% HAS "\MP3s\Blues") AND (%path% HAS "\MP3s\Country")

And then there'd still be the problem of setting a priority for each within the script.
Title: foo_random_pools
Post by: carpman on 2010-10-12 05:01:15
For instance this filter will lock up FB2K:

(%path% HAS "\MP3s\Blues") AND (%path% HAS "\MP3s\Country")

I'm not surprised. This expression would only return results if you had music in a directory structure (path) like so:
...\MP3s\Blues\MP3s\Country\*

Surely: (%path% HAS "\MP3s\Blues") OR (%path% HAS "\MP3s\Country")

C.
Title: foo_random_pools
Post by: TakuSkan on 2010-10-12 12:05:14
Surely: (%path% HAS "\MP3s\Blues") OR (%path% HAS "\MP3s\Country")

!OR! ... Yes... That makes much more sense.  Thanks for explaining that carpman.

That let's me combine 3-4 folder paths into one of 4 pools.  Each with %artist% as 'Group' and with priorities set to either 1, 5, 10, or 15.  That gets me closer to what I'm looking for.

It would be nice if it was possible to put all folder paths into the filters of one pool, and then set a priority for each.  Would FB2K code formatting prohibit that?
Title: foo_random_pools
Post by: tempman on 2010-10-13 17:42:28
Thanks for this great plug in!  I use it with autoadd in the way described by mrinferno above: http://www.hydrogenaudio.org/forums/index....st&p=713114 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77460&view=findpost&p=713114)

I would really like the ability to be able to specify priorities dynamically: e.g. %rating%*100 + %play_count%

An even bigger (?) feature request is to have different priority ratings for different playlists (and autoadd).  For example I would like to be able to have a pop/rock autoadd list and a separate classical/jazz autoadd list.  At the moment I think autoadd behaves the same way towards all playlists that match the playlist pattern.

Cheers!
Title: foo_random_pools
Post by: fbuser on 2010-10-15 16:59:46
I would really like the ability to be able to specify priorities dynamically: e.g. %rating%*100 + %play_count%
Besides that I don't see any real use for the example, it doesn't make any sense anyway. You cannot apply track based calculations to groups.

An even bigger (?) feature request is to have different priority ratings for different playlists (and autoadd).  For example I would like to be able to have a pop/rock autoadd list and a separate classical/jazz autoadd list.
At the moment I don't plan to implement something like this, but maybe in the future.
Title: foo_random_pools
Post by: carpman on 2010-10-20 00:50:44
Hi fbuser

I don't know how hard this would be to do, but what I'd really like is the ability to easily switch on/off pools, yet keep the same All Pools weightings ("priorities"), but only have those priorities apply to selected pools. Like so ...

(http://www.giantpygmy.net/stuff/foo_randompools_mockup.png)

At present if I want, for example, 3 complimentary (e.g. gentle background music) pools to randomly play, I have switch the priority of all non suitable pools to 0, which is a pain, then later switch them back to whatever they were before, which I can never remember. Easier to simply tick and untick and have a select all / select none right click option.

Just an idea, what do you think?

C.

EDIT: for clarity.
Title: foo_random_pools
Post by: Yaris on 2010-10-21 22:43:32
Nice plugin, thanks
I want to random select individual songs. When I use %title% as Group,  tracks which are more than once on the disc appears on the playlist multiple times
Title: foo_random_pools
Post by: mrinferno on 2010-10-21 23:51:04
try %filename% as the group.
set limit number of tracks to add: 1
Number of groups to add: [number of tracks you want in the playlist]
make sure "sort / limit each group" is checked.

that works well for me.

for Group you need to use a unique field or you'll get duplicates.

Nice plugin, thanks
I want to random select individual songs. When I use %title% as Group,  tracks which are more than once on the disc appears on the playlist multiple times

Title: foo_random_pools
Post by: スラッシュ on 2010-11-22 16:23:39
I totally love this component, it's great! Very intuitive to work with and it really does what it should.

I guess this might've been already suggested, but it would be awesome if you could auto-add different things into different playlists. Ie. I have a playlist called "pool|ranked" where it sends a weighted-random item based on %ranking%, but I'd also like a playlist where I get a "pool|DAR" weighted-random item based on DAR rating. Maybe I just didn't understand correctly and I'm doing it wrong, though?
Title: foo_random_pools
Post by: fbuser on 2010-11-22 17:36:20
I guess this might've been already suggested, but it would be awesome if you could auto-add different things into different playlists
Yes five posts (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77460&view=findpost&p=726772) above yours  ;)
Title: foo_random_pools
Post by: スラッシュ on 2010-11-22 17:54:42
That's what I get for reading the first few pages and going "I'll just post this..."
Title: foo_random_pools
Post by: Ephoras on 2011-03-11 00:54:37
hell, i think i m rly dumb, because i don't get it to work at all.

i installed the component
Went to menu -> Random Pool
Name: Sony Walkman
Group: %libary%
Number of groups to add 0
Filter: %rating% GREATER 2
Number of MBs to add: 6840
Priority: 10

Plalylist patterns: All Music
Add, when playlist has X items or less: 1
PLaybback position: 0

In my opoinion i should somewhere get a playslist that has all songs with rating greater 2.

But i can't find it...

What i want do have, if someone wants to give me the code:
A playlist that has a maximum file size of 6,84GB
and includes only songs with rating 3, 4 and 5

i hope someone can help me
Title: foo_random_pools
Post by: carpman on 2011-03-11 08:04:05
Group: %libary%
Number of groups to add 0

You're telling it to search ALL tracks (Group: %libary%) BUT not add any (Number of groups to add 0).
This needs to be at least 1 in general and in your case:

Code: [Select]
Number of groups to add 1

And for tidyness sake you could change %libary% to %library% (but this makes no difference, as you've realised if you make up a %field% that doesn't exist it will search all tracks).

C.
Title: foo_random_pools
Post by: Ephoras on 2011-03-11 11:04:35
thanks, it works now;)

My main problem was that i needed some hours of sleep to figgure ot how to create the playlist it self, i think;)

works fine now;)
Title: foo_random_pools
Post by: prashantv on 2011-03-17 23:27:42
Is it possible to sort in descending order?
Title: foo_random_pools
Post by: Ephoras on 2011-03-22 11:43:41
Hell it still does not work the way i want it to.

My current config for random pool is:
Name: Sony Walkman
Group: %library%
Determine probability for picking groups based: Unchecked
Number of groups to add: 1
Filter: %rating% GREATER 2
Priority: 1
Limit: Numbers of MBs to add: 7800
Limit after Sorting: Unchecked
Sort: empty
Sort/Limit each group: uncheced

%rating% GREATER 2 contains around 10GB of files
But i can only store around 7,8GB on my player

So, i create an empty playlist
Hit random pools...Sony Walkman
Foobar adds files to the playlist
But always just 6-7GB not 7,8 gb

what am i doing wrong?
Title: foo_random_pools
Post by: fbuser on 2011-03-22 21:04:40
Which size have the files you are going to add to the playlist? If you have encoded complete albums into one file with a lossy format, it could explain your results as the limit will never be exceeded and the fillling algorithm will also not try to come as close to the limit as possible. If the next random track to be chosen during the filling would exceed the limit, nothing more will be added and the filling is considered as complete.

What are the values for "Number of tracks to add" and "Number of minutes to add"?

BTW, the expected result should be about 7,6GB as 7800MB=7,6 GB.
Title: foo_random_pools
Post by: Ephoras on 2011-03-22 23:12:24
thank you,
i had 1 loosless album in the filter, that seemed to be the problem.

The GB size was just entered random because i did not know how much space the sony has free.

NUmber of tracks and Number of of minutes are: 0 (no limit)

I started a new topic for some more questions  because i don't want to spam this threat any longer;)

pls have a look at it: http://www.hydrogenaudio.org/forums/index....showtopic=87627 (http://www.hydrogenaudio.org/forums/index.php?showtopic=87627)
Title: foo_random_pools
Post by: mrinferno on 2011-04-02 13:02:44
hi fbuser,
I was just rereading through the thread, haven't been around in a while.
any chance you have considered carpman's suggestion in post #77 (http://www.hydrogenaudio.org/forums/index.php?showtopic=77460&view=findpost&p=727642)?

I have been hoping for a quicker way to enable/disable the all the various pools I have created depending on my listening mood.
Alternatively, perhaps if there was a way to tie specific pools/priorities to unique Autoadd playlist patterns.

If it's too much effort or not feasible, that's cool.  Totally love the plugin the way it is.

Title: foo_random_pools
Post by: Ephoras on 2011-04-20 08:11:46
Hi,
anyone here who wants to help me?

I currently have randompools set up to create a 6.97GB playlist with songs %Rating% GREATER 2.
THat on is quite fine, but i have much more rating 3 songs than 4/5, so there are more of them in the playlist.

What i want to have:
A playlist that first puts in all rating 4/5 Songs
But never more than 5.00GB (no exact 5gb needed, just in this range)
FIlls the rest with rating 3 songs

HOw can this be done?
Just by 2 random pool setups?
THe problem is currently i don't have 5gb of 4/5 songs, so the setup has to be dynamic

I hope this works via sorting or such, but i don'T get it to work right....

Ephoras
Title: foo_random_pools
Post by: trebordean on 2011-04-21 12:28:38
I have my random pools selecting from an autoplaylist of tracks that have never been played.

When I add some of these tracks into my random pool playlist, some tracks indicate as being played.

Is this because random pools merely looks for a track name in the playlist, but doesn't differentiate the actual non played track in the autoplaylist from an identical one appearing on another album which has already been played?

Regards,

trebordean.
Title: foo_random_pools
Post by: fbuser on 2011-04-21 16:10:08
I have my random pools selecting from an autoplaylist of tracks that have never been played.
No, you don't. Random pools is selecting always from the media library, never from a playlist.

Is this because random pools merely looks for a track name in the playlist,
No, it looks for the tracks in the library which matches your group and filter epressions.

but doesn't differentiate the actual non played track in the autoplaylist from an identical one appearing on another album which has already been played?
If you are using foo_playcount to determine wether a track was played or not, it's probably caused by the behaviour of this component to consider such kind of tracks to be identical. But without knowing more details (at least the group and filter expression) this is only a guess, which wouldn't actually explain, why already played tracks are selected at all.

Title: foo_random_pools
Post by: trebordean on 2011-04-22 17:57:40
fbuser,

Under the playlist patterns section, a dropdown list gives me all my playlists. I merely selected one of those.

I do use the playcount component.

Regards,

trebordean
Title: foo_random_pools
Post by: tpijag on 2011-04-22 18:20:13
Tracks are selected by whatever definition you provided in the ADD random pool dialog. If that definition does not filter out played tracks, you get played tracks.

The playlist patterns drop down section has noting to do with track selection.

From documentation
Quote
Autoadd - Playlist patterns: Various wildcard patterns separated by ; can be entered here for matching a playlist name. If the name of the currently playing playlist matches one of these patterns, entries from a random pool with a priority unequal to zero will be added to the playlist, if one of the following two conditions is true:
Title: foo_random_pools
Post by: e11 on 2011-05-10 22:53:19
Thanks for the reply. I got it now.
So basically All Pools is a lucky dip where you pick one pool from all the pools - which matches with the results I've been getting.

In which case I have a feature request.
Can you have a Run All Pools (except for those with a priority of 0) feature. This would be the equivalent of manually selecting each of the pools in the list.

Because so far what foo_random_pools can't do is provide a selection of tracks from a number of varied criteria, and this would allow for that, because you've made is easy to set the limits on each pool quite small (i.e. just a few tracks). So you can have a little of this, a little of that and a little of the other.

Cheers,

C.

Any news on this feature, would be ideal for creating streaming radio stations eg.. Having a pool for rock, pop and rap and having one track from each pool added to the playlist simultaniously, would be awsome
Title: foo_random_pools
Post by: carpman on 2011-05-11 11:09:49
I'm pretty much satisfied with foo_random pools in this regard. There is a way to get weighted random playlists but in a sense only on the fly. The way I do it is as follows:

I've got something like 30 queries, each selects only one track. These are added to a playlist called random, which updates when there are less than 3 tracks in it (there's a reason for that number -- i.e. if a pool yields no tracks which is possible then the playlist doesn't breakdown with no tracks to play, additionally if you make the number too large then the possibility of duplicate tracks increases).

So then you can adjust the probabilities.

Additionally, the use of Hotness as a variable %last_played% filter in conjunction with DAR (see here (http://www.hydrogenaudio.org/forums/index.php?showtopic=87111&view=findpost&p=747286)), comes in very handy as a way to filter in conjunction with foo_random_pools.

Hope that helps.

C.
Title: foo_random_pools
Post by: e11 on 2011-05-11 11:40:19
Mabey im miss understanding the settings but, i want 3 pools and one track from each pool to be added when there is only one track left in the playlist. As far as i can see tracks are only added from one pool at a time.

eg..

Title: Pop
Group: %LIBRARY%
No of Groups: 1
Filter: %GENRE% IS Pop AND %RATING% GREATER 3
No of tracks to add: 1
Priority: 1

I repeat this for Rap and rock so i have 3 pools, 1 for each genre, I would like autoadd to add one track from each pool when there is less than 1 item on the playlist.
Is this Possible?

Edit: i would also like the tracks to be added in the order that the pools appear in the pools list
Title: foo_random_pools
Post by: fbuser on 2011-05-11 21:41:33
Mabey im miss understanding the settings but, i want 3 pools and one track from each pool to be added when there is only one track left in the playlist. As far as i can see tracks are only added from one pool at a time.
Yes, this is basically correct. There is an easy but only manual solution: Assign to all relevant pools, which you have defined, the same keyboard shortcut. Another more complex solution, which adds more than one pool automatically, could be to utilize function on_playlist_items_removed(playlist, new_count) {} within foo_uie_wsh_panel_mod together with "Remove played tracks" from foo_playlist_attributes.
Title: foo_random_pools
Post by: e11 on 2011-05-12 06:59:18
Ha that works
thankyou very much
Title: foo_random_pools
Post by: Marc27 on 2011-06-08 04:43:12
@e11
You may want to check out foo_random, Randomized playlist entries (http://www.hydrogenaudio.org/forums/index.php?showtopic=36632&st=0) as well. From it's description "Pseudo-radio station that plays songs from your media library." Try adding more than one random playlist entry.
Title: foo_random_pools
Post by: fuffi on 2011-11-29 22:45:29
foo_random_pools is a foobar2000 component for creating random playlist  entries selected and grouped by various pool definitions.

Wow, this is a powerful tool. Thank you! Brings fun and forgotten music back to my life ;)

Just three feature requests:

1)
Inline Editing.
I double-click on the "0" on field "Priority" and can just edit the number, instead of opening the "Random pool" Window, change the priority and close the window again. Would save some time and will help to easy change priorities for testing purposes IMHO.

2)
I encountered, that if all entries have priority 0, the first entry of the list will be chosen automaticly, when plugin is called via autoadd.

Sometimes i don't want the plugin to do its job, so i'd like to disable it. there seems not to be an easy way to do this.
Might it be a way to add an
• active[/b] checkbox to each entry, so the user can enable/disable entries as he/she likes?
that way i could disable all entries and therefore your fine plugin would have some rest.

Or maybe a single
• Enable plugin[/b] Checkbox in the main config window?

3)
Duplicate an existing entry so i could easily add/change some settings without retyping (or copy&paste) all the settings from another entry.

cheers,
Title: foo_random_pools
Post by: ainz on 2011-12-22 22:47:28
I'm using this plugin to add whole albums as per mrinferno's example (http://www.hydrogenaudio.org/forums/index.php?showtopic=77460&view=findpost&p=713114).

I've got tracks in my library with ALBUM ARTIST set empty, e.g. white-labels that don't correspond to any release on Discogs. Because of the fallback behaviour of ALBUM ARTIST, these single tracks get picked by my album pool, and I don't want them to. I can't test if ALBUM ARTIST is not empty in the filter query, e.g. using NOT %ALBUM ARTIST% IS ? because of the fallback behaviour of ALBUM ARTIST which finds the track-level artist tag value instead.

Do I have to go tag all these rogue tracks with an ALBUM ARTIST value e.g. 'Unknown Album' and test against that, or remove their ALBUM ARTIST tags completely and test for %ALBUM ARTIST% PRESENT... or is there a better way of achieving what I want?

I'm thinking someone here has probably come across this problem already... TIA.
Title: foo_random_pools
Post by: fbuser on 2011-12-23 14:45:51
Use album artist PRESENT (withouth %)
Title: foo_random_pools
Post by: ainz on 2011-12-24 12:11:21
Use album artist PRESENT (withouth %)

Ah, I'd overlooked the remapping being optional, thanks.
This relies on single-artist albums all having ALBUM ARTIST set, and thus not relying on remapping though.
Title: foo_random_pools
Post by: ainz on 2011-12-26 10:34:52
Didn't explain myself well in that last post... for this to work as intended, ALBUM ARTIST would need to be explicitly set on single artist releases, contrary to the encouraged tag standards (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Encouraged_Tag_Standards)...
Title: foo_random_pools
Post by: ainz on 2011-12-26 11:42:46
Didn't explain myself well in that last post... for this to work as intended, ALBUM ARTIST would need to be explicitly set on single artist releases, contrary to the encouraged tag standards (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Encouraged_Tag_Standards)...

Ah, setting the group to %DIRECTORYNAME% does the trick.

This is a good component, it's got me listening to stuff I'd long forgotten!
As stated by someone previously, checkboxes to enable/disable pools individually would be handy.
Title: foo_random_pools
Post by: delusion on 2012-01-16 22:38:39
hey there, thanks for this nice plugin.

could someone give me a tipp, what's wrong with my filter expression shown below.
i try to add 200 tracks, max 1 per album and limited to NOT PLAYED DURING LAST 4 DAYS.
But with my used filter expression, it doesnt work. the expression for NOT PLAYED DURING LAST 4 DAYS is not been considered.

Group: %album%
Filter: (%path% HAS "\COLLECTION\") AND ((%genre% IS Electronic) OR (%genre% IS Dance) AND NOT (%last_played% DURING LAST 4 DAYS))
Sort: $rand() Sort/LimitEachGroup: Checked Hope someone could help me out with this. Thanks for this awesome plugin! fb2k is what you make of it! greets, dls Title: foo_random_pools Post by: carpman on 2012-01-17 01:16:10 Filter: (%path% HAS "\COLLECTION\") AND ((%genre% IS Electronic) OR (%genre% IS Dance) AND NOT (%last_played% DURING LAST 4 DAYS)) Should be: Code: [Select] (%path% HAS "\COLLECTION\") AND ((%genre% IS Electronic) OR (%genre% IS Dance) AND (NOT %last_played% DURING LAST 4 DAYS)) assuming you want: files where path has collection and genre is either electronic or dance and the files have not been been played in the last 4 days. C. Title: foo_random_pools Post by: carpman on 2012-01-18 01:38:07 Actually thinking about it, your method may only apply "NOT %last_played% DURING LAST 4 DAYS" to "%genre% IS Dance". So you probably want to bundle the %genre% stuff together but not nest the %last_played%, like so: Code: [Select] (%path% HAS "\COLLECTION\") AND (%genre% IS Electronic OR %genre% IS Dance) AND (NOT %last_played% DURING LAST 4 DAYS) C. Title: foo_random_pools Post by: delusion on 2012-01-26 21:06:09 thanks a lot, carpman! this was the fault. i'm not that experienced with coding... just for foobar-purposes. Title: foo_random_pools Post by: delusion on 2012-02-12 22:08:09 another question regarding my upper posting... how could i change the settings to add 720 minutes of Tracks instead of an amount of 200? Title: foo_random_pools Post by: -AdZero- on 2012-04-27 06:22:10 Hi ! I have some pools configured as below : (http://img220.imageshack.us/img220/5985/foorandompools1.png) When there is no group returned by the first pool (because the is no more match) with priority 100, nothing is added to my playlist. I think the problem will be the same when an other pool will be empty. Can you confirm that's the intended behavior ? Is there a way to automatically switch to an other pool when the one chosen with priorities returns nothing ? If not, is it possible to add this feature ? Thank you. Title: foo_random_pools Post by: fbuser on 2012-04-27 19:57:17 [quote author=-AdZero- link=msg=793742 date=1335504130]Can you confirm that's the intended behavior? Is there a way to automatically switch to an other pool when the one chosen with priorities returns nothing ? If not, is it possible to add this feature ?[/quote]That's funny. I recently stumbled also over this behaviour and changed it already. An updated version, which covers this together with a bugfix is available. Title: foo_random_pools Post by: -AdZero- on 2012-04-30 07:51:33 Thanks for the update. Unfortunately the problem still occurs. Each pool is configured to return one album based on some filters (based on %added% and %play_count% values). When I delete the content of my targeted playlist, a new album is added or it is left blank (seems like the first pool has been chosen). Let me know if you want more details. Title: foo_random_pools Post by: fbuser on 2012-04-30 19:11:35 [quote author=-AdZero- link=msg=793985 date=1335768693]When I delete the content of my targeted playlist, a new album is added or it is left blank (seems like the first pool has been chosen).[/quote]I can't confirm this. Works perfectly here. [quote author=-AdZero- link=msg=793985 date=1335768693]Let me know if you want more details.[/quote]Did you actually update to the latest version (0.1.1)? Is it ensured, that at least one pool with priority != 0 returns a result? What are your pool definitions? Note: Depending on your library size it might need some seconds, before a pool with lower priority will be added to the playlist. Title: foo_random_pools Post by: -AdZero- on 2012-04-30 20:55:48 Did you actually update to the latest version (0.1.1)? I have missed something... I used components update check to update but I haven't checked the version after restart. Now I have checked and the displayed version of the component is still 0.1.0. I tried a manual update with the zip file but it's the same version number displayed. Is it ensured, that at least one pool with priority != 0 returns a result? Yes, it's absolutely sure. If I change the priority of my pool with no results (the first one) to 0, the target playlist is always filled. What are your pool definitions? Group : %album artist%-%album% Filter : %play_count% MISSING OR %play_count% IS 0 Priority : 100 Group : %album artist%-%album% Filter : %play_count% IS 1 AND NOT %last_played% DURING LAST 4 DAYS Priority : 50 Group : %album artist%-%album% Filter : %play_count% GREATER 1 AND %added% DURING LAST 60 DAYS AND NOT %last_played% DURING LAST 4 DAYS Priority : 10 Group : %album artist%-%album% Filter : %path% HAS "Audiothèque" AND %filename_ext% HAS ".flac" AND %added% DURING LAST 365 DAYS Priority : 30 Title: foo_random_pools Post by: fbuser on 2012-04-30 22:08:29 [quote author=-AdZero- link=msg=794049 date=1335815748] Did you actually update to the latest version (0.1.1)? I have missed something... I used components update check to update but I haven't checked the version after restart. Now I have checked and the displayed version of the component is still 0.1.0.[/quote]Aargh. I tried to upload the archive as fb2k-component-archive, which was rejected, but I didn't notice the relevant error message. Now, the latest version is actually uploaded. Title: foo_random_pools Post by: D.Sync on 2012-05-14 19:13:16 The concept for this plugin is great. I had the following setting set to create a playlist with a mixture of Doujin from Final Fantasy and Chrono Trigger, but when go to File > Random Pools > All Pools nothing seemed to happen? Can anyone explain the basic behaviour of this plugin? (http://i179.photobucket.com/albums/w306/DeoxySynchro89/th_03May150210.jpg) (http://s179.photobucket.com/albums/w306/DeoxySynchro89/?action=view&current=03May150210.jpg) Edited: Well it seemed that I will have to manually click the Pool name instead of All Pool for it to work. Title: foo_random_pools Post by: Andreasvb on 2012-05-14 20:22:23 The concept for this plugin is great. I had the following setting set to create a playlist with a mixture of Doujin from Final Fantasy and Chrono Trigger, but when go to File > Random Pools > All Pools nothing seemed to happen? Can anyone explain the basic behaviour of this plugin? (http://i179.photobucket.com/albums/w306/DeoxySynchro89/th_03May150210.jpg) (http://s179.photobucket.com/albums/w306/DeoxySynchro89/?action=view&current=03May150210.jpg) Edited: Well it seemed that I will have to manually click the Pool name instead of All Pool for it to work. Set Priority higher than 0. Title: foo_random_pools Post by: D.Sync on 2012-05-15 06:13:11 The concept for this plugin is great. I had the following setting set to create a playlist with a mixture of Doujin from Final Fantasy and Chrono Trigger, but when go to File > Random Pools > All Pools nothing seemed to happen? Can anyone explain the basic behaviour of this plugin? (http://i179.photobucket.com/albums/w306/DeoxySynchro89/th_03May150210.jpg) (http://s179.photobucket.com/albums/w306/DeoxySynchro89/?action=view&current=03May150210.jpg) Edited: Well it seemed that I will have to manually click the Pool name instead of All Pool for it to work. Set Priority higher than 0. Gee thanks. I really did overlooked that part. Title: foo_random_pools Post by: D.Sync on 2012-05-15 11:20:19 BTW is there any way to add the Random Pool into the Context Menu? E.g. right click on an empty playlist, then select the Random Pool to add. I had created a bunch of Random Pools and just hate to go to the File menu > Random Pools > Selection just to add it to the playlist. I thought of assigning keyboard shortcut but it's not too viable to assign each to every pool. Title: foo_random_pools Post by: q-stankovic on 2012-06-03 20:48:57 Hi fbuser, could you explain what the new option "Filter with the content of target playlist" exactly do? I understood the help-file that just duplicate files would be removed - no more, no less! Right? Will the removed tracks be replaced by others? Title: foo_random_pools Post by: fbuser on 2012-06-03 21:09:44 The use of "removed" might be a little bit misleading here, although filtering is just removing certain parts from a total quantity. But using remove in this sense, the answers for the last two questions are: Yes, No. Title: foo_random_pools Post by: richard123 on 2012-07-06 21:53:08 I'd like to create a playlist of randomly chosen albums, not more than 1000mb in total size, from the playlist named PL2. I can do everything other than restrict the chosen albums to those in PL2. Is there some way to do this? Group: %album% Number of groups: 999 Number of MBs: 1000 Limit after sorting: checked everything else unchecked, empty or 0 Title: foo_random_pools Post by: Skelington on 2013-02-13 15:12:24 I realise this is an old thread but I've just discovered Random Pools and think it has great potential. I wondered if anyone could help me set it up to create a playlist, in reverse order of the date I added the album to the PC, so the last album appears first in the list and runs for my entire library. My library is on a network so it would be handy to know how to set it up so that both networked PC's (running Foobar) had the same setup as the host PC. I've seen this added to a 'skin' but never managed to work out how it was done (it wasn't via Random Pools but I thought this would be able to recreate it) Help would be much appreciated. S. Title: foo_random_pools Post by: fbuser on 2013-02-13 19:00:59 I wondered if anyone could help me set it up to create a playlist, in reverse order of the date I added the album to the PC, so the last album appears first in the list and runs for my entire library. foo_random_pools is the wrong tool for this purpose. You should create an autoplaylist to get what you want. See here (http://www.hydrogenaudio.org/forums/index.php?showtopic=94733). Title: foo_random_pools Post by: Skelington on 2013-02-13 21:44:36 I wondered if anyone could help me set it up to create a playlist, in reverse order of the date I added the album to the PC, so the last album appears first in the list and runs for my entire library. foo_random_pools is the wrong tool for this purpose. You should create an autoplaylist to get what you want. See here (http://www.hydrogenaudio.org/forums/index.php?showtopic=94733). Really? That's a shame - I thought this would finally be the tool for the job :[ Particularly because I want to organise them by the date the mp3 was created not the date it was added to Foobar - because that would be redundant if I reinstalled the PC (which I have) so all the tracks were added on the same day. I don't really understand how to use Random Pools properly, I've basically messed about with it and tried to find functions through trial and error - I don't find the documentation particularly friendly. I tried a previously posted entry to add and play random albums but it ended up just listing those tracks which I'd rated 5. -_X Cheers for the reply. Title: foo_random_pools Post by: db1989 on 2013-02-13 22:15:47 I want to organise them by the date the mp3 was created not the date it was added to Foobar As a search will reveal, date of creation has been requested numerous times but remains inaccessible, for reasons that have been explained IIRC. The closest thing you get is %last_modified% (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference#.25last_modified.25). That still does not require foo_random_pools, so, as fbuser said, your request is not relevant. You clearly want a specifically ordered list, the opposite of random. As for the apparent problem with playing random albums, I guess that’s one of the perils of trying to adopt prefabricated solutions from other users! I suspect that the person who originally posted it is the most relevant to ask, although perhaps fbuser might be familiar with the relevant pattern. Title: foo_random_pools Post by: Skelington on 2013-02-14 11:58:25 You clearly want a specifically ordered list, the opposite of random. As for the apparent problem with playing random albums, I guess that’s one of the perils of trying to adopt prefabricated solutions from other users! I suspect that the person who originally posted it is the most relevant to ask, although perhaps fbuser might be familiar with the relevant pattern. Someone once said, you have to know how to do something very well before you can pervert it's use with any efficiency ;] With regards to random album. the post was in this very thread, however I have actually managed to get it to display entire albums now. I've still not figured it out properly though as it only 'posts' one album per click and I have a couple of thousand so clicking them would give me RSI - I suspect the error lies in 'population' but can't figure out which. Again, cheers for the reply though. Title: foo_random_pools Post by: fbuser on 2013-02-14 19:28:19 With regards to random album. the post was in this very thread, however I have actually managed to get it to display entire albums now. I've still not figured it out properly though as it only 'posts' one album per click and I have a couple of thousand You can increase the number of groups for the relevant pool to add more than one album. But unless it is no problem for you to block your foobar2000 for a while, you should not increase this number too much. Title: foo_random_pools Post by: Hbsnail on 2013-05-02 18:28:19 I want to add some random tracks from one playlist to a new playlist what should i do? sorry for my poor english Title: foo_random_pools Post by: fbuser on 2013-05-02 20:56:25 I want to add some random tracks from one playlist to a new playlist This is not possible. The source for a pool is always the media library, which can be filtered by the filter expression for the relevant pool. Title: foo_random_pools Post by: Bodhi on 2013-05-30 18:05:16 Hi Can you tell me why the following filter is working: %genre% IS Classical and not this one: %genre% IS NOT Classical ? (invalid filter type) Thanks again for this great job Title: foo_random_pools Post by: BenB on 2013-05-30 18:41:05 Try: Code: [Select] NOT %genre% IS classical Title: foo_random_pools Post by: Bodhi on 2013-05-30 18:48:37 Try: Code: [Select] NOT %genre% IS classical Youhouuuuuuuu That's it, thanks Title: foo_random_pools Post by: wozza on 2013-07-01 03:05:46 Could someone please help me. I can't get this plugin to do anything. I have hundreds of albums. They are all properly tagged and in folders. They are all in one huge playlist called "Albums". I want to play albums in a random order. I don't like the "shuffle albums" option because the albums are played in the same order. This option shuffles the order changes when I restart foobar, but I want a random album to come on whenever an album is finished. So if I play the last track of an album, the next track is the first track of another album. If I play that last track again, this time I hear the first track from a different album. Is this what the plug in is for? The plug-in is installed. I can see an entry for it in the File menu and in the preferences windows. I've clicked the Add button, created a pool called "RandomAlbums", and for group I've put "%album%". I've left everything else at the defaults. To be honest, I haven't a clue what any of these other options mean. So in the list in the preferences, now I can see: Name: RandomAlbums Priority: 0 Group: %album% Group count: 1 The Autoadd box has my playlist name "Albums" listed as an option, so I leave that selected. The other two boxes, for an "Add" number, I've left at their default, 0. Click OK. But what now? It doesn't seem to do anything. In the foobar menu, Playback->Order is default. Is that right? But songs are just being played in the order they are in the window. There is a menu option File->Random Pools that has three options, All Pools, RandomAlbums, More. Clicking the RandomAlbums options doesn't seem to have any effect at all. I feel like I must have missed a step. Title: foo_random_pools Post by: tpijag on 2013-07-01 03:24:41 Can't offer specific help, but if you really have no idea as to the various options, you might of missed the .html documentation that comes with the component. Hopefully that may help some. Title: foo_random_pools Post by: wozza on 2013-07-01 03:31:34 my preferences dialog and my random pool dialog look exactly as they are on the html documentation http://www.palm-internet.eu/foobar2000/com...pools_help.html (http://www.palm-internet.eu/foobar2000/components/foo_random_pools/foo_random_pools_help.html), except for the autoadd playlist patterns, he has "Random*;Main". I assume his playlist is called Main, not sure why he has "Random*", or if it matters to me. Foobar is behaving as if it completely ignores this plug-in. How do I get it to actually take effect? Title: foo_random_pools Post by: wozza on 2013-07-01 03:49:44 ok, I think I figured it out. clicking my pool name "Random Albums" on the file->random pools menu added a random album to the bottom of my playlist. It seems this is a tool for building a playlist. But it isn't what I want. I have a predefined playlist. I want to play random albums from that list. So, play song 1 from an album, play the album through to song the last, then choose a random album from the playlist and play song 1 from that. Shuffle albums doesn't do this. Playing the last song from an album, you will always get the first song from the same next album. anyone have any ideas on how I can get what I want. Title: foo_random_pools Post by: tpijag on 2013-07-01 04:02:53 EDIT based on your above text, you may ignore all that follows Keep in mind this is a down and dirty explanation. I have never used the component till right now. Don't believe you will get exactly what you are looking for. That is, playing a previous 'last' track to an album and then have the subsequent album added by the component change. OTOH, once you get it to work, you may find a use for it. Add a playlist named whatever. Add whatever to random_pools config. Keep in mind if you have followed his html exactly you are filtering on rating. may cause troubles if you do not use rating. Delete it for now. In the config where you have add when 20 items remain, also put 20 in the next add option. Save Go to your whatever playlist. Click in the empty playlist. File>random pools>whatever. you should get a random album inserted. When there are less than 20 items [if for instance you have the playlist to automatically remove played items] or when you start playing a track 20 from the end of the playlist, a new album will be added. For your specific use, i would set both the add options to 1. then when you played to last track, a new album will appear. If you good back to that previous track a new random album will not appear. However a quick delete of the last added album will then be replaced with a new album. good luck. hope i have not made it worse. Title: foo_random_pools Post by: tpijag on 2013-07-01 04:11:01 From your initial post, all albums are in your playlist. if this is the case random_pools may very well do what you want. As you are using it, it is populating your playlist with extra copies of your albums. Use a different blank playlist as I mention above and you may find it gets your towards what you want. Title: foo_random_pools Post by: BenB on 2013-07-01 04:17:58 Shuffle albums doesn't do this. Playing the last song from an album, you will always get the first song from the same next album. Hmm... Shuffle (albums) doesn't behave the way you describe when I use it. I'm trying to get it to do what you say it does when you use it, but it randomly plays an album for me no matter what I do. Are there any other details you can give that might enable me to reproduce the behavior? Shuffle (albums) does for me what you say you're wanting. Title: foo_random_pools Post by: richard123 on 2013-07-26 16:19:25 Feature request: Do not add songs that are included in a named playlist. If appropriate, I could first write the other playlist to a file. Thanks Title: foo_random_pools Post by: amiti on 2013-09-30 23:58:56 I am trying to create playlists with different type of content. Is it possible to link pools per playlist? Title: foo_random_pools Post by: carpman on 2013-10-01 04:55:39 Isn't this the function of auto-playlists? Or do you still require the random element? Creating an auto-playlist, playing in shuffle mode and having something like ... "AND (NOT %last_played% DURING LAST 7 DAYS)" to dynamically filter out recently played tracks; would this simulate what you are after? C. Title: foo_random_pools Post by: amiti on 2013-10-01 18:57:02 I know about auto-playlists but this is not always a good solution. I understand currently it isn't possible to set a pool (or pools) per playlist. Title: foo_random_pools Post by: 322 on 2013-11-22 13:09:05 I’ve just discovered this plugin that might do what I need, but I don’t want to define any specific pool, I just want the plugin to generate a playlist of random entries from the entire library. How do I do that? Title: foo_random_pools Post by: BenB on 2013-11-22 15:46:50 You still have to define a pool, and foo_random_pools will pick from your entire library unless you enable filtering for the pool. I'll give you a simple pool for you to start off. Go to File > Random pools > More... This will open up foo_random_pools preferences page. Now click on the Add... button. In the dialog that opens, do the following (leave any unmentioned settings as they are): In the "Name:" box, enter Artists. In the "Group" box, enter %artist%. In the "Number of groups to add:" box, enter 20. Tick the "Filter with the content of the target playlist" box. (This will prevent duplicate artists from being added if they are already present in the playlist). In the "Number of tracks to add:" box, enter 1. Make sure the "Sort/limit each group" box is ticked. Now click on OK to close the dialog, and then click on Apply and OK to close the preferences dialog. Now you can go to File > Random pools > Artists, which will add 1 track from 20 random artists in random order to the playlist. (I suggest using an empty playlist; otherwise, it might be difficult to notice if any tracks were added since the artist may already be present in the playlist.) You can increase the 20 to however many artists you want foo_random_pools to add, but you can just go to File > Random pools > Artists as many times as you want to keep adding random tracks without duplicating artists. You can also increase the 1 if you'd like more than one track from each artist. Title: foo_random_pools Post by: 322 on 2013-11-22 18:45:30 Thanks for the instructions. They work fine except they don’t select any songs with an empty "Artist" field... Title: foo_random_pools Post by: BenB on 2013-11-22 19:21:01 You could set up another pool with the same settings but use$directory_path(%path%) (which doesn't depend upon any tags whatsoever) for the Group box, but it's been my experience that there will be dupes from the same directory which I'd think shouldn't happen. Not a lot but some.

The key is to otherwise use a field that represents an actual group of tracks, i.e. %artist%, %album%, %album artist%, %genre%, $year(%date%), etc. You do not want to use fields such as %filename% or %title%, for example. Title: foo_random_pools Post by: 322 on 2013-11-23 12:42:47 Thanks for the tips. It seems like %path% group will only add as many entries as you indicate in "Number of groups to add". But I need to restrict it by the size on disc, and not by number of tracks. I experimented a bit and discovered a parameter that seems to encompass every track in the library – %list_index%. Using the filter field, I have a full control over which tracks are being added. There is, however, something I don’t fully understand. Browsing this topic I discovered operators like "NOT", "IS", "GREATER" etc. I can’t find any list of them and I don’t completely understand the sytax. Title: foo_random_pools Post by: BenB on 2013-11-23 21:40:46 It seems like %path% group will only add as many entries as you indicate in "Number of groups to add". This is because each file's path is unique. To state it simply, two files cannot have the same path. Thus a group based on %path% can only have a quantity of 1 (and this is also true of %list_index%). The generated playlist can only contain as many tracks as the number of groups stipulated (regardless of the number of tracks specified). A scenario such as this is why I previously suggested you not use title formatting that doesn't represent a group of tracks. I experimented a bit and discovered a parameter that seems to encompass every track in the library – %list_index%. Using the filter field, I have a full control over which tracks are being added. Files can only have a %list_index% when they are in a playlist, and to be quite honest, I don't think this component accesses it. foo_random_pools can generate a playlist using %list_index% even when the playlist is empty, which shouldn't be possible AFAICT. Previously I had experimented with this component and found that whenever a nonexistent/inaccessible field is stipulated for Group, foo_random_pools seemingly defaults to some built-in way of choosing tracks (this would be something to ask the developer). This is what I think is happening with %list_index%, too. So, you might be correct in the sense that specifying a nonexistent field encompasses the entire library, but I wouldn't be certain of having "full control." There is, however, something I don’t fully understand. Browsing this topic I discovered operators like "NOT", "IS", "GREATER" etc. I can’t find any list of them and I don’t completely understand the sytax. A query syntax reference can be found here (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Query_syntax). There is also a html reference bundled in your foobar2000 directory that can be accessed from foobar in various places which opens in your browser. Title: foo_random_pools Post by: fbuser on 2013-11-23 22:12:41 whenever a nonexistent/inaccessible field is stipulated for Group, foo_random_pools seemingly defaults to some built-in way of choosing tracks (this would be something to ask the developer). This is what I think is happening with %list_index%, too. As %list_index% is not defined in the context, which is used by foo_random_pools, the result of evaluating it is the same as for all other non-existing tags: ? (just a question mark). Due to this the whole library will be considered as one big group. Title: foo_random_pools Post by: 322 on 2013-11-24 11:15:12 Quote A query syntax reference can be found here. Thanks! It’s what I was looking for. Quote Due to this the whole library will be considered as one big group. So basically any context-specific field would generate a random list of entire library. Title: foo_random_pools Post by: fbuser on 2013-11-24 20:54:12 So basically any context-specific field would generate a random list of entire library. A context specific field is just a non-existing field in this case. So, you could also use for example %entire library%, which is much more meaningful for your purpose than an arbitrary context specific field. And no, you don't get a random list of the entire library. You get just a list of the entire library in an unpredictable but reproducible order. If you need a really randomized playlist of your entire library, just go in the menu to Library -> Search, type in ALL as search query, mark all entries in the "Library Viewer Selection" playlist and go in the menu to Edit -> Sort -> Randomize Title: foo_random_pools Post by: mjm716 on 2014-01-17 19:57:32 I'm looking for a solution to filter from an existing playlist, e.g.: %_playlist_name% IS Facet selection is that possible? What I'm trying to do is pull random tracks from my current selections and add to a playlist. Title: foo_random_pools Post by: eye2i on 2014-02-17 01:05:37 I haven't been this excited over my audio library experience since a couple of years back, prior to finding foobar2000, i was using MediaMonkey with it's similar feature --but eventually leaving it for what i like more about foobar2000 --except for not having what this component now finally gives me back! I joined the forum just now just to be able to say "thank you!" to the component author (but also, to the many who have shared tips, pointers, and explanations! --that i was floundering around a bit before finding 'em). Finally i can filter my media library from foobar2000 and not have to fiddle with the actual files/tags, and all according to my moods! (e.g. no more loading of "AlbumWrap" files when i'm in the mood for more of a "radio" play/variety) The only thing i'd appreciate a further clarification of is the "All pools" feature, regarding its specific function. My guess is, that when selected, one of the specific pools is used to load the playlist first, then subsequently according to personal settings, the next pool is selected from and files added to the playlist from it, and so on...? Or are they supposed to be merged on that initial manual load as well? --assuming merging of pools is what the feature is about in the first place? Thanks again for the awesome component (and the forum assistance, especially considering us coding noobs/wannabes)! Title: foo_random_pools Post by: carpman on 2014-02-17 04:03:15 I was similarly confused by this some time ago, hopefully this and the few subsequent posts helps: http://www.hydrogenaudio.org/forums/index....st&p=704106 (http://www.hydrogenaudio.org/forums/index.php?showtopic=77460&view=findpost&p=704106) C. EDIT: ps. I got it to do what I wanted (a "dynamic" weighted random playlist) with this method (in case it helps): http://www.hydrogenaudio.org/forums/index....st&p=755427 (http://www.hydrogenaudio.org/forums/index.php?showtopic=77460&view=findpost&p=755427) Title: foo_random_pools Post by: eye2i on 2014-02-17 20:14:29 Thanks, carpman. My next snag is with regards to including a specific syntax to filter by song/album duration (playing time/song length). I would like to filter albums to be within a specified duration range. For example, to have no songs/albums shorter than 01:00 (1min) but also not longer than 07:30 (7mins30secs) in duration? Or to cap the duration e.g. to filter so as to have no playing times longer than 12mins? Title: foo_random_pools Post by: BenB on 2014-02-17 22:23:27 You can filter for track duration but not for album duration. Query syntax is only applicable to individual tracks, not for groups or collections of them (the same is true with title formatting as well). The only way you could filter for album length would be to add a tag containing that info which you could then use to filter with. Title: foo_random_pools Post by: eye2i on 2014-02-18 01:44:55 You can filter for track duration but not for album duration. Query syntax is only applicable to individual tracks, not for groups or collections of them (the same is true with title formatting as well). The only way you could filter for album length would be to add a tag containing that info which you could then use to filter with. #apologies. i thought i was helping in my attempt to pick up on what i thought to be product/component specific lingo. I do only want to select for songs/audio tracks. (I'm also already or simultaneously filtering to not include Album/AlbumWrap per title/artist/etc; "album" here meaning multiple tracks within a single file; but being a prog-rock/symphonic rock/etc fan, i still have many single tracks that are way over the typical radio/dj play length of 3-6 mins) To restate it: Could someone share with me, assuming it's possible to do the filtering, a specific syntax that will filter a pool by song/track duration aka playing time/song length? I would like to filter tracks in a pool to be within a specified or restricted duration range. For example, to have no songs/tracks shorter than 01:00 (1min) but also not longer than 07:30 (7mins30secs) in duration? Or to cap the duration e.g. to filter so as to have no playing times longer than 12mins? Title: foo_random_pools Post by: carpman on 2014-02-18 02:06:06 Say you wanted to only select for songs between 1 min and 7 mins 30 secs: under Filter: Code: [Select] (%length_seconds% GREATER 59) AND (%length_seconds% LESS 451) Look at the Query Syntax (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Query_syntax). C. Title: foo_random_pools Post by: eye2i on 2014-02-22 22:03:03 #gratitude, carpman~ Title: foo_random_pools Post by: eye2i on 2014-02-27 20:14:30 Code: [Select] (%length_seconds% GREATER 59) AND (%length_seconds% LESS 451) Ok, after some trial, i can't get this to actually work for me. (that is the idea of what i want to accomplish though) Is it possible that instead of "length", i could use "duration" somehow? (i have a Duration tag column in my playlist, which displays playing time/song length) Any other ideas? Quote Look at the Query Syntax (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Query_syntax). Thanks for both the resource and the link here to it (tho i had spotted it earlier and visited it prior). i don't know if it's my dyslexia or what, but that page tends to quickly run all together on me and i can't make much heads or tails out of it. (fwiw, i do have pools selecting on other items/options e.g. genre/NOT genre) Title: foo_random_pools Post by: carpman on 2014-02-27 21:26:25 Go to: Main menu > Library > Search and paste: Code: [Select] (%length_seconds% GREATER 59) AND (%length_seconds% LESS 451) into the Media Library Search Box. What results do you get? C. Title: foo_random_pools Post by: eye2i on 2014-02-27 23:41:29 Go to: Main menu > Library > Search and paste: Code: [Select] (%length_seconds% GREATER 59) AND (%length_seconds% LESS 451) into the Media Library Search Box. What results do you get? C. Interesting. Rather than your specifics, to make it easier to inspect, i used: Code: [Select] (%length_seconds% GREATER 120) AND (%length_seconds% LESS 179) And sure 'nuff, it filtered songs within those parameters. And assuming, that if it works there, it should within random_pools, i tested it in random_pools with a test pool setup, with that as the only Filter entry --and sure enough, it worked there as well. My bad for not thinking to do a test pool with just the time filtered (instead of adding it to what i already had). Thanks for confirming that it does work! Thus i've obviously got a conflict going with the syntax i'm entering and using in conjunction with it as my other filtering. I'll do some further examination of my filtering combinations. I really appreciate the help, C-mahn! Title: foo_random_pools Post by: BenB on 2014-02-28 00:12:11 When you used that filter in combination with other filters, were the filters all joined (with AND, etc.) or were you trying to use filters with each one on its own line? Whichever one you did try, try doing the other. I'm not sure the latter way would even work. Title: foo_random_pools Post by: carpman on 2014-02-28 11:09:15 When combining queries you should use brackets, like so: (QUERY 1a OR QUERY 1b) AND (QUERY2) AND (QUERY3) This will yield results matching: 1a AND 2 AND 3, or 1b AND 2 AND 3 Here's an example of combining the code with some other query: Code: [Select] ((%length_seconds% GREATER 59) AND (%length_seconds% LESS 451)) AND (%play_count% LESS 4) Actually you don't need the brackets in the first query (I used them to make the query clearer as to what it was doing) so this will work: Code: [Select] (%length_seconds% GREATER 59 AND %length_seconds% LESS 451) AND (%play_count% LESS 4) Notice the first AND is really part of the first query, the second AND is combining an additional query (see below Query 1 in red, query 2 in blue): (%length_seconds% GREATER 59 AND %length_seconds% LESS 451) AND (%play_count% LESS 4) C. Title: foo_random_pools Post by: elia_is_me on 2014-07-18 03:33:31 Encounter some trouble. I set up a pool, and set the filter to make it collect NO TRACKS from the media library, just like: Name: Test Group: %path% number of groups to add: 1 number of tracks to add: 2 Filter: %path% HAS "JustTest" and when I want to add some tracks from this pool, it crashes... which means if you set up a pool, you must ensure that it contains tracks, otherwise it will crash. Title: foo_random_pools Post by: fbuser on 2014-07-18 19:31:02 I cannot reproduce this. Can you provide me the crash report. Just upload the relevant failure_000xxxx.dmp and failure_000xxxx.txt files to a one click hoster and send me the link via PM. Title: foo_random_pools Post by: shooftie on 2014-09-03 19:05:36 I'm struggling to get my head around this... I want to generate a playlist or random songs from my entire library but I want the playlist: • To be of 140GB in size • To be comprised half single tracks and half long sets/mixes • Not to comprise of too many songs of a single artist Based on BenB's response (Nov 22 2013, 16:46) I have managed to get the plugin to return a specific number of tracks but to return as many as is needed to fulfil the quota (140GB). Nor have i been able to get it to return half single track and half sets... settings: http://i.imgur.com/8NEECcM.png (http://i.imgur.com/8NEECcM.png) http://i.imgur.com/3xZBnbH.png (http://i.imgur.com/3xZBnbH.png) What is it that I am missing? (I have read the docs AND this thread) Title: foo_random_pools Post by: BenB on 2014-09-03 21:02:26 Increase the value in the box for "Number of groups to add:" for both of your pools. Also, for your Artist pool, you could add a "Filter" of NOT %path% HAS mixes. And also for your Mixes pool, you should change your "Group" to %artist% or at least %title% and change the "Filter" to %path% HAS mixes. Make sure you're using valid title formatting (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference) and query syntax (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Query_syntax). Title: foo_random_pools Post by: shooftie on 2014-09-05 10:18:49 Wicked... I understand that and am getting better results. However, I seem to be getting loads of the same artist. Have I misunderstood the function of the plugin? Can I not gather an even spread of artists? Title: foo_random_pools Post by: BenB on 2014-09-05 23:20:02 Re-read the documentation (http://www.palm-internet.eu/foobar2000/components/foo_random_pools/foo_random_pools_help.html), esp. the Limits section. Title: foo_random_pools Post by: gentoosiast on 2015-02-11 08:36:28 Can't update to version 0.1.4: Could not load component "c663b5e2c5857822a8d97aafe925ce52a35a354d.zip": Unsupported format or corrupted file Title: foo_random_pools Post by: fbuser on 2015-02-11 17:52:15 Can't update to version 0.1.4: Could not load component "c663b5e2c5857822a8d97aafe925ce52a35a354d.zip": Unsupported format or corrupted file Sorry, but currently you have to download and install the component manually. (http://www.hydrogenaud.io/forums/index.php?s=&showtopic=108318&view=findpost&p=889815)[/s] It should now work normally again. Title: foo_random_pools Post by: ScribeOfTheMist on 2015-04-04 17:45:29 I'm not sure if this component is still actively being developed, but if so, is there any chance of getting a setting on the main page that would trigger the generation of new pools by length of the playlist rather than size or position? This was an option that used to exist on the original playlist tree component. I.e., I want the component to add new pools when the playlist length is, for example, under 60 minutes. My library contains wildly varying track lengths so the same number of tracks can be 45 minutes or 90 minutes depending on luck. On the other hand if there's already a way to do this through clever queries then I would appreciate if someone could give me a hint. If not, no big deal, I have been happily using this component for several years and am very thankful to the developer, it's the best "auto DJ"-type code I've ever seen in any program. Title: foo_random_pools Post by: fbuser on 2015-04-05 08:42:14 I'm not sure if this component is still actively being developed, but if so, is there any chance of getting a setting on the main page that would trigger the generation of new pools by length of the playlist rather than size or position? Since some years I have plans to extend the component with some functionalities, but due to a lack of time, I couldn't realize them so far. However, I found some spare time and added the feature you requested. Just update the component with the update function of foobar2000. Title: Re: foo_random_pools Post by: jazzthieve on 2016-03-02 19:25:47 So I'm trying my hand on this component for the first time and I'm sure there's something I'm doing wrong here but it doesn't seem to do anything even with the most basic of terms I use. So I have this; Name: Progressive Rock Group: %album% Number of tracks to add: 50 Number of minutes to add: 200 Number of MBs to add: 0 Filter: %genre% IS Progressive Rock Sort: %path_sort% Filter with the content of the target playlist: unchecked Sort / Limit each group: unchekced Priority: 1 Autoadd Playlist patterns: test Add. when playlist has X items or less: 10 Add. when the playlist duration is X minutes or less: 0 Add. when the playback positions is X items or less from the end: 0 I would expect for the Test playlist to be filled with a random number of albums filtered on Progressive Rock but the result is nothing. It doesn't fill the playlist at all. Can someone give some hints as to what I'm doing wrong here. Title: Re: foo_random_pools Post by: -AdZero- on 2016-03-03 07:07:49 Hi. Is your profile working when you try it manually via File/Random Pools/Progressive Rock when Test playlist is active ? If yes, try to delete some items to have 10 or less in order to see if autoadd is working. If no you'll have to dig a little more... ::) So I'm trying my hand on this component for the first time and I'm sure there's something I'm doing wrong here but it doesn't seem to do anything even with the most basic of terms I use. So I have this; Name: Progressive Rock Group: %album% Number of tracks to add: 50 Number of minutes to add: 200 Number of MBs to add: 0 Filter: %genre% IS Progressive Rock Sort: %path_sort% Filter with the content of the target playlist: unchecked Sort / Limit each group: unchekced Priority: 1 Autoadd Playlist patterns: test Add. when playlist has X items or less: 10 Add. when the playlist duration is X minutes or less: 0 Add. when the playback positions is X items or less from the end: 0 I would expect for the Test playlist to be filled with a random number of albums filtered on Progressive Rock but the result is nothing. It doesn't fill the playlist at all. Can someone give some hints as to what I'm doing wrong here. Title: Re: foo_random_pools Post by: jazzthieve on 2016-03-03 11:16:13 Yes, if I do that that it seems to fill the playlist. However, I can see no automatic adding (or removal) of tracks. I played around a bit and I would expect if the filter indicates %play_counter% IS 0 that as soon as it's changed to 1 it would automatically remove it from the playlist. Not happening, in fact the way it functions now I would have to manually remove the played tracks and then fill the playlist again by manually filling it by clicking file - random pools. Title: Re: foo_random_pools Post by: -AdZero- on 2016-03-03 12:21:57 This plugin won't remove any played track from your playlist. What you seem to want is a rolling playlist with its content changing while playing. I have this working in my foobar for years now. To achieve that you must use the Playlist Attributes (https://www.foobar2000.org/components/view/foo_playlist_attributes) plugin (another great plugin from fbuser) which has the option to remove tracks after it has been played (or skipped). Look at the documentation (http://www.palm-internet.eu/foobar2000/components/foo_playlist_attributes/foo_playlist_attributes_help.html) to discover other features. To avoid playing the same tracks (it depends on the size of your library) you can add an additional condition in your filter like : %genre% IS "Progressive Rock" AND NOT %last_played% DURING LAST 1 HOURS Hope this will help you. Yes, if I do that that it seems to fill the playlist. However, I can see no automatic adding (or removal) of tracks. I played around a bit and I would expect if the filter indicates %play_counter% IS 0 that as soon as it's changed to 1 it would automatically remove it from the playlist. Not happening, in fact the way it functions now I would have to manually remove the played tracks and then fill the playlist again by manually filling it by clicking file - random pools. Title: Re: foo_random_pools Post by: jazzthieve on 2016-03-03 12:53:17 Thanks, will check out your suggestion. Title: Re: foo_random_pools Post by: mark12 on 2016-03-08 21:38:46 Hi guys, I'm attempting to follow the documentation, but I honestly find it very confusing and unclear. I simply am trying to get a playlist that grabs 5 albums at random from my library at a time. What I mean by this is that everytime I click onto the playlist, I would like for it to have a new set of 5 random albums (preferably with no duplicates. I'm not sure if foo_random_pools is capable of this). So I created a new Playlist called 'Random Albums', went into the foo_random_pools options and did this. Can someone let me know what I'm doing wrong, or the right way to get what I'm trying to achieve? For the record, the playlist seems to not populate at all. Thanks. (https://u.pomf.is/exzcxp.png) Title: Re: foo_random_pools Post by: carpman on 2016-03-08 23:19:01 Go to Random Albums and add a track and play it. You'll find your albums are added. Or from main menu: File > Random Pools > Album This will populate any playlist with your criteria. You may want to add something like: %album% - %tracknumber% To the sort box and tick sort limit each group. Also filter with the content of the target playlist will get rid of duplicates AFAIK. You realise you can do the same thing pretty much, just by choosing Shuffle Albums from the drop down and playing a playlist of your entire library. C. Title: Re: foo_random_pools Post by: i b listening on 2016-05-22 00:40:45 fbuser, Thank you for your efforts, I love this plugin. I know this has been requested before (replies 60 & 80) - the ability to assign pools to different playlists - any chance??? Title: Re: foo_random_pools Post by: i b listening on 2016-05-23 14:59:13 fbuser, Thank you for your efforts, I love this plugin. I know this has been requested before (replies 60 & 80) - the ability to assign pools to different playlists - any chance??? I guess what would be ideal (for me anyway) is to have a check box labeled "Create one playlist per pool". If unchecked, foo_random pools would operate the way it is currently. If checked, foo_random_pools would create one playlist per pool. The name of the playlist could be the name of the pool. I would be interested in any feedback on the idea: good, dumb, not worth the time to implement, too hard to implement, etc. Title: Re: foo_random_pools Post by: laddie on 2016-05-23 23:06:00 Is there a way to schedule random pools to activate every so often? Basically a way to have it work with the Scheduler plugin? Title: Re: foo_random_pools Post by: fbuser on 2016-05-24 20:44:47 I would be interested in any feedback on the idea: good, dumb, not worth the time to implement, too hard to implement, etc. Basically the idea is not bad and I might implement this in some way in the more or less far future. However, you can at least partially get what you want by using foo_scheduler as described below in combination with the "Set active playlist" action. Also, you can get what you want by utilizing foo_jscript_panel with the a piece of code similar to this (not tested, no error handling): Code: [Select] function getPlaylistIndex(name) { var idx=-1; for(var i=0;i<plman.PlaylistCount;i++) { if(plman.GetPlaylistName(i)===name) { idx=i; break; } } return idx;}function poolToPlaylist(poolName,playlistName) { var playlistIndex=getPlaylistIndex(playlistName); plman.ActivePlaylist=playlistIndex; plman.ClearPlaylist(playlistIndex); fb.RunMainMenuCommand("Random pools/"+poolName);}poolToPlaylist("Pool1","Playlist1");poolToPlaylist("Pool2","Playlist2");.... Of course, you need to either create a button or a main menu entry to run this code. Is there a way to schedule random pools to activate every so often? Basically a way to have it work with the Scheduler plugin? Yes, just use the "Launch application" action with foobar2000.exe /command:"<pool name>". You might need to supply the full path to foobar2000.exe For the restrictions for the /command parameter and how to overcome them, see here (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Commandline_Guide). Title: Re: foo_random_pools Post by: i b listening on 2016-05-26 22:15:29 fbuser, Appreciate your reply, and I see what you are saying. I don't think that will work for what I am trying to accomplish. I run fb2k on a pc that sits in a closet and streams music throughout my house. I can control some functions (play control, playlist selection/editing) of f2bk from an app on my phone. 90% of the time I listen to autoplaylists on shuffle mode; these playlists are generally based on combinations of genre and rating. Autoplaylists can't be modified (individual songs deleted, moved, etc). I can't determine which song will play next, but I can hit the skip button if I don't want to hear a particular song at that moment. What I really like about foo_random_pools and foo_playlist_attributes is that, together, they allow me to create a playlist which contains ~25 (or any number) randomly selected songs that will be played next. (foo_playlist_attributes removes songs that have been played/skipped and foo_random_pools adds songs to keep the playlist at ~25 songs.) For this one playlist, using my phone app, I can look at the list of 25 songs coming up and get rid of the ones I don't feel like listening to at the moment. I can let this playlist run indefinitely and I can also manage the next ~hour's worth of music at any time. I would love to have this capability for all my playlists. Being able to assign a random_pool for each playlist would accomplish this. There may be other ways??? Title: Re: foo_random_pools Post by: benerogerio on 2016-12-25 16:10:56 For the devs! Please consider to implement a sort descending... thanks! random pools is awesome! Title: Re: foo_random_pools Post by: Slug on 2016-12-27 11:12:17 Hi, as a new user of random pools i create 2 pools in my random pools each one works correctly by itself However when i choose to add "All pools" only one is added in the playlist... Here a screenshort of my random pools : (http://img11.hostingpics.net/pics/760128glav.jpg) (http://www.hostingpics.net/viewer.php?id=760128glav.jpg) Title: Re: foo_random_pools Post by: fbuser on 2016-12-27 19:13:49 However when i choose to add "All pools" only one is added in the playlist... This is correct. If you choose "All pools" one of the pools with a priority greater zero is randomly choosen by considering the priority of each pool. For example, if you have two pools defined, A (with priority 9) and B (with priority 1), then pool A will be selected with a probability of 90% and pool B with a probability of 10%. Title: Re: foo_random_pools Post by: Slug on 2016-12-27 19:40:55 ok, tx Title: Re: foo_random_pools Post by: Slug on 2016-12-28 11:45:10 So it's not possible to use Random Pools to create a playlist that select a random song of Reggae for example then select a random song of Rocksteady then again and again? And i can't understand what "Group" is. It's always all my librairy or can i select a part of my librairy here? Then in filters if i want to use several filters is it possible? (i tried with "%Rate% GREATER 2 AND %Genre% IS Reggae" but it doesn't work) Title: Re: foo_random_pools Post by: fbuser on 2016-12-28 18:54:57 So it's not possible to use Random Pools to create a playlist that select a random song of Reggae for example then select a random song of Rocksteady then again and again? Only manually, but not automatically. However, it would be possible to create a script in JScriptPanel to automate this up to a certain extent. And i can't understand what "Group" is. It's always all my librairy or can i select a part of my librairy here? A group is a set of tracks with the same attributes defined by a title format expression, i.e. if you set the group to %artist%, set the number of groups to 2 and don't set a limit for adding tracks, all tracks for 2 randomly chosen artists are added. Filtering the library can be done by entering a filter expression in the Filter field. Then in filters if i want to use several filters is it possible? (i tried with "%Rate% GREATER 2 AND %Genre% IS Reggae" but it doesn't work) If your library is tagged accordingly this will work. Is %Rate% spelled correctly? Normally the tag %Rating% is used in such cases. You can easily test a filter by going to the menu "Library -> Search" and enter the filter expression there. Title: Re: foo_random_pools Post by: Romroll on 2017-04-27 22:30:31 Hello, is it possible to get a playlist composed of 25%Funk, 25%Rock, 25%Electro, 25%World with tracks sorted randomly? If yes, can someone explain me how please? (I already use Foobar, foo_random_pools is installed, my flac library is tagged) Thank you in advance, I read twice thre 8 pages but I couldn't understand the way to give instructions to foo_random_pools (but I guess a big potential!). Title: Re: foo_random_pools: some preset button? Post by: Rozzo on 2017-04-28 20:19:31 Hi, I have seen this component in different occassions but never found it of interest, basically because of lack of an intuitive interface. Certainly I would like to have special playlist, but my mental hard disk does not feel attracted to learning code, even in the most elemental ways. We, general users, want buttons. Buttons are for that, you do a clic and then you got some results that somebody -the programmer- experienced before and that you can tell are wonderful and use every day. As it is right now is an incomplete component very few persons can use. Ys Rozzo Title: Re: foo_random_pools Post by: fbuser on 2017-04-28 20:25:03 is it possible to get a playlist composed of 25%Funk, 25%Rock, 25%Electro, 25%World with tracks sorted randomly? Yes, but it cannot be done automatically. You can get the desired result as follows: Create 4 pools Funk, Rock, Electro, World with the following settings (all other settings can be kept as they are): Funk: Name: Funk Group: %genre% Filter: genre IS Funk Number of tracks to add: 10 Rock: Name: Funk Group: %genre% Filter: genre IS Rock Number of tracks to add: 10 Electro: Name: Electro Group: %genre% Filter: genre IS Electro Number of tracks to add: 10 World: Name: World Group: %genre% Filter: genre IS World Number of tracks to add: 10 Choose or create an empty playlist with your playlist manager Execute the following main menu entries: File -> Random pools -> Funk File -> Random pools -> Rock File -> Random pools -> Electro File -> Random pools -> World Edit -> Sort -> Randomize This will create a playlist with 40 entries, 10 randomly selected tracks from each genre, with a random track order Title: Re: foo_random_pools Post by: fbuser on 2017-04-28 20:42:00 I have seen this component in different occassions but never found it of interest, basically because of lack of an intuitive interface. Besides some possible minor enhancements, which are not worth to put effort into it, the interface is as intuiitive as it can be for the designed purpose. Certainly I would like to have special playlist, but my mental hard disk does not feel attracted to learning code, even in the most elemental ways. If you are not willing to to this, then this component is absolutely nothing for you and will never be. But this doesn't only apply to this component, it applies also to many other components, which require at least some basic knowledge of foobar2000 title format. We, general users, want buttons. Buttons are for that, you do a clic and then you got some results that somebody -the programmer- experienced before and that you can tell are wonderful and use every day. To create a component like this just with buttons, which magically know, which result the user expects, is simply not possible. As it is right now is an incomplete component very few persons can use. The component is neither incomplete nor can it only used by a few persons. Only the few persons, which are strictly deny to learn anything new, won't be able to use this component. Title: Re: foo_random_pools Post by: Romroll on 2017-05-13 00:02:47 Hello fbuser, thanks for your answer and for your work! Title: Re: foo_random_pools Post by: Queseuq on 2017-05-17 13:32:57 Hey, would it be possible to have a pool output it's tracks to the queue, rather than a specific playlist? Title: Re: foo_random_pools Post by: fbuser on 2017-05-17 21:04:06 Hey, would it be possible to have a pool output it's tracks to the queue, rather than a specific playlist? I don't think, that it is useful. There is nothing relevant , what you can do with the queue, what can't also be done with a playlist. Title: Re: foo_random_pools Post by: Queseuq on 2017-05-18 09:36:22 Hey, would it be possible to have a pool output it's tracks to the queue, rather than a specific playlist? I don't think, that it is useful. There is nothing relevant , what you can do with the queue, what can't also be done with a playlist. Hmmm, I thought that might be the case. I still prefer the queue though for a couple of reasons: 1. right click -> Add to queue. I may be being stupid but I haven't found a way to replicate this with playlists 2. With the queue it is possible to display the active playlist and the queue at the same time. I haven't yet found a way to display the active playlist with the now playing playlist beside it. If anyone knows a way to get these features working with a playlist, please enlighten me! Title: Re: foo_random_pools Post by: fbuser on 2017-05-18 20:26:06 1. right click -> Add to queue. I may be being stupid but I haven't found a way to replicate this with playlists This can be done with foo_playlist_attributes and foo_utils: • Create a playlist Queue (of course, the name can any other name) • Define it as prioritized playlist globally (Preferences -> Tools -> Playlist attributes -> Playback settings) • Disable "Stop after current" and "Bookmark last playback position" only for the playlist Queue • Enable "Remove played tracks" and "Remove skipped tracks" for the playlist Queue • Set "Continue on playlist ..." to "- Last playlist -" for the playlist Queue • Right click provided by foo_utils: Legacy Commands -> Add to Playlist -> Queue 2. With the queue it is possible to display the active playlist and the queue at the same time. I haven't yet found a way to display the active playlist with the now playing playlist beside it. This is also possible, but as far as I know only with ELPlaylist, which requires ColumnsUI, or with ESPlaylist, which is also working with Default UI. In both cases you can set the playlist viewer to follow the currently playing playlist instead of the active playlist. Title: Re: foo_random_pools Post by: Queseuq on 2017-05-19 09:48:59 Thanks fbuser! I think the way I want to use foobar2000 is going to require quite a few workarounds whether I use the queue or a separate playlist. All part of the fun of using foobar2000! Title: Re: foo_random_pools Post by: Decalicatan_Decalicatan on 2017-07-26 18:54:46 Hi! Is it possible to limit the selection of the pool to the tracks from a specific playlist (as opposed to any tracks from the media library) ? Thanks in advance Title: Re: foo_random_pools Post by: fbuser on 2017-07-26 22:44:53 Is it possible to limit the selection of the pool to the tracks from a specific playlist (as opposed to any tracks from the media library) ? No. Title: Re: foo_random_pools Post by: Decalicatan_Decalicatan on 2017-07-27 07:03:11 ty for the answer! Title: Re: foo_random_pools Post by: stevehero on 2017-08-18 00:52:12 Amazing. I commend you on this plug! Thank you! iTunes is starting to feel like that old girlfriend that seemed so nice at the time :o Anyway, just wanted to ask if it's possible for each pool to be assigned its own playlist to auto-add to. See screenshot for better understanding. Forgive me if this has been suggested before. Title: Re: foo_random_pools Post by: fbuser on 2017-08-25 19:55:31 Anyway, just wanted to ask if it's possible for each pool to be assigned its own playlist to auto-add to. This does not really make sense. Autoadding is applied to the currently playing playlist, if its name matches the specified pattern. Title: Re: foo_random_pools Post by: stevehero on 2017-08-25 20:26:49 Ok, thanks, just thought it could be extended to pool different playlists. Thanks for the reply. Title: Re: foo_random_pools Post by: bouchacha on 2017-11-25 23:37:39 I'm a baby foobar user and was wondering if this is possible. I want to add a button that clears the playlist and plays a random album from the first track. Additionally, I would like it if at the end of a playlist, a random album starts playing. Mrinferno had something similar early on this thread but I'm still very confused and think I'm missing a few steps. Title: Re: foo_random_pools Post by: bronzi on 2017-12-12 06:01:48 Hi, I'm having a couple of issues and am hoping someone might have a tip or two. I've created a random pool to add a random album to a playlist, which seems to be a common use of this component. It was working well for a while, but now whenever I add an album it is pre-shuffled (see image). It only happens in this context--in all other playlists and filters album tracks are in their proper numerical order. Any idea why this might happen? I've tried re-creating the pool, and I've also tried adjusting Playlist Attribute parameters to no avail (thinking it might be causing the issue). I've attached images of my random pool and playlist attribute settings. Secondary question: Is there a way to make the random album auto-play when its added to the playlist? Thanks. Title: Re: foo_random_pools Post by: bronzi on 2017-12-12 19:19:10 I figured out my issue from an earlier post in this thread. FYI, I needed a "%path_sort%" in the sorting field. Thank you for this plugin--I switched to foobar from music bee basically just for this feature and am glad I did! If anyone has a suggestion for my latter question that would be sweet: How can I get the random pool to play automatically upon being added to the playlist? Title: Re: foo_random_pools Post by: fbuser on 2017-12-12 19:26:16 Any idea why this might happen? You need to add a sort expression to the sort field: %discnumber% | %tracknumber% If you don't use a sort expression, the order of the tracks is not defined. So in the past you just had luck. Is there a way to make the random album auto-play when its added to the playlist? Not with this component. With JScript Panel you could create a script, which comes close to what you want. Title: Re: foo_random_pools Post by: bronzi on 2017-12-12 19:56:24 Thanks for the info! Title: Re: foo_random_pools Post by: bouchacha on 2017-12-25 03:37:02 I'm a baby foobar user and was wondering if this is possible. I want to add a button that clears the playlist and plays a random album from the first track. Additionally, I would like it if at the end of a playlist, a random album starts playing. Mrinferno had something similar early on this thread but I'm still very confused and think I'm missing a few steps. Just checking if I'm missing something. Right now if I want to skip to a random album, I have to press the random pool button which adds it to the end of the playlist, then I have to find the beginning of this new random album. Is there a better way? Title: Re: foo_random_pools Post by: fbuser on 2017-12-25 08:31:23 Not, really. You could use the autoadd functionality of the component and just remove the unwanted album from the playlist, but this would not directly play the newly added album, if there are other items in the playlist, which will be played first. If you want to skip certain albums you could tag them meaningfully and exclude them by a filter for the relevant random pool. Title: Re: foo_random_pools Post by: bouchacha on 2017-12-25 09:10:20 Thanks for replying! Is there anyway to assign multiple commands to a single button? It could be something like: 1. Clear playlist 2. [Random Pool action] 3. Play Title: Re: foo_random_pools Post by: fabiospark on 2018-01-07 20:14:39 Anyway, just wanted to ask if it's possible for each pool to be assigned its own playlist to auto-add to. This does not really make sense. Autoadding is applied to the currently playing playlist, if its name matches the specified pattern. Let me turn stevehero's question into a feature request. It would be very useful (to me, at least) to be able to tie a specific pool preset to a specific playlist. Think of the common scenario of wanting to listen to tracks not played recently. Using RP together with "remove played" from playlist attributes is the usual way we can have a playlist AUTOMATICALLY refilled with tracks that matches the query setup in RP: i.e. NOT %last_played% DURING LAST 7 DAYS. But what if we want to send tracks from a different pool? I think we will have to go in the settings and change the priorities of RP presets: correct? If we could tie a playlist to a pool preset we could have one playlist for each different additional filtering apart the "...last_played..." bit. I.e.: - least played with high rating - least played from a certain genre - least played + you name it I hope this explanation can make a little sense for you too and shed some light on why we are asking for that. It will multiply the power of your already amazing plugin. Thanks. Title: Re: foo_random_pools Post by: fbuser on 2018-01-07 21:02:43 But what if we want to send tracks from a different pool? I think we will have to go in the settings and change the priorities of RP presets: correct? No, you can just select the relevant menu entry for that pool (File -> Random pools -> <Pool name>) I hope this explanation can make a little sense for you too Sorry, no. Auto-adding makes only sense for the currently playing playlist as only this playlist is affected by removing played or skipped tracks. Title: Re: foo_random_pools Post by: fabiospark on 2018-01-07 21:37:07 I hope this explanation can make a little sense for you too Sorry, no. Auto-adding makes only sense for the currently playing playlist as only this playlist is affected by removing played or skipped tracks. Yes, I understand. But from what I know one of the strength of FB is the ability to have many playlists at hand that let you easily check what are you going to listen to before you start playing them. IMHO the ability to tie each pool to "its own" playist would fit well into FB well thought playlist centric world. Another useful thing, I think, is that in that way one can easily set the name of each tied playlist matching the name of its generating pool. By now we can't even know which is the "active" pool and with what the active playlist will be filled with. But maybe I'm wrong. Of course this is only my view considering my use of RP in conjuction with remove played (on a playlist basis, not on a global one) to create editable custom autoplaylists. I hope I didn't annoy you too much asking you for something that has already been asked many times before. I read all the thread before posting my request and I did it only after I read an answer of yours where you seemed to think it over but didn't see the point. I hoped to be able to let you see that point. Thanks. fabio Title: Re: foo_random_pools Post by: theagg on 2018-01-26 19:08:47 Can someone here remind me exactly how to get the autoadd feature working ? I had worked out how to do this some time ago but following a required Windows reinstall yesterday (losing all Foobar settings as a result) I cannot recall how to get this working again. Basically, prior to the reinstall I had Random Pools adding 3 tracks at a time using the autoadd "add when the playback position is X items from the end". Which it did perfectly. Selecting that option now is having no effect, the playlist reaches the end and stops. Given its so long ago, I'm not sure how I had the settings in the edit pane. What is number of group vs number of tracks for example. Randomly playing around with these settings is doing nothing to get the auto add to work..help!! Title: Re: foo_random_pools Post by: fabiospark on 2018-01-26 20:18:22 You have to set the priority above zero. Title: Re: foo_random_pools Post by: Daeron on 2018-01-29 13:18:22 I'll attempt to echo what fabiospark and stevehero seemingly already requested, as I also think that would be a logical extension of the component. The scenario is the following (picture below). Let's say you set up a random pool to populate a specific playlist with some arbitrary set of rules. Suppose you want your playlist to consist of 50% metal songs that came out before 2008 and 50% after and set up the component accordingly. The Playlist attributes component is also used to automatically remove played tracks from this playlist. The result is an auto-updating playlist which has the right distribution and basically requires no further input. Great. (https://i.imgur.com/xWRWNaZ.png) Now suppose you want another playlist with yet another set of arbitrary distribution of songs. Let's say 50% electronic songs which were rated above 4 and 50% below. Important is that you want to keep the auto-updating nature of the playlist, just like the metal songs had. As far as I'm aware, this is currently not possible. You can go back, edit and overwrite your original settings - basically repurposing your metal playlist to create the electronic playlist (picture below) - but you can't define multiple of these special playlists with different parameters at the same time. You can of course still create the individual electronic and metal pools and add them by hand (via File/Random pools), but in that case auto-updating nature can't be utilized, which would be essential to how many of us would like to use this component. (https://i.imgur.com/pl748ww.png) Important distinction, which I think was the source of confusion, is that I don't think people want these special playlists to update in real time simultaneously. As long as I'm listening to the metal playlist, I don't care what happens to the electronic playlist and vice versa. All I would like is to be able to specify which pools to take into consideration depending on which playlist I'm currently playing. This is shown on the picture below. The red arrow signifies that the "Autoadd" setting would become the property of each individual pool as opposed to the global setting which it is now. (https://i.imgur.com/7r11vGm.png) So the logic of the component would go from: 1) Check the name of the current playlist 2) If playlist name matches the global "Autoadd" setting, populate the playlist according to every pool To: 1) Check the name of the current playlist 2) If playlist name matches at least one of the Autoadd settings, populate the playlist according to the pools which have a matching "Autoadd" setting I don't think this modification would fundamentally break any mechanic that the component relies upon and would be fairly simple to implement, relatively speaking anyway. It would however allow us to spawn countless finely tuned auto-playlists which would be great. The functionality is already there, it's just limited to a single playlist currently. Playlist attributes component for example already lets you specify settings for both global and individual playlists, so that side of the equation is already covered. Title: Re: foo_random_pools Post by: fbuser on 2018-01-29 22:30:44 I don't think this modification would fundamentally break any mechanic that the component relies upon Actually, it would just do this. In your example you defined four pools with the same priority. Either of the pools has the same probability to be chosen. You're proposal would in the end lead to different behaviours for adding a pool from all pools manually and adding a pool automatically. I don't think, that this is a good idea. Sorry, but I won't implement this. Title: Re: foo_random_pools Post by: JDPCC on 2018-03-12 18:51:14 Would like to pull an equal number of random tracks from two different genres. One genre (Rock) has 13261 tracks in the library and the other genre (Blues) has 1852 tracks in the library. Problem: tracks being pulled are proportionate to number of tracks in each genre. Out of 200 tracks requested roughly 20 are from the Blues library and the remainder 180 are from the Rock library. I would like an equal number of tracks pulled from each genre. Is this possible?? Title: Re: foo_random_pools Post by: fbuser on 2018-03-12 20:31:47 What are your current pool definitions? Title: Re: foo_random_pools Post by: JDPCC on 2018-03-13 17:53:10 Thank you for your reply. Parameters are as follows: Blues Genre pool: Name = Blues Group = %artist% and %title% Determine probability for picking groups based on group size = not checked Number of groups to add = 200 Filter = %genre" IS Blues Filter with content of the target playlist = checked Priority = 1 Number of tracks to add = 1 Number of minutes to add = 0 Number of MBs to add = 0 Sort = %artist% | %album% | %tracknumber% Sort / limit each group = checked All parameters for the Rock genre pool are exactly the same as the Blues genre pool with the exception of the Name and the Filter parameters Name = Rock Filter = %genre" IS Rock All parameters for the Blues & Rock genre pool are exactly the same as the Rock or Blues pools with the exception of the Name, the Filter and the Group: Name = Blues & Rock Group = %DIRECTORYNAME% -- (but I have also tried using %artist% and %title% as the group with same results) Filter = %genre% IS Blues OR %genre% IS Rock TIA for you help Title: Re: foo_random_pools Post by: fbuser on 2018-03-14 20:43:48 In general it is better to use the following properties to get 200 random tracks from a pool: Group: %library% (or any other non-existing tag) Number of groups to add: 1 Number of tracks to add: 200 This is especially for large libraries much faster. However, this will not solve your problem to get a balanced number of tracks from one pool for two different genres. Actually, this is not possible. You need to add separately 100 tracks from the Rock genre pool and 100 tracks from the Blues genre pool to get the result you want. Title: Re: foo_random_pools Post by: JDPCC on 2018-03-14 23:26:51 Thank you for your assistance. I did figure out that by selecting the two different genre pools independently I could add the same number of tracks from each genre to the playlist. I suspect it is possible to do what I am asking but not without additional coding. You have already provided foobar users with a great tool, I can understand why an enhancement like this may not be something you want to spend time on. Thanks again for your help. p.s. If I can get a look at the source code I may be able to help with the enhancement should you decide it is worthwhile to include. Title: Re: foo_random_pools Post by: YAP7 on 2018-07-26 23:38:50 I'm new to foo_random_pools and I'm struggling with it right now. What I'm trying to achieve: define pools (currently with a directory as source) filtering by bpm, to build playlists with "one click" (and maybe fine tune them later, but that's another story). I've been successful in defining a playlist column to display bpm, but it seems I'm stuck with filter definition, this is what I came up with, which is invalid:$and($num($meta(TEMPO),1) GREATER 100,$num($meta(TEMPO),1) LOWER 180)

It seems I don't have a good enough grasp of the syntax, could you please point me in the right direction?
Title: Re: foo_random_pools
Post by: fabiospark on 2018-07-27 07:24:52
I don't have time to help you now but you should have a look
at "Menu\Library\Search\ and click on the question mark in the upper right corner.
You shoud see what I have attached here, with better formatting, and you should carefully check the syntax
of your query. I suggest you to start with a simple search and only when you see
all of them work by themselves, try to put them together with the boolean operators.

Good work.

Code: [Select]
Query Syntax HelpConventions in this DocumentQueries are written in italics.Example: %rating% GREATER 3Query examples may contain placeholders which are enclosed in angle brackets. Their name indicates what they need to be replaced within a real query. If multiple placeholders of the same type occur in the same query example, a number will be appended to the name.Example: <field> GREATER <number>The following common types of placeholders are used in the rest of this document:    <field>    A reference to a tag field. This can be either a plain field name or a title formatting expression. See Notes for details.    <number>    An integer value.    <string>    A text value that may be enclosed in double quotation marks. See Notes for details.    <time>    A time value or a title formatting expression that evaluates to a time value. See Time Expressions for details.    <expression>    A query expression in a composed query. This has to follow the rules described under Advanced Search below.Simple SearchThe simple search mode does not use any keywords.    <any string>    Returns only items that have all words from specified string in their metadata or file path.When using the simple search, any latin characters are matched regardless of their accents, e.g. “foo” will match “foo” as well as “föö” or “fóo”.Advanced SearchThe advanced search allows the construction of more complex queries. It offers several keywords to perform specific types of comparisons and to combine multiple query expressions.Text Expressions    <field> HAS <string>    Returns only items that have all words from <string> in a metadata field named <field>.    Example: title HAS blah    <field> IS <string>    Returns only items where (at least one) metadata field <field> is equal to <string>.    Example: artist IS blah    * HAS <string>    Same as simple search, but can be combined using logical operators (see below).Numeric ExpressionsPerform integral number comparison between the value of a <field> and a <number>, e.g. ”%rating% GREATER 3”.    <field> GREATER <number>    <field> LESS <number>    <field> EQUAL <number>Metadata Expressions    <field> MISSING    Returns only items that don't have a metadata field named <field>.    Example: genre MISSING    <field> PRESENT    Returns only items that have a metadata field named <field>.    Example: genre PRESENTTime Expressions    <time1> BEFORE <time2>    Returns only items where <time1> value is before <time2>.    Example: %last_modified% BEFORE 2008    <time1> AFTER <time2>    Returns only items where <time1> value is after <time2>.    Example: %last_modified% AFTER 2008    <time1> SINCE <time2>    Returns only items where <time1> value is not before <time2>.    Example: %last_modified% SINCE 2007    <time1> DURING <time2>    Returns only items where <time1> value is a subset of <time2> period.    Example: %last_modified% DURING 2007    <time> DURING LAST <number> <time-unit>    Returns items where <time> value is contained in the specified period.    <time-unit> can be one of SECONDS, MINUTES, HOURS, DAYS, or WEEKS.    Example: %last_modified% DURING LAST 2 WEEKS    If <number> is 1, the expression can be simplified to <time> DURING LAST SECOND/MINUTE/HOUR/DAY/WEEKTime values used in these expressions must be in one of the following formats: YYYY, YYYY-MM, YYYY-MM-DD, YYYY-MM-DD hh, YYYY-MM-DD hh:mm, YYYY-MM-DD hh:mm:ss.Composed Queries    <expression1> AND <expression2>    Returns only items where both expressions are true.    Example: artist IS blah AND title HAS blah    <expression1> OR <expression2>    Returns only items where at least one expression is true.    NOT <expression>    Returns only items where the expression is false.    Example: NOT %last_played% AFTER %first_played%Sorting ResultsYou can put a SORT BY operator at the end of your search expression to produce search results sorted by the specified title formatting pattern.    SORT BY <sort-pattern>, SORT ASCENDING BY <sort-pattern>    Sort results in ascending order.    SORT DESCENDING BY <sort-pattern>    Sort results in descending order.Notes    <field> and <string> in HAS and IS expressions should be enclosed in double quotation marks (”) if they include spaces or parentheses.    If <field> in HAS, IS, GREATER, LESS, EQUAL includes at least one of #$% characters, it will be treated as a title formatting string. Example: %codec% IS MP3 If <field> in HAS, IS, GREATER, LESS, EQUAL does not include any of #$% characters, it will be treated as a metadata field.    Example: artist IS Radiohead    Note that you can't access technical information (such as codec specifications) or component-provided information (playback statistics and such) this way.    Using title formatting strings instead of simple field names will decrease search speed on large libraries and break multiple field value handling in the IS operator - for example, a track with two artist names: “name1” and “name2”, will be found by artist IS name1 query, but not by %artist% IS name1.    To control the evaluation order of composed queries, enclose the individual expressions in parentheses.    Example: ( (artist IS blah) AND (title HAS blah) ) OR (%rating% GREATER 3)    All search expressions are not case-sensitive. All keywords must be uppercase.Operator SummaryOperator 	Syntax 	CommentAFTER 	<time1> AFTER <time2> 	AND 	<expression1> AND <expression2> 	BEFORE 	<time1> BEFORE <time2> 	DURING 	<time1> DURING <time2> 	DURING LAST 	<time> DURING LAST <number> SECONDS/MINUTES/HOURS/DAYS/WEEKS<time> DURING LAST SECOND/MINUTE/HOUR/DAY/WEEK 	EQUAL 	<field> EQUAL <number> 	GREATER 	<field> GREATER <number> 	HAS 	<field> HAS <string>* HAS <string> 	IS 	<field> IS <string> 	LESS 	<field> LESS <number> 	MISSING 	<field> MISSING 	NOT 	NOT <expression> 	OR 	<expression1> OR <expression2> 	PRESENT 	<field> PRESENT 	SINCE 	<time1> SINCE <time2> 	SORT BY 	SORT BY <sort-pattern>SORT DESCENDING BY <sort-pattern> 	Must be at the end of the query.
Title: Re: foo_random_pools
Post by: anamorphic on 2018-07-27 07:35:02
^ Those documents are also on the wiki with a bit more detail -

Query Syntax (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Query_syntax)
Title Formatting Reference (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Titleformat_Reference)

@YAP7
Title: Re: foo_random_pools
Post by: YAP7 on 2018-07-27 13:55:09
I've made great progress. However I seem to be stuck again. When I add tracks from all pools all tracks will be selected from the just one group.

These are my definitions:
A
Group: $strcmp($lower($directory(path)),'tempo') Number of groups to add: 1 Filter: ("$num($meta(TEMPO),1)" GREATER 179) Filter with the content of target pl: yes Number of minutes to add: 10 Sort/limit each group: yes B Group:$strcmp($lower($directory(path)),'tempo')
Number of groups to add: 1
Filter: ("$num($meta(TEMPO),1)" GREATER 100) AND ("$num($meta(TEMPO),1)" LESS 180)
Filter with the content of target pl: yes
Number of minutes to add: 50
Sort/limit each group: yes

With these settings, the 50 minutes of tracks will be added from group B, none from group A. Setting "Number of groups to add: 2" in both groups, 10 minutes of tracks will be added from group A.
I can of course circumvent the problem by just clicking twice but I'd rather understand what I'm doing wrong.

Title: Re: foo_random_pools
Post by: fbuser on 2018-07-27 18:14:46
I've made great progress. However I seem to be stuck again. When I add tracks from all pools all tracks will be selected from the just one group.
Of course, that is how it is designed.
Title: Re: foo_random_pools
Post by: YAP7 on 2018-07-27 18:20:47
My bad, it was my understanding that "all pools" would indeed mix all of them together, proportionally, based on the priority field.
As I said then, it will be two clicks instead of one. :)
Title: Re: foo_random_pools
Post by: tipar on 2018-09-03 18:20:41
Hi. I wanted to make a sort of Spotify's Instant Mix (left out from Spotify from a couple of weeks ago); I want to know if my way is the closest I can be from the Instant Mix-like playlist, have you got more ideas? I used:
• Random Pools
• Playlist attributes
• Lastfm, optional

First of all, I went to Lastfm to check my top ten artists. I created ten pools, one for each artist with the next configuration:
Quote
Group: %all%;
Filter: artist HAS <yourartist>;
Priority: 1;
Number of tracks to add: 1

My idea here is to check the artists of my top ten on Lastfm from time to time to adjust the pools.

Then I created another pool with the next configuration—each <yourartist> represent one of the top ten artists that already have been added on the previous step so you do not want them on this pool playlist:
Quote
Group: %all%;
Filter: %play_count% LESS 5 AND NOT artist HAS "<yourartist>" AND NOT artist HAS "<yourartist>" AND NOT artist HAS "<yourartist>" AND NOT artist HAS "<yourartist>" AND NOT artist HAS "<yourartist>" AND NOT artist HAS "<yourartist>" AND NOT artist HAS "<yourartist>" AND NOT artist HAS "<yourartist>" AND NOT artist HAS "<yourartist>" AND NOT artist HAS "<yourartist>"
Priority: 2
Number of tracks to add: 5

In addition, I set to 10 the ''Add, when the playlist has X items or less'' to my playlist Instant Mix.

The next thing I did was going to ''Playlist attributes'' and set the playlist Instant Mix to "Remove and Skip played tracks".

Then I set Foobar2000 in shuffle mode and press Random Pool, start listening and that is all.

I think that this is the closest mode to Spotify's Instant Mix. I thought about to leave playback "default" but his will cause that the five songs pool would reproduce in a row and for me was better to mix it with the other pools so, for instance, F2K would reproduce two of the five and six of the others and one of the five and four of the others and so on. I mean it will, indeed, mix them. In addition, this configuration will cause to fill the playlist in a way that it may not be full of my top ten artists in a given time because it will only add songs when ten songs are left.

Regards.
Title: Re: foo_random_pools
Post by: tipar on 2018-09-06 17:52:23
I have made another pool given that the Daily Mixes and not Instant as I called them adapt to the songs or artists you have been listening in the last couple of days so I decided to go with:

Quote
Group: all
Filter: %last_played% DURING LAST 9 DAYS AND NOT %last_played% DURING LAST 2 DAYS
Priority: 1;
Number of tracks to add: 3

This will add songs heard during last week without counting the last two days before today.

Title: Re: foo_random_pools
Post by: zoumbro on 2018-09-12 10:50:48
what am i doing wrong. Random pools seems not working.
Title: Re: foo_random_pools
Post by: fbuser on 2018-09-12 18:57:12
what am i doing wrong.
You didn't provide any details regarding your problem.
Random pools seems not working.
It does.
Without any further details: no chance.
Title: Re: foo_random_pools
Post by: Ryrynz on 2018-11-15 03:16:45
Just trying to figure this out, I have a random pool called Anime 3+ which looks to select a bunch of random anime style songs that are rated 3+.  In Filter I have %Genre% HAS "Anime" AND %Rating% GREATER 2 and Number of Tracks to add is 5. If I click File - Random Pools Anime 3+ I get 1-5 tracks and they're not random at all, most are from the same album.
Title: Re: foo_random_pools
Post by: fbuser on 2018-11-15 21:24:52
This sounds like you have only a few files in your media library. How many tracks do you get, if you search with the specified filter using the menu "Library -> Search"?
What is are your other settings, especially the setting for "Group"?
Title: Re: foo_random_pools
Post by: Ryrynz on 2018-11-17 06:04:22
Hundreds. What am I doing wrong? https://i.imgur.com/i12kv4A.jpg
Title: Re: foo_random_pools
Post by: fbuser on 2018-11-17 10:39:40
With your settings, you will get up to 5 random tracks from a random album. If you want to have just 5 random tracks you need to group by a tag, which has the same value for each track. This is also the case for any non-existing track, like %all% or %library%, as the title format result in such a case is just a ?
Title: Re: foo_random_pools
Post by: takora on 2018-11-21 23:52:18
I'm searching for a plugin which can create playlists with artist and song repeat protection. But I don't know how to configure random_pools because I got no programming skills. My media library has 49 folders (13 of them are different VA folders). 1372 songs. No folder has less than 18 songs or more than 77 songs. In random_pools I configured 49 groups with autoadd, when the playback position is 1 items or less from the end. Figured out how to get my playlist populated and gave it a try. But I didn't like the results. Within an hour, I got 3 different songs from the same group (which has 24 songs total) and no songs from the biggest groups. All groups are configured similar:
group = %directoryname%
number of tracks to add = 1
determine probability for picking groups based on group size = yes
number of groups to add = 1
filter = %path% HAS "some-string-from-directory-name"
filter with the content of the target playlist = yes
sort/limit each group = yes (but no rules are defined)
priority = 1

And my question is - is it possible to configure this plugin so that within 2 hours no artist are repeated? Total playing time of my library is about 91 hours and no artist has more than 32 songs. Of course I'm probably doing it completely wrong because lack of programming skills...
Title: Re: foo_random_pools
Post by: mgpai on 2018-11-22 04:43:32
(https://i.imgur.com/eE41jXP.gif)

From the 6 groups created by this, I was hoping to get 1 track each from the 3 largest groups (total 3 tracks) at any given time, but I am getting all 3 tracks from 1 largest group.
Title: Re: foo_random_pools
Post by: fbuser on 2018-11-22 20:36:49
And my question is - is it possible to configure this plugin so that within 2 hours no artist are repeated?
No, this is not possible.

From the 6 groups created by this, I was hoping to get 1 track each from the 3 largest groups (total 3 tracks) at any given time, but I am getting all 3 tracks from 1 largest group.
Also this is not possible.
Title: Re: foo_random_pools
Post by: takora on 2018-11-22 20:51:36
If I use option "Add, when the playback position is 1 items or less from the end" and the option "Determine probability for picking groups based on group size" is selected - random_pools will see all the songs (and artists and albums) which were played before. But you say, it can't understand what is artist repeating and how to avoid it?
Title: Re: foo_random_pools
Post by: mgpai on 2018-11-22 21:47:00
From the 6 groups created by this, I was hoping to get 1 track each from the 3 largest groups (total 3 tracks) at any given time, but I am getting all 3 tracks from 1 largest group.
Also this is not possible.

Thanks for the clarification. It was not clear from the description, which said picking groups, which led me to believe it will pick more than one.

...  is it possible to configure this plugin so that within 2 hours no artist are repeated?

Should be possible if you have enough number of artists in your library.

Set group to %artist%
Disable 'Determine possibility for picking groups based on group size'
Number of groups to add: (Should be equal to or greater than the number of artists in your library)
Number of tracks to add: 1
Enable Limit after sorting
Sort: $rand() Enable Sort/Limit each group Enable Filter with content of the target playlist Title: Re: foo_random_pools Post by: fbuser on 2018-11-22 22:14:07 It was not clear from the description, which said picking groups, which led me to believe it will pick more than one. Yes, it does. But all groups are independent from each other if you check "Determine probability for picking groups based on group size", while distinct groups are picked, if this option is not checked. In both cases this is not want you want to achieve. Title: Re: foo_random_pools Post by: mgpai on 2018-11-22 22:26:56 It was not clear from the description, which said picking groups, which led me to believe it will pick more than one. Yes, it does. But all groups are independent from each other if you check "Determine probability for picking groups based on group size", while distinct groups are picked, if this option is not checked. In both cases this is not want you want to achieve. OK. I was hoping to have a single pool where the priority is calculated automatically based on size, rather than having six different pools,, in which case I have to set the priority manually once in a while based on the number of tracks (which keeps changing) in each group. It's fine though. Thanks again for your reply and the wonderful plugin. :) P.S: Also because, with six pools I have to set/change the filter (usually same) six times. :) Title: Re: foo_random_pools Post by: fbuser on 2018-11-22 22:31:18 ... is it possible to configure this plugin so that within 2 hours no artist are repeated? Should be possible if you have enough number of artists in your library. Set group to %artist% Disable 'Determine possibility for picking groups based on group size' Number of groups to add: (Should be equal to or greater than the number of artists in your library) Number of tracks to add: 1 Enable Limit after sorting Sort:$rand()
Enable Sort/Limit each group
Enable Filter with content of the target playlist
Indeed, with this approach you can come at least close to the reqeust von @takora. But if the number of artist in the library increases, you need to adjust the pool settings accordingly each time. Furthermore, if the number of groups to add becomes too big, you can run into serious performance problems.
Title: Re: foo_random_pools
Post by: takora on 2018-11-23 04:58:05
I tried it with your options, but now I got only one item in my playlist and it would not increase. :D
Title: Re: foo_random_pools
Post by: mgpai on 2018-11-23 06:31:37
I tried it with your options, but now I got only one item in my playlist and it would not increase. :D

Title: Re: foo_random_pools
Post by: takora on 2018-11-24 18:36:06
It's my mistake. I tried again

group - %artist%
determine probability... - no
number of groups to add - 62
number of tracks to add - 1
limit after sorting - yes
filter - nothing there
filter with the content of the target playlist - yes
sort - $rand() sort / limit each group - yes priority - 1 Now I got 62 songs and no artist is repeated (so far), but there is a problem. Most of the songs in generated playlist are from Various Artists albums (only 10 songs are from non-Various Artists albums). But in reality Various Artists albums are less than half of my library. And so the majority of artists got virtually no playtime. I tried to increase number of groups to 128 but with same results. Title: Re: foo_random_pools Post by: kode54 on 2018-11-24 21:08:27 Well, you need to adjust your settings, as it appears to have picked out exactly one song by each artist, no more, no less. Title: Re: foo_random_pools Post by: takora on 2018-11-24 21:15:23 Sure... Asking for advice, as always. Maybe it has something to do with the fact that in my collection only Various Artists albums got Album Artist tag? (Just a very wild guess...) Title: Re: foo_random_pools Post by: fbuser on 2018-11-24 22:39:40 Most of the songs in generated playlist are from Various Artists albums (only 10 songs are from non-Various Artists albums). That is no big suprise. A Various Artists albums with 20 tracks has usually 20 different artists, so you would need 20 "normal" albums from 20 different artists to have a 50% probability to pick an artist, which is not on a Various Artist album. You could define two pools like the one you already have, with the following differences: Pool 1 (for the normal albums): filter: album artist MISSING number of groups to add: The number of tracks you want to have from this pool Pool 2 (for the Various Artists album): filter NOT album artist MISSING number of groups to add: The number of tracks you want to have from this pool After adding a bunch of tracks from both pools to the same playlist you can mix the results with "Edit -> Sort -> Randomize" Title: Re: foo_random_pools Post by: kode54 on 2018-11-24 22:51:03 62 tracks also seems like about right for the collection you have, if you have an average of 22 tracks per artist. Title: Re: foo_random_pools Post by: mgpai on 2018-11-25 21:19:18 Most of the songs in generated playlist are from Various Artists albums If the %album artist% tag is present only in your VA albums, you can use$if(%album artist%,%album%,%artist%) to reduce the number of tracks picked from VA album. May result in artist repetitions, but they will be very limited. Total number of groups (tracks) added will also be reduced, depending on average tracks per artist, and the total number of VA albums in your collection.
Title: Re: foo_random_pools
Post by: takora on 2018-11-25 21:20:05
With some tweaking I found the balance when 40 songs are selected from non-Various Artists albums and 22 songs from Various Artists albums. It's more than 4 hours playlist and no artist or song were repeated. But I'm beginning to believe that if I try to get more songs into my playlist there will be trouble. My library structure is not that simple and it includes non-album singles from Various Artists albums (I'm talking about the same artists that are mostly represented with non-Various Artists albums). Anyway, I will try it to see what the results are.
How the radio stations are doing it? Well, first you define some amount of "boxes". Then you put similar songs in the same boxes and define the boxes' order. For example, if I put similar and/or related artists in the same boxes, then there is no way the artist will be repeated before 1 song from all other boxes have been played. In my case, it would be over 4 hours. And the radio station software usually has some kind of additional artist and song repeat protection. Don't know how the song repeat protection works, though. But I guess all songs with the same title are considered the same song.
Thank you all for your patience and advice but I'm afraid random_pools can't replace commercial playlist generator. As they will work very differently. Random pools vs fixed order boxes.
Title: Re: foo_random_pools
Post by: OlegYch on 2018-12-22 01:56:21
Hi all
Is it possible to achieve a kind of shuffled playback order which shuffles artists but only plays a one random album at a time?
IE i have 10 artists in playlist, some with 10 albums, and some with only one, and would like to hear each artist with the same probability, but not more than one album at a time.
Currently if i use 'shuffle albums' i listen artists with 10 albums way more often than artists with one.
Or perhaps this is better done in core foobar or some other component?
Title: Re: foo_random_pools
Post by: fbuser on 2018-12-23 07:34:15
Actually, I see no practical way to achieve what you want, neither with this component nor with any other component.
Sure, you could add for example 100 album to a playlist and remove all "duplicate" artists manually afterwards, but this is far away from convenience, error prone and the final result would give you always an unpredictible number of albums.
Title: Re: foo_random_pools
Post by: OlegYch on 2018-12-23 19:05:03
Thanks, fbuser. I'll try with core foobar.
Title: Re: foo_random_pools
Post by: Daeron on 2019-03-02 04:52:08
Any chance of implementing a global filter which will be appended to each individual pool automatically?

For example, this filter is identical among all my pools:
Code: [Select]
%length_seconds% GREATER 120 AND %length_seconds% LESS 300
Maintaining these during experiments means manual editing and copy-pasting to every pool I have to propagate changes. This is a fairly redundant and painful process if you have more than a couple of them.
Title: Re: foo_random_pools
Post by: Erratic on 2019-05-16 17:16:52
Sorry, user error. :| Ignore post.
Title: Re: foo_random_pools
Post by: Arrivest on 2019-08-22 22:40:33
Hi, I'm a new user of this plugin and it's so amazing! Thanks so much!

I have a particular pattern to listen to my songs and wonder if it can be achieved.

Say I have a folder "D:\to be listened" which contains 10000 songs, I want to randomly take 10 songs from it, listen to them in a playlist, and then for each of them I'll make a decision between either "I like it, move the file to D:\good" or "I don't like it, delete the file from disk". No matter which I choose, the song is removed from the playlist, and also the original folder.

This is my mission, pretty straight forward. It's the simplest pool setting and I already got it working. In the end I imagine the 10000 songs will turn into 1000 songs in D:\good.

Now my question is, as I am removing songs from the playlist, the playlist shrinks. I'll need to replenish them manually. I hope there's a way to automatic replenish so it keeps at 10 songs, and every time I delete one, a new random one would be automatically added. I tried playing with the auto add feature, but didn't get it to work. I must be missing something really obvious. How should it be done? Thanks so much!
Title: Re: foo_random_pools
Post by: fbuser on 2019-08-23 18:55:03
Title: Re: foo_random_pools
Post by: Arrivest on 2019-08-24 16:24:09
I have to admit that because my goal is so simple, I just made the simplest setting that works, without properly learning it:
1. My media library contains only one folder, which is "D:\to be listened" - because I don't use media library for any other purposes other than random pool.
2. I have only 1 pool, and configured this way: Group: %% , Number of groups to add: 1; Limit: 10 0 0 ; Filter: empty ; Sort: empty
Now I'm able to use the "File" menu to add 10 random songs into current playlist.

What I wish to have is whenever I delete a song from the playlist, a new random song is replenished, so that the playlist maintains 10 songs. What I tried: in Autoadd, I picked the desired playlist from the dropdown, then put 10 0 0.  And of course that doesn't work, I think I'm missing some fundamental knowledge about how this component works.
Title: Re: foo_random_pools
Post by: fbuser on 2019-08-24 17:04:54
Three things:
1. You didn't mention the setting for Priority. Therefore and because of the not working Autoadd, I guess it's still 0. As Autoadd is picking its tracks from all pools with a priority greater than 0, you need to increase this value, no matter to what.
2. With your settings for Limit you always add 10 songs to the playlist, when the Autoadd condition is met.  So you probably want to set it to 1 0 0.
3. You should also tick "Filter with the content of the target playlist", if you want to avoid duplicates tracks in the playlist.
Title: Re: foo_random_pools
Post by: Arrivest on 2019-08-24 17:39:17
OMG it's now working!!!!!!! Exactly in the way I hoped, Like a charm!!!!! Thanks so so much!!!!!!!!!!!
Title: Re: foo_random_pools
Post by: bouchacha on 2019-11-28 18:04:55
I use random_pools to jury-rig a "next random album" button that I wish already existed within foobar. The way I have it set up is through a script that clears the playlist, then hits play. As it's set up, random_pools kicks into gear by automatically adding a new random album anytime the playlist is cleared. So far so good.

The only real issue I have is a surprisingly high number of repeats. I saw above the thread ways to get rid of duplicates but that involves summoning the entire pool all at once, and if I do that I won't be able to use my hacked up 'skip to next album' button. Does anyone have a suggestion? Either for random_pools settings or  a better method for a "Skip to next random album" button?
Title: Re: foo_random_pools
Post by: El Kabong on 2020-01-24 19:21:18
Hi all, people!
I'm a longtime f2k user, and been using RP almost from the very beginning of it. (A must-have component, let me say).
Well, technologies have grown way too long and now I see myself forced to jump into the Android version of f2k and (obviously) I would like my RP there too. :D
Do you know if it's fully implemented. If not, will it be?