Hey,

On Sun, Mar 16, 2008 at 3:09 PM,  <[EMAIL PROTECTED]> wrote:
>  if i simply add this, i get an error message from liquidsoap
>  asking for some value :
>  it's WORK ONLY (for me) if i add (value are example) :
>  radio = crossfade(start_next=1.,fade_out=5.,fade_in=5.,radio)
>  and NOT ONLY
>  radio = crossfade(radio)
>  I'm guessing there is default value..but seems not.
>  But now it's work, that's the goal . :-)

The crossfade() taken from the wiki and the one included in utils.liq
are not exactly the same. The one from the wiki requires all
parameters, while the one in utils.liq has default values. To use the
one from utils, simply don't mask it by pasting the one from the wiki
in your script.

>  if i change "track_sensitive=false" to track_sensitive=true
>  it mean liquidsoap don't stop the currently played
>  track to start the scheduled playlist ?

Yes, a track_sensitive switch will only switch at ends of tracks.

>  I my first radio.liq i use only one playlist = "myplaylist"
>  but now i wish to use 3 playlists.
>  How to define a radio with multiple playlist ?
>  Please let me know if I'm right.
>  #-----------------------------
>  promotions = playlist("/home/xxxxx/promo.lst")
>  aprem = playlist("/home/xxxx/mix-minimal.lst")
>  normal = playlist("/home/xxxx/minimal.lst")
>  radio = aprem
>  radio = normal
>  radio = promotions

Here you're making a mistake. You define radio to be aprem, then you
re-define it to be normal, and again with promotions. When redefining
something, you completely mask the previous definition. Your code here
is equivalent to: a = aprem b = normal radio = promotions, where a and
b are useless. If you want to combine the three playlists, you need to
do that explicitly. This is typically done with a switch or random
node:
  radio = random(weights=[1,3],[promotions,
    switch([ ({14h45-18h}, aprem), ({18h-14h45}, normal) ]) )
Now radio is a source that combines tracks from the three playslists.

>  Then, can I use the crossfade function like that ? Is it working for "radio"
>  defined like above ?:
>  radio = crossfade(start_next=1.,fade_out=5.,fade_in=5.,radio)

Yes, this is still working, because radio is still a source.

>  It crossfade ALL tracks of ALL my playlist ? (but NO crossfade between tracks
>  from differents playlists).

In liquidsoap, every operator has only a local view of things: it sees
its fathers, and its children, but not beyond them. The crossfade
operator here sees tracks coming from the radio source. But it cannot
distinguish tracks that are coming from aprem or normal. Thus, all
tracks will be treated the same way: there will be a crossfade between
any two tracks.

If you want crossfades only on aprem, then wrap aprem in a crossfade,
before adding the switch:
  radio = random(...switch(...crossfade(aprem) ..)..)
You have to think of your configuration as a graph where nodes are
sources and operators: the order of operators on the paths of that
graph matters in how the stream is produced.

>  Now i'm trying to use "switch" function but not easy to insert in my
>  "flux_final"
>  flux_final = switch([({14h45-18h}, aprem), ({18h-14h45}, normal)])
>  it not work.

What doesn't work, exactly ? Maybe it "works" but doesn't do what you
want. In any case, I've used switch above, and I think it should work.

Hope that helps,
Bon courage!
-- 
David

PS: Si tu veux passer en français, ça nous va. J'en profite pour
t'annoncer qu'on fera un pot Savonet/Dolebraï début Avril, où tous les
intéressés sur Paris sont invités: ce serait l'occasion de se
rencontrer en vrai. A+

Reply via email to