Skip to main content

Notice

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

Re: foo_random_pools

Reply #275
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?

Thx in advance!
Cheers!


Re: foo_random_pools

Reply #276
Do you know if it's fully implemented.
No and there is currently no public SDK, which would make it possible. But even it will be possible in the future,
If not, will it be?
most likely not. At least not from me, but, of course, it would still be possible, that someone else would create a similar plugin for Android.

Re: foo_random_pools

Reply #277
I know this thread is a year old, but I just started using this and I am a bit confused with it. I used to use Shuffle (tracks) and noticed how it can reset that shuffle in between sessions of Foobar, which means I end up hearing the same tracks sometimes over and over again before hearing all of the tracks on a playlist. So I had enough of that and thus found random pools.

I got it working: to fill a new playlist with a random sorting of all files from my library. But to do so, I had to manually set the "Number of groups to add" to the total track count and the "Group" to "%folder% - %title%" since the tracks I want to play are organized by folder (artist) and filename (title). This works, but it would be nice not to manually set the number of groups. If it's set to 1 here, it just adds one track.

I tried setting "Group" to %library% to grab everything, then the "Number of groups to add" only needs to be set to 1 and it works, but the randomness is really odd. It starts off random (different tracks from different folders), then it starts to lump entire folders together towards the end. So I'd have one folder with may be two dozen tracks all added to the bottom of the playlist, not anywhere else. For this I have nothing in Filter, nothing in Sort, and "Sort / limit each group" unchecked. Also Limits are all set to 0 to make sure there's no limit. Pretty much everything unchecked.

So, what's the simplest way to fill a new playlist with a random list of all tracks from my Library? Am I missing something? Thanks.
Difficulties mastered are opportunities won. - Winston Churchill

Re: foo_random_pools

Reply #278
I got it working: to fill a new playlist with a random sorting of all files from my library. But to do so, I had to manually set the "Number of groups to add" to the total track count and the "Group" to "%folder% - %title%" since the tracks I want to play are organized by folder (artist) and filename (title). This works, but it would be nice not to manually set the number of groups.
Actually, this is not the purpose of this component and you are "misusing" the component a bit.

I tried setting "Group" to %library% to grab everything, then the "Number of groups to add" only needs to be set to 1 and it works, but the randomness is really odd. It starts off random (different tracks from different folders), then it starts to lump entire folders together towards the end.
This sounds strange and does normally not happen. But it's not necessary to go deeper into it as your goal can be achieved much easier:

Add all tracks in your library to a playlist, e.g. by using ALL as query expression. Then select all tracks and execute "Edit -> Selection -> Sort -> Randomize) and start playback in default order.

Re: foo_random_pools

Reply #279
I got it working: to fill a new playlist with a random sorting of all files from my library. But to do so, I had to manually set the "Number of groups to add" to the total track count and the "Group" to "%folder% - %title%" since the tracks I want to play are organized by folder (artist) and filename (title). This works, but it would be nice not to manually set the number of groups.
Actually, this is not the purpose of this component and you are "misusing" the component a bit.

I tried setting "Group" to %library% to grab everything, then the "Number of groups to add" only needs to be set to 1 and it works, but the randomness is really odd. It starts off random (different tracks from different folders), then it starts to lump entire folders together towards the end.
This sounds strange and does normally not happen. But it's not necessary to go deeper into it as your goal can be achieved much easier:

Add all tracks in your library to a playlist, e.g. by using ALL as query expression. Then select all tracks and execute "Edit -> Selection -> Sort -> Randomize) and start playback in default order.
Thank you! I was overthinking this and using a plugin that was meant for far more than just a random sort. I stumbled across this plugin because someone online recommended it as a solution to the same issue I faced with the shuffle track play mode. Thank you for providing a much easier solution. :-)
Difficulties mastered are opportunities won. - Winston Churchill

Re: foo_random_pools

Reply #280
I have been using random pools for some time to be able to play songs i like more often than others.

Normally you can define that a specific rating will be played this often compared to other ratings.
But another factor that's good to have in the equation is in how many songs there are with that rating compared to how many there are with other ratings.
No need add a song with rating:3, 20% of the time if it there aren't enough songs with that rating to fill 20% of your listening time. Then you end up hearing the same song more often, for that rating than for other ratings.
I wanted to calibrate the priorities to adjust for that.
I made a spreadsheet for this purpose. Sharing it here in case anyone find it useful.
https://docs.google.com/spreadsheets/d/1kFRW_mjHCAFN1p7XlKMScJcCbGheO_sQPmVDdRTxFD8/edit#gid=842793885

Green cells are for manual input. Everything else is calculated.

Re: foo_random_pools

Reply #281
Hello. I've had this component since the day I installed Foobar2000 and I've never really used it before.
I have always been intrigued as to how it works and what use-case I could need it for.
I had another problem with how Foobar does its Shuffle options that is detailed in this thread: https://hydrogenaud.io/index.php?topic=121029.0
Someone on there recommended that I could achieve my aim by using this component. Unfortunately though, I don't know how to use it and don't have any experience using it at all.
How do I achieve what I detailed in that other thread? (Shuffling "artist" category but only as artists not as the songs in that category).
Thanks

Re: foo_random_pools

Reply #282
Yeah, I know that this is a pretty old thread but I will try anyways.

I want to randomly pick from my list of albums that still need Replay Gain applied to them.  I tried this but nothing loads.

Using the filter %replaygain_album_gain% IS MISSING

FYI, Group is %album%
# of groups to add is 3
sort is  %path_sort%

My other pools load fine so it must be in the filter expression.

TIA

Re: foo_random_pools

Reply #283
My other pools load fine so it must be in the filter expression.
You're guessing right. The correct filter expression is:
%replaygain_album_gain% MISSING

Re: foo_random_pools

Reply #284
That works.

I could have sworn that I tried that version but it brought up stuff that did have a RG value so I assumed the expression was incorrect.

Thank you fbuser.  This is one of the most useful plugins I have ever used.

Re: foo_random_pools

Reply #285
A new version is out. Please, check the first post for details.


Re: foo_random_pools

Reply #286
With the new version I always get a crash, when I select from the file menu Random Pools -> (my pool)

Further testing shows: crash vanishes after adding foo_sqlite. So either this should be a requirement, checks need to be improved, or I am facing a local problem, which is only exposed in this specific constellation

Re: foo_random_pools

Reply #287
So a limitation with the random pools I discovered is, that the combination of autopopulating a playlist with a number of songs when using multiple pools and the playlist is empty, will always add from pools equally, when I select "Number of Chosen Pools" equalling the pools in the pool set.
However, when setting the Number of Chosen Pools to 1, the random pool functionality will add the number of songs to auto add all from the SAME pool. This is not a problem, when the pool fills up bit by bit, one song at a time. Each time a new song is added (for example because the playback position is X items or less from the end), a new pool is picked and then a new song is added.

This might be a niche usecase, and I can work around that. However it would be nice, if I could set "Add when the playlist has X items or less" to 20, so that 20 songs are added, and the songs are picked one-by-one from the pools according to the priority of the pool.

The limitations only shows when a whole set of items is added at the same time from the pools, because then only one pool gets picked, and all songs are added from that one pool.

Re: foo_random_pools

Reply #288
Further testing shows: crash vanishes after adding foo_sqlite. So either this should be a requirement, checks need to be improved, or I am facing a local problem, which is only exposed in this specific constellation
Most likely the crash is caused by a missing check. If possible, could you please post a crash report here. The definition of your pool set could also be helpful to figure out the crash cause.

Re: foo_random_pools

Reply #289
Here are some crash reports and dumps.
This actually happens with very simple pools on my end.

For testing purposes I have this test pool setup: https://imgur.com/a/f0rSmBi
In the test pool, each pool actually only contains one song, and there is no filtering on the target playlist. I wanted to figure out how the pools were behaving when I was initially populating playlist.

My "productive" pool is a bit more complicated: https://imgur.com/a/2615Tki
As you see there is a bit more going on, but it all relates to songs within a certain path and then filtering on the rating. There is no internal grouping being used on the pools in the pool set.

Crashes would occur for either of them

Re: foo_random_pools

Reply #290
Here are some crash reports and dumps.
Thanks a lot for your efforts. The problem is fixed now in version 1.0.1.
So a limitation with the random pools I discovered is, that the combination of autopopulating a playlist with a number of songs when using multiple pools and the playlist is empty, will always add from pools equally, when I select "Number of Chosen Pools" equalling the pools in the pool set.
However, when setting the Number of Chosen Pools to 1, the random pool functionality will add the number of songs to auto add all from the SAME pool. This is not a problem, when the pool fills up bit by bit, one song at a time. Each time a new song is added (for example because the playback position is X items or less from the end), a new pool is picked and then a new song is added.
It's actually not a limitation as it works exactly as designed.

This might be a niche usecase, and I can work around that. However it would be nice, if I could set "Add when the playlist has X items or less" to 20, so that 20 songs are added, and the songs are picked one-by-one from the pools according to the priority of the pool.
This doesn't appear logical to me. If you choose to add tracks only from one pool you can't add just one song from each pool.

Re: foo_random_pools

Reply #291
Quote
This doesn't appear logical to me. If you choose to add tracks only from one pool you can't add just one song from each pool.
<-- this is correct. But if I select all pools, items from the pools are not added according to the probability of the pools. If you see my testpool set with 3 pools, and I select all 3 pools and add a whole bunch of items (like 20, because the playlist is empty and I select that it should have at least 20 items), items are added from the three pools equally instead of according to their priority.

As I said,  this is a kinda niche usecase, and I can workaround it by simply binding a key and adding the items one by one.

At the moment I do not have the option, to automatically add 20 items chosen from a poolset at once, items to be selected from all pools according to pool priority. I have to do it one-by-one.

And thank you for the fixes. I am happy I could provide some help. Awesome work on this plugin.

Re: foo_random_pools

Reply #292
Hey! First of all, thanks for making & supporting this plugin. I barely listen to music normally now, I just have my random playlist (via random pools)  that I use to listen the majority of my library  :D

After I've upgraded to 1.0.1, I have noticed something similar that nthmetal is describing: when I populate an empty playlist, priorities don't seem to be respected and each pools is inserted once. This seems to be different from previous versions where pool would be inserted based on priority.

See my setup screenshots attached: notice how in the previous version, Filtered pool (represented by ✔✔✔✔) appears quite often (given that its the highest priority). Whereas in the latest version each Pool is inserted once until the limit of 50 songs is reached.

To replicate this:
I go to my _MonteCarlo playlist, clear it completely, drag a random song in and play it. Usually, performing these steps are enough to trigger the playlist population

When I've upgraded to 1.0.1, my previous settings didn't change. The only thing I needed to tweak is to tick the Media library checkbox in all of my pools. This fact alone makes me think that it should work as it did before but it doesn't - is it a bug or some of functionality has changed? If it's the latter, how can I restore the previous version's behavior to respect the priorities while populating?

Re: foo_random_pools

Reply #293
At the moment I do not have the option, to automatically add 20 items chosen from a poolset at once, items to be selected from all pools according to pool priority. I have to do it one-by-one.
Actually, you don't need to do this manually. This will be done automatically, if you set the number of pools to add to 1.

However, you might have the impression, that only one track is added. I now noticed, that in such a scenario quite fast the result from the first queried pool is added to the playlist, but the results from all other queried pools are collected and will be added afterwards at once. Depending on the number of queried pools it might take long enough to give you the impression, that the pools in a poolset are queried only once. You should be able to see relevant messages in the console, directly after a pool was queried.

This is not really the intended behavior, but it is probably caused by internal changes. I will see, if this slightly odd behavior can be changed to avoid confusion.

The only thing I needed to tweak is to tick the Media library checkbox in all of my pools.
You really need to do this manually? Actually, this should've happened automatically.

This fact alone makes me think that it should work as it did before but it doesn't - is it a bug or some of functionality has changed?
See above for an explanation.

If it's the latter, how can I restore the previous version's behavior to respect the priorities while populating?
Set the number of pools to be added for the pool set to 1. Having the possibility to add more than one pool is a new feature, which gives you the possibility to ensure to get results from different pools, which wasn't possible in the previous version. Setting this value to 1 gives you exact the behavior of the old version.

I will rename the option to "Number of different randomly chosen pools to add" to make this clearer although it is described like that in the help file:
Quote
The number of pools to get items from for sending to the target playlist. Each pool will be only chosen once and the maximum number of pools is the number of pools in the pool set even if a bigger number is specified. The pools will be chosen based on their priority, pools with the priority 0 will be ignored.

Re: foo_random_pools

Reply #294
Thank you for your response!

Quote
Set the number of pools to be added for the pool set to 1
That doesn't seem to work for me unfortunately. See the attached screenshot & log. It seems that selecting 1 pool will do just that: pick 1 pool and populate the playlist with songs matching that one pool. However, that's not what I want: I want to have a random playlist composed of randomly selected songs from all pools based on their priority.

So in this regard, the previous version (where I had Number of randomly chosen pools to add = 8 ) was bringing me closer to where I wanted to be. The only thing missing was the priority: I'm expecting my Unplayed penalised pool to appear very rarely (because it has such a low priority) whereas on 1.0.1 songs from that pool show up every 5th position. 0.1.5 did what I wanted: songs from Unplayed penalised appeared very rarely in a generated playlist - is it possible for it to work the same way in 1.0.1?

Maybe it's conflicting with other components somehow? I don't understand it completely but I think it's related with
Quote
you might have the impression, that only one track is added. I now noticed, that in such a scenario quite fast the result from the first queried pool is added to the playlist, but the results from all other queried pools are collected and will be added afterwards at once.
This is what I see as well - a single song gets added and then the rest of the playlist gets populated in one go.


Re: foo_random_pools

Reply #295
That doesn't seem to work for me unfortunately. See the attached screenshot & log. It seems that selecting 1 pool will do just that: pick 1 pool and populate the playlist with songs matching that one pool. However, that's not what I want: I want to have a random playlist composed of randomly selected songs from all pools based on their priority.

That is exactly the behavior I monitored. If you use a pool similar to my testpools, with each pool in the poolset populated by exactly one song, you can easily see that, because the second layer of randomness (picking a song from the chosen pool) is elimiated.

The first screenshots shows the configuration of the poolset.
X
The second shows, what happens when the playlist is then autopopulated after I manually added one song from the pool. As you can see, all the 100 other songs come from the pool "summer", which evaluates to only one song, instead of using all pools.
X
This behavior is reprodudible: Just empty the playlist and watch it automatically fill up with 100 songs. Or add one song manually then watch it fill up.

In contrast, if I alter the setting "Number of Randomly chosen Pools to add" to 3, all pools are used equally:
X

Maybe both behaviors are as according to configuration, however I think user expectation would be different.
O mayber we need an additional option, that when adding a whole number of songs at the same time, after one song is chosen from a pool, the pool selection must be repeated anew, before adding the next song. Moving on like that step by step for each song (or set of songs, in case more than one pool is chosen) until the desired number of songs in the playlist is reached.
This would also make the behavior consistent between initially filling up an empty playlist with 100 (or 20, or whatever you chose) songs in comparison to, when they fill up one by one, because, for example the minimum of remaining songs to the of the playlist is hit.

Re: foo_random_pools

Reply #296
My other pools load fine so it must be in the filter expression.
You're guessing right. The correct filter expression is:
%replaygain_album_gain% MISSING

Okay I have something that is not working the same as before the upgrade.  My pool is made up of all of the albums that don't have Replaygain settings yet.  It will load three albums w/o gains like it did before, but now when I apply a RG to an album it doesn't disappear like it did before.  Is there something I forgot to check?

Re: foo_random_pools

Reply #297
Is there something I forgot to check?
No, it should work as before, but it might be related to the problem, which was reported by @nthmetal and @o rly owl. Meanwhile I could reproduce the problem and I'm working on a fix.

Re: foo_random_pools

Reply #298
@onanboy : I uploaded a new version mainly with the fix for the recently reported problems. However, at least with this new version I cannot confirm your problem. Could you please try again with the new version and let me know the result?

Re: foo_random_pools

Reply #299
@onanboy : I uploaded a new version mainly with the fix for the recently reported problems. However, at least with this new version I cannot confirm your problem. Could you please try again with the new version and let me know the result?

In my case it still doesn't disappear an album after I apply the Replaygain numbers. However, I am a idiot when it comes to proper setup. I am sure that it is me and not you that is causing my issue.