IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
foo_random, Randomized playlist entries
foosion
post Aug 28 2005, 21:55
Post #1





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



The component adds support for playlist entries that map to a random entry of a subset of the Media Library on playback.

The component adds a decoder for URIs of the form
CODE
random:|query|
where query is a valid playlist generator query. The component provides a main menu command to add ("Playlist/Add randomized entry...") and a playlist context menu command to edit ("Edit randomized entries...") entries of this form. The context menu command replaces the existing entry with the new one. It is recommended that you use these commands to manipulate randomized entries instead of the "Add location..." command, as they also check that the query is syntactically valid.

The use of random: paths is limited to playback, i.e. you cannot use them with the Replaygain scanner or the converter. This is by design.

When a randomized entry is played, it will fiter the contents of the Media Library using the specified query and randomly chose one of them. During playback, the static metadata of the chosen track is made available to the player as dynamic information of the random: entry. This works similar to audio streams on the Internet. The dynamic metadata is augmented with "played_path" and "played_subsong" tech info fields that hold the location of the chosen track. The dynamic data of the chosen track is not available.

Note that dynamic metadata is available in (some) titleformatting scripts, including the playlist, main window caption and statusbar. It is however not available to the DSP pipeline, so Replaygain is applied by foo_random using the core settings.

There are a number of error conditions that can lead to the component not being able to play a "real" track. If the Media Library is empty or no tracks are left after filtering its contents, the component will raise a "Not found" type error. An error occurs as well, if the query is not syntactically correct. More information is printed on the console under these conditions.
If you try to use the Replaygain scanner or the converter on a randomized entry, the component will raise an "Access denied" type error. The same happen, if you try to change the tags of a randomized entry.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
Silverbolt
post Aug 29 2005, 08:23
Post #2





Group: Members
Posts: 319
Joined: 9-October 03
Member No.: 9218



Thanks, foosion.


--------------------
f to c to f to c
Go to the top of the page
 
+Quote Post
foosion
post Aug 29 2005, 10:50
Post #3





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



Updated to version 1.1.

The component now outputs which file it picked for playback.

There is an issue with full file buffering affecting this component. If you get a "Not found" type error without any console messages originating from foo_random, try turning full file buffering off. This should be fixed in the next beta.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
Killmaster
post Aug 31 2005, 01:25
Post #4





Group: Members
Posts: 305
Joined: 8-January 03
Member No.: 4465



Hey this is pretty cool, thanks smile.gif
Go to the top of the page
 
+Quote Post
mixderax
post Aug 31 2005, 16:26
Post #5





Group: Members
Posts: 84
Joined: 12-September 03
Member No.: 8820



1) When playing random song if pause is presed, the position slider goes to begining but when resuming jumps back.
2) When resume playback on start is enabled, when started a new song is chosen and it starts playing from place where the one that played before exiting. Yust wondering what will happend when the song chosen on startup is shorter than the progress on song playing before exiting.


--------------------
fb2k 0.9 beta 13.
Go to the top of the page
 
+Quote Post
foosion
post Aug 31 2005, 16:38
Post #6





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



QUOTE (mixderax @ Aug 31 2005, 05:26 PM)
1) When playing random song if pause is presed, the position slider goes to begining but when resuming jumps back.
*
That is an issue in the user interface. Nothing that can be solved in foo_random.

QUOTE (mixderax @ Aug 31 2005, 05:26 PM)
2) When resume playback on start is enabled, when started a new song is chosen and it starts playing from place where the one that played before exiting. Yust wondering what will happend when the song chosen on startup is shorter than the progress on song playing before exiting.
*
It will attemp to seek to the remembered point, hit the end of the file and skip to the next song (as determind by the playback order).


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
mixderax
post Aug 31 2005, 16:47
Post #7





Group: Members
Posts: 84
Joined: 12-September 03
Member No.: 8820



Thank's


--------------------
fb2k 0.9 beta 13.
Go to the top of the page
 
+Quote Post
hunted
post Sep 7 2005, 04:29
Post #8





Group: Members
Posts: 271
Joined: 26-October 03
From: Seattle, WA, USA
Member No.: 9461



I know this is pretty trivial, but is there a chance of being able to set a title for the query, that is displayed when the track is not playing. If I were to make a really long query, it will get truncated. I like the 'Random:' part, but if we could give it our own title, that might making the playlists easier to read.
I guess if you plan on releasing the source like you have with your other components, I will add this myself, but maybe other people would find this useful.
Go to the top of the page
 
+Quote Post
NEMO7538
post Sep 7 2005, 06:19
Post #9





Group: Developer
Posts: 633
Joined: 28-November 03
Member No.: 10088



When a track is playing it would be nice also that Right Click --> Properties provides with the properties of the currently playing track (not the query).

.... if this is feasible.
Go to the top of the page
 
+Quote Post
foosion
post Sep 7 2005, 08:42
Post #10





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



hunted:
I'll think about it.

NEMO7538:
Unfortunately not.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
foosion
post Mar 13 2006, 11:43
Post #11





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



foo_random updated for 0.9 RC 2006-03-11.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
nightgaunt
post Apr 10 2006, 19:58
Post #12





Group: Members
Posts: 12
Joined: 20-June 05
Member No.: 22867



QUOTE (foosion @ Mar 13 2006, 06:43 AM) *
foo_random updated for 0.9 RC 2006-03-11.


This is an awesome plug-in, and I'm totally psyched to be able to use a custom ratings-weighted shuffle. It looks like foo_random doesn't play especially well with playlist statistics or with audioscrobber. I imagine this is a pretty hard problem. Any insight into why this is the case, or suggested workarounds? It's not mission critical for me: this is a great bit of code and, as is, I really appreciate it.

stephen
Go to the top of the page
 
+Quote Post
foosion
post Apr 10 2006, 20:35
Post #13





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



The problem is that foo_random adds an additional layer of indirection that obscures what track is playing to all components that are not aware of what foo_random does - which means virtually every component in existence. This obfuscation is an (unavoidable) side-effect and not a deliberate attempt to prevent these other components from working.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
Fiend Angelical
post Jun 7 2006, 07:52
Post #14





Group: Members
Posts: 165
Joined: 11-December 03
Member No.: 10367



Sorry for reviving an old topic.

Is there a way to make foo_random truly random?

That is, a query that make foo_random pick rnadomly from my whole database? I'm currently struggling to find a plugin that offers truly random playback qualities.

(foo_dbshuffle? wink.gif )
Go to the top of the page
 
+Quote Post
foosion
post Jun 7 2006, 14:00
Post #15





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



You just need to devise a query that selects all songs, like "%path% IS *" or "NOT all IS golden".


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
Fiend Angelical
post Jun 7 2006, 14:02
Post #16





Group: Members
Posts: 165
Joined: 11-December 03
Member No.: 10367



Aha, thank you. I will try it as soon as I finish processing the ReplayGains of my music collection.

LATER:

QUOTE (foosion @ Aug 28 2005, 21:55) *
The component adds a decoder for URIs of the form
CODE
random:|query|
where query is a valid playlist generator query. The component provides a main menu command to add ("Playlist/Add randomized entry...") and a playlist context menu command to edit ("Edit randomized entries...") entries of this form. The context menu command replaces the existing entry with the new one. It is recommended that you use these commands to manipulate randomized entries instead of the "Add location..." command, as they also check that the query is syntactically valid.

I'm non-computer programming literate. What is a 'syntactically valid' query? Is there anywhere I could look to help me learn these queries? I'm struggling to find a query that defines a random playlist by genre, or another tag field.

QUOTE (foosion @ Aug 28 2005, 21:55) *
The use of random: paths is limited to playback, i.e. you cannot use them with the Replaygain scanner or the converter. This is by design.

Could I ask why?

This post has been edited by Fiend Angelical: Jun 7 2006, 16:22
Go to the top of the page
 
+Quote Post
Squeller
post Jun 21 2006, 09:17
Post #17





Group: Members
Posts: 2278
Joined: 28-August 02
Member No.: 3218



QUOTE (Fiend Angelical @ Jun 7 2006, 05:02) *
I'm non-computer programming literate. What is a 'syntactically valid' query? Is there anywhere I could look to help me learn these queries?

http://www.hydrogenaudio.org/forums/index....ndpost&p=400521
Go to the top of the page
 
+Quote Post
Squeller
post Jan 17 2009, 11:54
Post #18





Group: Members
Posts: 2278
Joined: 28-August 02
Member No.: 3218



Could you maybe offer a variable which indicates the number of matches of the query. Unlike Autoplaylists or search results, here we don't have information about the number of matches. I want to display it in panels.
Go to the top of the page
 
+Quote Post
Squeller
post Feb 27 2009, 15:04
Post #19





Group: Members
Posts: 2278
Joined: 28-August 02
Member No.: 3218



Another question: tracks played by foo_random do not update playback statistics data, as those tracks are not recognized as Media Library tracks. Can you change this?
Go to the top of the page
 
+Quote Post
GreenSmurf
post Jun 16 2009, 10:34
Post #20





Group: Members
Posts: 48
Joined: 13-December 06
Member No.: 38660



Can anyone explain why Queen's "You're my Best Friend" does not appear with this query?

"title HAS best friend"

It only plays two songs and neither have the words "best" or "friend" in them.

Thanks to anyone who can help.

-Brandon
Go to the top of the page
 
+Quote Post
foosion
post Jun 16 2009, 23:12
Post #21





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



QUOTE (Squeller @ Jan 17 2009, 11:54) *
Could you maybe offer a variable which indicates the number of matches of the query. Unlike Autoplaylists or search results, here we don't have information about the number of matches. I want to display it in panels.
The benefit of having this information does not justify the development and runtime cost to provide it, which is quite significant.

QUOTE (Squeller @ Feb 27 2009, 15:04) *
Another question: tracks played by foo_random do not update playback statistics data, as those tracks are not recognized as Media Library tracks. Can you change this?
No. Effectively a randomized playlist entry is a radio station that plays tracks from your media library. It comes with the same limitations (w.r.t. playback statistics tracking) as a normal web radio station. See also post #13 in this thread.

Sorry for the late replies. Apparently I didn't get a notification for this topic.

QUOTE (GreenSmurf @ Jun 16 2009, 10:34) *
Can anyone explain why Queen's "You're my Best Friend" does not appear with this query? ...
Have you tried this query in the media library search?
You can also try the plugin's built-in troubleshooting tool. In the context menu preferences, you have to add the command "Random Encounter" to your context menu. Now when you open the context menu for a single random entry, there will be a "Random Encounter" submenu that lists up to 10 matches for your query. If this submenu is missing, the plugin found no matches. In that case, the foobar2000 console will show an error message:
QUOTE
Failed to open random entry. No items left after applying filter: this IS an example


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
q-stankovic
post Jun 20 2009, 17:37
Post #22





Group: Members
Posts: 918
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



Hello foosion,

here a short list of some issues i experienced with foo_random:

1. (an old one i mentioned over one year ago in the database search thread): "There is a little but annoying usability issue with foo_random: when choosing a query preset from the dropdown list you can't access the OK button as long as you don't add a space sign(f.e) to the query text)"

2. foo_random seems to have a conflict with two newer features of foobar core.
a) I typed "ALL" as query to get back an random entry of whole library but foo_random interpretes that as string "all"
b) Furthermore it also looks in fields that are not in the search restriction field in advanced preferences.

3. The seekbar doesn't work - on the other side you can seek in a playing track by "seek ahead by ..." command

This post has been edited by q-stankovic: Jun 20 2009, 17:37
Go to the top of the page
 
+Quote Post
foosion
post Jun 21 2009, 14:12
Post #23





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



QUOTE (q-stankovic @ Jun 20 2009, 17:37) *
1. (an old one i mentioned over one year ago in the database search thread): "There is a little but annoying usability issue with foo_random: when choosing a query preset from the dropdown list you can't access the OK button as long as you don't add a space sign(f.e) to the query text)"
Reproduced. I will look into it, but please report such issues in the correct topic in the future.

QUOTE (q-stankovic @ Jun 20 2009, 17:37) *
2. foo_random seems to have a conflict with two newer features of foobar core.
a) I typed "ALL" as query to get back an random entry of whole library but foo_random interpretes that as string "all"
b) Furthermore it also looks in fields that are not in the search restriction field in advanced preferences.
I can't reproduce this with the latest version from my website (currently 1.2.3) and foobar2000 0.9.6.8.

Edit: I'll have to try this when I'm back home. The media library on my laptop only contains songs in "C:\Documents and Settings\All users\...".

QUOTE (q-stankovic @ Jun 20 2009, 17:37) *
3. The seekbar doesn't work - on the other side you can seek in a playing track by "seek ahead by ..." command
Known/won't fix. This is due to how foo_random works.

This post has been edited by foosion: Jun 21 2009, 14:16


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
foosion
post Jun 30 2009, 22:40
Post #24





Group: FB2K Moderator (Donating)
Posts: 3962
Joined: 24-February 03
Member No.: 5153



foo_random 1.3.0

Changes:
  • Fixed usability issue in GUI.
  • The component now uses the standard search filter API. New filter expressions - including ALL - will work now.
  • The entries in the "Random Encounter" context menu submenu start playback of the specified song. This is equivalent to using the built-in "Play" context menu command on a song.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
 
+Quote Post
Guhndahb
post Jul 1 2009, 00:10
Post #25





Group: Members
Posts: 4
Joined: 15-October 08
Member No.: 60077



QUOTE (nightgaunt @ Apr 10 2006, 14:58) *
I'm totally psyched to be able to use a custom ratings-weighted shuffle.
How can this be attained? I've been trying to find a way to do ratings-weighted random but it seems that the method people have previously used, utilizing foo_skip, does not work anymore. Is using foo_random the only current option? If so, I'm unsure how to make a playlist generator query that works to achieve ratings-weighted random unless rand() will work with this plugin. But I thought rand() doesn't currently work in most situations.

Also, foosion, can I assume from the fact that you had to design foo_random the way you did (as a kind of channel) that there's no way currently to add playlist order options or modify the behavior of those that exist? I'm unsure if I can live with the understandably necessary limitations that foo_random imposes such as limited compatibility with functionality and other plugins that I like (such as audioscrobbler and the seek bar). I was going to look into writing a plugin to do what I wanted, but if someone as experienced as yourself found this the best option I'm guessing what I want to do is currently impossible.

Thank you.
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2010 - 15:56