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 176396 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_random_pools

Reply #175
Can't update to version 0.1.4: Could not load component "c663b5e2c5857822a8d97aafe925ce52a35a354d.zip": Unsupported format or corrupted file


foo_random_pools

Reply #177
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. 

foo_random_pools

Reply #178
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.

Re: foo_random_pools

Reply #179
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.

Re: foo_random_pools

Reply #180
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.

Re: foo_random_pools

Reply #181
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.

Re: foo_random_pools

Reply #182
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 plugin (another great plugin from fbuser) which has the option to remove tracks after it has been played (or skipped).
Look at the documentation 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.

Re: foo_random_pools

Reply #183
Thanks, will check out your suggestion.

Re: foo_random_pools

Reply #184
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.




Re: foo_random_pools

Reply #185
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.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

Re: foo_random_pools

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


Re: foo_random_pools

Reply #187
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.

Re: foo_random_pools

Reply #188
Is there a way to schedule random pools to activate every so often?  Basically a way to have it work with the Scheduler plugin?

Re: foo_random_pools

Reply #189
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.

Re: foo_random_pools

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


Re: foo_random_pools

Reply #191
For the devs! Please consider to implement a sort descending... thanks! random pools is awesome!

Re: foo_random_pools

Reply #192
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 :


Re: foo_random_pools

Reply #193
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%.

Re: foo_random_pools

Reply #194
ok, tx

Re: foo_random_pools

Reply #195
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)

Re: foo_random_pools

Reply #196
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.

Re: foo_random_pools

Reply #197
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!).

Re: foo_random_pools: some preset button?

Reply #198
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

Re: foo_random_pools

Reply #199
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