Hi,

This kind of issue comes up every now and then. Since it is about
randomness, it is a bit hard to pinpoint.


On Sat, Sep 19, 2009 at 4:19 PM, Chricken <[email protected]> wrote:
> Hello,
>
> I have a problem with Liquidsoap.
> Please understand me right: Liquidsoap is absolutely outstanding and
> incredibly powerful.
> There are only a few things, I need help with.
>
> I am using playlists to handle the music.
> These playlists are being shuffled and played via the mode "randomize".
>
> Unfortunately I and my radiopartners have the feeling, that the artists
> from the playlists are still concentrated. It is a bit hard to describe
> what I mean. May be, this way works better:
>
> The original playlist may look like this (the characters stand for artists):
> a a a a a b b b c c c c c c d d d d d e e e e e f f f f f f f f f f f f
> f g g g g g g g g h h h i i i i i i i ....
>
> after randomization the files are played somewhat like this
> a d d b a a c a b b c a c d c e e c c d d e f e e f f g h f g f f f i g
> f f i f i f f f g i g g g g h h i i i ....

Yes, it is possible. What the "randomize" mode does is the following:
everytime the playlist is (re)loaded it is shuffled. The shuffling
algorithm is perfect (assuming OCaml's random functions are perfect,
which is OK): every result is equi-probable (look at the function
randomize in src/tools/utils.ml).

In "randomize" you have the guarantee that a playlist entry is never
played twice in one round, which is not true in "random". (What the
"random" mode does is: everytime a new track is needed, pick a random
one in the playlist.) However, it is possible that a same entry is
played twice between two rounds: imagine a playlist [a,b,c], after the
first loading it is shuffled into [c,b,a], then it is played and
reshuffled for a next round, it is now possible that [a,c,b] is
played.

> As you see, the list is randomized but not enough.

Except for the problem between rounds, I don't think we have a real
lack of randomness. In any case, only a lot of data could justify such
claim. But in fact, the crucial thing is that you probably don't want
real randomness, but rather some apparent randomness (absence of
obvious patterns and repetitions).

> So my question: Is there a way to improve the randomization for the
> playlist-mode "randomize"?

The easiest way for you is to use request.dynamic() with a custom
script instead of playlist(). That's what we do at dolebrai.net, it
allows us to ensure non-repetition delays based on titles and artists.
(We use a sql-lite database for remembering when a track/artist was
played last.)

Now for improvements of liquidsoap, there are two things: (1) The
problem of randomize between rounds. (2) Probably more important: find
a way to integrate other features, like track scheduling that ensures
the absence of repetitions, directly into liquidsoap instead of asking
users to write their scripts. Such things are standard needs, I don't
have any good idea on that matter, but I'm open to proposals and
discussions.

> BTW: Is it correct, that the reload-mode "round" in the
> playlist-function means, that the playlist is loaded again, after the
> whole list has been played?

Correct, yes.

Cheers.
-- 
David

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to