× Warning! This forum is in archival status. New contributions may not work.
Snippet - Complete Liquidsoap Schedule!
  • Along with the great help of Albert FR and the Airtime team, i managed to successfully schedule 24/7 music and playlists with interruptions.

    (Theres no crossfade so if one of the Airtime guys can add their advice on it, it would be great.:)  )

    So if your hunting for a LS schedule along with 24/7 rotation, here's your answer:

    singles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/yourfolderhere/singles")
    replays = playlist(mode='randomize',reload=1,reload_mode="rounds", "/yourfolderhere/replays")  
    jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/yourfolderhere/jingles/")
    show1 = playlist(mode='randomize',reload=1,reload_mode="rounds", "/yourfolderhere/show1/")
    show2 = playlist(mode='normal',reload=1,reload_mode="rounds", "/yourfolderhere/show2/")
    show3 = playlist(mode='normal',reload=1,reload_mode="rounds", "/yourfolderhere/show3/")
    show4 = playlist(mode='normal',reload=1,reload_mode="rounds", "/yourfolderhere/show4/")
    show5= playlist(mode='normal',reload=1,reload_mode="rounds", "/yourfolderhere/show5/")
    show6 = playlist(mode='normal',reload=1,reload_mode="rounds", "/yourfolderhere/show6/")


    # Schedule

        sunday = rotate(weights = [1, 6], [jingles,singles])
        monday = rotate(weights = [1, 6], [jingles,replays])
        tuesday = rotate(weights = [1, 1], [jingles,show1])
        wednesday = rotate(weights = [1, 1], [jingles,show2])
        thursday = rotate(weights = [1, 1], [jingles,show3])
        friday= rotate(weights = [1, 1], [jingles,show4])
        saturday = rotate(weights = [1, 1, 1], [jingles,show5,show6])
        rotating = rotate(weights=[1,2,1,5],[jingles,replays,jingles,singles]) 

    default=fallback(track_sensitive=false,[switch(track_sensitive=false,[

    #Sunday#
       
    # Define your desired hours
               ({ (0w) and 07h-12h}, sunday),
                
                #Monday#
                
                ({ (1w) and 02h-07h}, monday),
                
                #Tuesday#
                
                ({ (2w) and 07h-12h}, tuesday),
                
                #Wednesday#
                
                ({ (3w) and 19h-21h}, wednesday),
                
                #Thursday#
                
                ({ (4w) and 07h-12h}, thursday),
                
                #Friday#
                
                ({ (5w) and 07h-12h}, friday),
                
                #Saturday#
                ({ (6w) and 18h-20h}, saturday),
                
                ]),
    # define what will be 24/7 -> in this case its "rotating"
                rotating
                ])
               
    ignore(output.dummy(default, fallible=true))


    Happy Scheduling! :)
    Post edited by Guytrance at 2012-10-06 11:47:04
  • 11 Comments sorted by
  • can this be run as a standalone liquidsoap script or does it require an edit to airtime?

    Great work... just... great work. also good to learn from!
  • ADMIN PLEASE REMOVE THIS POST..... it was a double post. Thanks! :)
    Post edited by Greg D at 2012-10-26 23:37:20
  • Reply to @Greg+D:

    This is for Airtime liquidsoap system..maybe one of the developers can pitch in and adapt this to standalone ;)
  • how does one set this up in airtime? I am looking into Liquidsoap configuration/scripting. 

    so where does this go in airtime? doesnt look to hard to set up as standalone. 
    Post edited by Greg D at 2012-10-27 19:30:51
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    I want to know what is the trigger for the fallback!
    is it triggered by X seconds of silence? if yes, can this seconds be set?
    or does it work in another way?
    greetz
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • 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.
  • Thanks!

    A question - is it possible to add playlists together (ie. you have dance and rock playlists, then a combined rock + dance playlist)?

    Also can you play one show/file randomly then go back to another playlist once that has finished - ie. rather than

    show1 > show 2 [cutoff when switched]

    show1 > randomplaylist
    e.g. randomplaylist : promo + music looping until the next 'switch'
  • A question - is it possible to add playlists together (ie. you have dance and rock playlists, then a combined rock + dance playlist)?

    That is exactly what airtime schedule does! you do not need a script for that.I any case there are clues in the script for that. Please note I am not writing any script to replace Airtime ls_script.My job is to enhance that.
    please note also I am just saying we should use things to enhance the development of Airtime and not to side swipe it and its in now way I am being rude.

    Oh and what is a round?!

    There is a
    1.  "mode" to play music from playlist and
    2. there is a "mode" to reload the playlist

    "mode" to play music from playlist

    Play the files in the playlist either in the order (“normal” mode), or shuffle the playlist each time it is loaded, and play it in this order for a whole round (“randomize” mode),

     or pick a random file in the playlist each time (“random” mode).

    mode (string – defaults to "randomize")


    There is a "mode" to reload the playlist

    Unit of the reload parameter, either 'rounds' or 'seconds'.

    reload_mode (string – defaults to "seconds")

    So play with both method and let us know


    All your answers are here

    http://savonet.sourceforge.net/doc-1.0.0-beta1/reference.html




    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.
  • I'm currently in the process of switching my development from centova cast and looking at airtime.

    I'm going to take a look at crossfades for you when I implement this on my testbox later on tonight.