Hi Renee,

What you want is a little complicated, but not too bad.

If you look at some of the samples, they do use variables.  I will try to
pick one later today or tomorrow.

I am sure there are other ways, but what I would do is set up three sources.
1) The live source
2) A random source that points to the directory with your music, that has a
boolean switch to enable/disable, and an 'on_end' event handler.
3) A singleton with your "This Station is Current off Air" loop.

In the "on_end" event.. you can increment the counter, and if it is more
than 10, set the boolean to false, so the random source stops at the next
song, and Liquidsoap will fall back to the singleton.

Regards from USA.

Nick


On Wed, Jul 19, 2017 at 2:33 PM, René Jaun <[email protected]> wrote:

> Hello,
>
> I continue being a very happy LiquidSoap User overall...
>
>
> Here's however another problem I'm struggling with.
>
>
> Here's what I'd like to achieve:
>
> We're broadcasting a live feed, coming from let's say a Football Stadion.
> As soon as the feed goes offline, LiquidSoap should play some music, with
> Station IDs added in between the tracks. The tracks will be randomly picked
> from a large pool.
>
> After 10 tracks,, it should fallback to our "This Station Is Currently Off
> Air" loop.
>
>
> Whenever the Live Feed comes back on, LiquidSoap should switch to it,
> resetting the counter for the "10 tracks" to 0; So that when the feed stops
> again, 10 new tracks will be played from our music pool.
>
>
> Instead of playing "10 tracks" I could also work with a time based numer,
> like "30 minutes of music".
>
>
> Well, I have not yet found many LiquidSoap examples working with things
> like variables, counters or timers.
>
> In fact, I do have issues figuring out how to even "increase" a possible
> "Song counter" by 1. I guess I am missing the obvious, or am I?
>
> I have a "fallback" in place, switching to "Live" as soon as it becomes
> available, then falling back into the "10 tracks" pool and finally to the
> "Off Air Loop". With the only problem that "10 tracks" does not become
> unavailable after  the 10 tracks (or 30 minutes). :)
>
>
> I welcome any pointers you could share.
>
>
> Thanks a lot and best regards from Switzerland,
>
> René
>
> $
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to