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

foo_random_pools

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

foo_random_pools

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

foo_random_pools

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

foo_random_pools

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

foo_random_pools

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

foo_random_pools

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

foo_random_pools

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

foo_random_pools

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

foo_random_pools

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

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

foo_random_pools

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

 

foo_random_pools

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

foo_random_pools

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

foo_random_pools

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

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

foo_random_pools

Reply #163
#gratitude, carpman~

foo_random_pools

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

foo_random_pools

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

foo_random_pools

Reply #166
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!

foo_random_pools

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

foo_random_pools

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

foo_random_pools

Reply #169
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.
A rose will bloom, it then will fade.

foo_random_pools

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

foo_random_pools

Reply #171
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/3xZBnbH.png

What is it that I am missing? (I have read the docs AND this thread)

foo_random_pools

Reply #172
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 and query syntax.

foo_random_pools

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

foo_random_pools

Reply #174
Re-read the documentation, esp. the Limits section.