liquidsoap gurus,

Objective
-------------
I'm trying to set up a simple script that will run 24/7 with pre-defined
sets / playlists and a fallback set / playlist.


Requirements
--------------------
- The pre-defined sets are to play for 1h, during the schedule specified.

- If a previous set was playing, predefined or fallback, it's cut in favour
of the new set.

- If a set has less than 1h of music, the fallback set kicks in and chooses
a song to fill the rest of the time

- If the set has more than 1h of music, more specifically if it plays past
the 1h mark, it gets replaced by the fallback set or next set if scheduled
right after.

- There needs to be a transition between sets, including the fallback
because sets may be shorter or longer than 1h.

- Transitions are not required between songs.


Scenario / Test
----------------------
sf plays until s1 comes on then s2 comes on then back to sf


Issue
-------
I've noticed that transitions work properly from sf -> s1 -> s2 but once
going from s2 back to sf, s2 is not faded out. sf is however faded in.

The log shows the first two switches as "with transition" while the last
switch is with a "forgetful transition"


Info / Versions
---------------------
- liquidsoap 1.0.0
- ubuntu precise


Script
---------
Below is a full self contained script that illustrates my setup and
observed issue:

#!/usr/bin/liquidsoap -v

set("log.file.path","fade_test.log")
set("log.stdout",true)

def crossfade(a,b)
  add(normalize=false,
      [ sequence([ blank(duration=0.25),
                   fade.initial(duration=1.,b) ]),
        fade.final(duration=1.,a) ])
end

d = 6.
s1 = sine(440.,duration=d)
s2 = sine(660.,duration=d)
sf = sine(220.,duration=d)

schedule = switch(
track_sensitive=false,
transitions=[crossfade, crossfade],
[ ({1s-5s}, s1), ({5s-10s}, s2) ]
)

list=fallback(
track_sensitive=false,
transitions=[crossfade, crossfade],
[schedule, sf]
)

out(list)
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to