On Mon, 31 Jan 2011 04:35:35 -0500, David Baelde  
<[email protected]> wrote:

> Hi Andre,

> We just need to break it down to pieces of the right size
> to keep things readable / thinkable.

Regardless which script I will use, the total line count will
approach 2k anyway (I need to list the sources and ID3 tag
function for each Show block).
>
> What really helps is that one show only plays once over one liquidsoap
> execution, because you launch one liquidsoap per day, loaded with a
> description of each show, right?

Correct!

>
> In a first time, let's forget about time slots. It sounds like a show
> could be something of the form:
>   sequence(opener, playlist.once(files_list), closer, filler)
>
> Here opener and closer produce only one track; they could be
> single(..) sources or could be wrapped in a once(..) operator.

I have used single() in my script to make the source infallible.

>
> With that definition the closing jingle won't be played if the
> playlist is too long. If the closer is played too early, the filler
> comes in.
>

This would be great, but unfortunately, there are some Show blocks
where this would not work (see BTG in code below). I have already
defined (in an external PHP code) the length of the 'End' filler.
Calling that file, determines what is in the playlist, and thus I
have pre-computed duration to Show slot end.

I needed finer control (hence the PHP script) that what you have
proposed here.


> The global structure of the script should be something like:
>   SHOW1 = ...
>   SHOW2 = ...
>   ...
>   radio = switch(track_sensitive=false,[ ({SLOT1},SHOW1),  
> ({SLOT2},SHOW2)... ])
>   radio = mksafe(radio) # or fallback with a failsafe jingle
>   output1(radio)
>   output2(radio)
>   ...
>
> I've put a track insensitive switch so that a show starts exactly when
> needed. It will interrupt the previous show (during a normal track, a
> closer, or the filler); a transition can be added to make that smooth.
>
> How does that differ from what you have, and do you see any problem
> with that approach?


The major difference between the two approaches:

1. As mentioned above, I need finer control over the end filler.

2. "...In a first time, let's forget about time slots...":
that's the core of my problem. I need that time slot switch to work.
The rest of the code works fine - our approaches are almost identical.
I need to know whether my 'Switch Schedule' code will work as expected.

I'm not sure whether using 'track_insensitive' in this switch would be
needed or appropriate. From what I read, the final item in a sequence will
always play all tracks. That's what I need.

However, I am presuming that, when the time slot switch kicks in, it will  
end
the playing of that final 'End' filler track (even if not completed - I've
purposefully made that track to go beyond 'Show slot end'), and move
immediately to the next Show block. If it doesn't, I'm in trouble :)
Am I correct?


A chunk of my revised liq script:

(I'm hoping that the 'icmp3 = mksafe(switch())' statement in the 'Switch
Schedule' will work as expected.



****


# === Load MP3 Section ===

     # === ID TO APPLY to SWITCH SCHEDULE ===
        

        # === SSTOL ===
                

                a = single("/usr/local/www/rcr/mp3/announce/SOD.mp3")

                 b =  
single("/usr/local/www/rcr/mp3/announce/opener/opener-sstol.mp3")

                 c = playlist.safe(mode="normal",  
"/usr/local/www/rcr/radio/current/mp3/today-sstol-mp3-32.pls")

                 d = single("/usr/local/www/rcr/mp3/announce/CLOSER.mp3")

                 e = playlist.safe(mode="normal",  
"/usr/local/www/rcr/radio/current/mp3/sstol-mp3-end-32.pls")

            sstol = sequence([a,b,c,d,e])

                (... fill_in function here ....)

            icmp3 = fill_in(sstol)


<... snip ...>


        # === BTG ===

                
                 a = playlist.safe(mode="normal",  
"/usr/local/www/rcr/radio/current/mp3/today-btg-mp3-32.pls")

                 b =  
single("/usr/local/www/rcr/radio/current/mp3/btg/today/btg-mp3-end-32.pls")


            btg = sequence([a,b])
                
                (... fill_in function here ....)

            icmp3 = fill_in(btg)



# === SWITCH SCHEDULE ===


icmp3 = mksafe(switch(

     track_sensitive=true,

     [

       ({09h00-09h30}, sstol),
       ({09h30-10h00}, mfts),
       ({10h30-11h00}, ogp),
       ({10h30-11h00}, coc),
       ({11h00-11h40}, csr),
       ({11h40-12h00}, cosm),
       ({12h00-13h00}, yap),
       ({13h00-13h30}, btg),
       ({13h30-14h00}, cfc),
       ({14h00-15h00}, mh),
       ({15h00-15h10}, codm),
       ({15h10-15h20}, hsip),
       ({15h20-16h00}, csoc),
       ({16h00-17h30}, sp)

     ]

))


output.icecast.mp3(,icmp3)


****


>
> Cheers,

Thanks,
Andre


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to