On Sun, Apr 19, 2009 at 7:22 PM, Romain Beauxis <[email protected]> wrote:
>        Hi !
>
> Le Sunday 19 April 2009 13:08:26 Upp, William, vous avez écrit :
>> I am looking for some scripting help to play a certain file on a certain
>> day.  What I want to do is, say on Sunday at noon have liquidsoap go and
>> retrieve a file and play it, then when it is done, return to normal
>> playing.  I have read about being able to play certain playlists at certain
>> times (like day and night) and I am thinking that altering this script in
>> some way would do it, but I have not had much luck yet in accomplishing
>> this.
>
> Indeed, you can use some time-based predicate for building your source with
> liquidsoap.
>
> The syntax and usage of the time predicates is explained at the bottom of this
> page:
>  http://savonet.sourceforge.net/doc-0.9.0/language.html
>
> For instance, if your normal source is s, and your special source is x.
> If you want that x is played only on sunday at noon, then you can do:
>
> s = switch( [ ({0w and 12h},x), (true, s) ] )
>
> However, there are several thing to check to make this work.
> First, the time predicate 0w and 12h will in fact be true during one hour and
> you want to play only one song of x. Hence, you should use a delay operator
> around x:
>  x = delay(3600.,x)
> This operators will make sure that each time a song is played from x, then
> after this song, x is not be available for 3600 senconds (one hour).
>
> Hence, as soon as one song has been played by x in the switch above, x will
> not be available and s will be played. Since the delay is one hour, when x is
> available again, the time predicate is no longer valid such that you are sure
> that only one song will be played from x.

mmm, and what to do if in x we need to play a file longer than 1 hour
but we do not know how long...
for example an old live concert, an old radio live recorded file....
(and maybe is not longer than 1 hour too...)

and, is this the best way to play/launch things like that?

regards
luciano

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to