Skip to main content
Topic: Foo random pools setup folders or songs by rating (Read 358 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foo random pools setup folders or songs by rating

I'm trying to use random pools for a quick and simple way to add music to my playlist where my favorite music has the highest priority, and then other folders / ratings have a lower chance. such as a 1 in 5 chance to play a song from one folder / rating, a 1 in 3 for another, and a 1 in 2 for the last. I can't figure this component out though and the documentation isn't helping. Any chance someone could point me in the right direction here?

Re: Foo random pools setup folders or songs by rating

Reply #1
You could define 3 pools with the following settings:

Pool 1:
Name: Excellent music
Group: %title%
Filter: %rating% IS 5
Priority: 5

Pool 2:
Name: Good music
Group: %title%
Filter: %rating% IS 4
Priority: 3

Pool 3:
Name: Less good music
Group: %title%
Filter: %rating% LESS 4
Priority: 2

With these definitions it is assumed, that you use %rating% as tag for your ratings and the values of this tag are between 1 and 5. All other settings are dependent from what you exactly want.

Re: Foo random pools setup folders or songs by rating

Reply #2
You could define 3 pools with the following settings:

Pool 1:
Name: Excellent music
Group: %title%
Filter: %rating% IS 5
Priority: 5

Pool 2:
Name: Good music
Group: %title%
Filter: %rating% IS 4
Priority: 3

Pool 3:
Name: Less good music
Group: %title%
Filter: %rating% LESS 4
Priority: 2

With these definitions it is assumed, that you use %rating% as tag for your ratings and the values of this tag are between 1 and 5. All other settings are dependent from what you exactly want.


Alright bear with me here. I did this, but then I do not know how to turn this into a playlist or into something to play. Would you mind dumbing it down a bit more for me with more steps, I'm still very lost with this help file.

https://i.imgur.com/Llit66F.png

Re: Foo random pools setup folders or songs by rating

Reply #3
Define a playlist in the Autoadd section on your screenshot and set one of the "Add, when..." values to non-zero. Create said playlist and hopefully it should populate by itself.

If it doesn't, you can add a track manually to it, perhaps start playing it then delete it. That should trigger a repopulation. You can also add your pools manually via File/Random pools.

Re: Foo random pools setup folders or songs by rating

Reply #4
Define a playlist in the Autoadd section on your screenshot and set one of the "Add, when..." values to non-zero. Create said playlist and hopefully it should populate by itself.

If it doesn't, you can add a track manually to it, perhaps start playing it then delete it. That should trigger a repopulation. You can also add your pools manually via File/Random pools.
Got it to add, but when I tried 10000 it crashed my foobar. Can I use a value like 100-500 songs and it automatically removes them after listen? My source files are probably ~5000-1000 songs, and I still want the priority here. Does that mean I have to make a max limit of like 50k so it can add the good songs and such multiple times. Thank you for the help on this, so far I am very excited on this component.

Re: Foo random pools setup folders or songs by rating

Reply #5
Chances are it didn't crash, only made foobar hang until the songs are all added. For 10000 songs that would take a very long time as the picking algorhitm is not that fast. Try something lower, like 10-20. I don't think it makes a difference whether you generate 10k songs right away or you just keep generating them individually when there are less than X songs in the playlist.

Note that I haven't seen the code itself, but to me it appears that you are simply defining probability of occurence for each group and there's no magic going on behind the scenes to ensure optimal distribution based on that definition. In other words when you are testing it try to look for a distribution roughly matching what you are hoping for, but due the randomness of it you might get weird streaks where only one groups gets added over and over again.

To automatically remove tracks you can use:
https://www.foobar2000.org/components/view/foo_playlist_attributes


Re: Foo random pools setup folders or songs by rating

Reply #6
Interesting, I'll try just setting the limit to ~50k and letting it run overnight to populate. But I would love to find a way to ensure that it just keeps a playlist of like ~100 songs and as I listen it constnatly adds / removes songs. I checked out the component you linked but it appears to be a .dll file rather than a typical component, I might need to investigate that. I suppose I could also try something like generate 1000 songs, then when I reach the end delete all those, but that seems like it'd requiring changing playlist modes from repeat to stop after playing.

Re: Foo random pools setup folders or songs by rating

Reply #7
I checked out the component you linked but it appears to be a .dll file rather than a typical component
Of course, as all typical components are dlls. Don't get confused by the extension of the archive (.zip). Newer components with the extension fb2k-component are also only zip archives with just another extension. Foobar2000 handles them both in the same way.

Re: Foo random pools setup folders or songs by rating

Reply #8
I checked out the component you linked but it appears to be a .dll file rather than a typical component
Of course, as all typical components are dlls. Don't get confused by the extension of the archive (.zip). Newer components with the extension fb2k-component are also only zip archives with just another extension. Foobar2000 handles them both in the same way.
Mind actually blown. I've setup these settings, hopefully they all seem valid for what I'm trying to accomplish:

https://i.imgur.com/EGEByTc.png
https://i.imgur.com/SaNcjAO.png


Re: Foo random pools setup folders or songs by rating

Reply #10
I've setup these settings, hopefully they all seem valid for what I'm trying to accomplish:

https://i.imgur.com/EGEByTc.png
https://i.imgur.com/SaNcjAO.png
Yes, this should do what you want, but it is not really necessary to set the playback mode to "Shuffle (tracks)".

Yea that actually just caused issues where all songs were just playing in alphabetical order, I set it back to global and the playlist is working great as far as I can tell. I might need to adjust the priorities a bit, I was getting a lot of rating 4 music.

 
SimplePortal 1.0.0 RC1 © 2008-2018