Liquidsoap and Fallback.skip
  • Hi to everyone,

    i'm trying to making a little better fallback.
    i've seen in kube liquidsoap script the Fallback.skip function that do the same of fallback, but skip the fallback destination to the next track... i hate when fallback fade in the middle of a track!!!!

    But, there's a problem... when i try to put in the lq_sciprt, some wild error appears

    default = fallback.skip(strip_blank(threshold=-35.,length=15.,s),music)

    At line 195, char 65: cannot apply that parameter because the function
    (at line 195, char 16) has no more unlabeled argument
    default = fallback.skip(strip_blank(threshold=-35.,length=15.,s),music)

    At line 77, char 23:
    this value has type
    (input:_)->_ (infered at line 76, char 24-69)
    but it should be a subtype of (the type of the value at liquidsoap_scripts/library/utils.liq, line 6, char 13)
    source(_) (infered at liquidsoap_scripts/library/utils.liq, line 7, char 54-70)
    s , i hope, is the source that will be streamed
    music, fallback playlist
    default, the weight rotation rule

    Thanks to all :D
  • 6 Comments sorted by
  • i've seen this post, but a reply suggest to use fallback.skip, but don't understand where is my error... 

    Why a playlist isn't a source for liquid soap !? and how they make them to use it!?
  • Using the script in the link... liquidsoap react in two ways

    1) fallback run well, but when i come back to fallback from Scheduled Playing... it falls in middle of song
    2) simply nothing works...
    3) fallback ok, and airtime switch (scheduled etc...) doesn't work in any way...
  • It might be worth asking the Liquidsoap team if they have any ideas. Their mailing list info can be found at: http://savonet.sourceforge.net/index.html


    Airtime Pro Hosting: http://airtime.pro
  • I'm using the default_switch instead of a source fallback to go between scheduled and non scheduled playback so I wasn't able to use fallback.skip. Instead I had to make a new transition function based on the old one except with source.skip added to skip to the next track.

    def to_jukebox(a,b) =
      log("transition called...")
      source.skip(b)
      add(normalize=false,
         [ sequence([ blank(duration=0.01),
                       fade.initial(duration=!default_dj_fade, b) ]),
            fade.final(duration=!default_dj_fade, a) ])
    end

    and that is called by the default_switch:

    s = switch(id="default_switch", track_sensitive=false,
        transitions=[from_jukebox, to_jukebox],
        [({!scheduled_play_enabled}, stream_queue),({true},default)])

    One thought I had with your problem is that fallback.skip works both ways.


  • Please read this.,

    There is three (3) excellent script  at the end  that you will want  for airtime

    http://forum.sourcefabric.org/discussion/15701/fallover-101-how-to-make-all-scripts-worked-easy-steps-to-build-your-scripts-fixed-silence

    Modify yours accordingly and post your master piece here

    Please  do not post any problem in this thread it will no longer be answered in this thread

    Post only finished script.Open a new thread with all problems and queries


    http://forum.sourcefabric.org/discussion/15650/airtime-2-4-and-backups-playlists-give-yours

    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.