This is great information. Let me ask one dumb question. Is there a good
way to dynamically merge the 30-minute playlists from the separate sources?
In other words, I've got
music = playlist(mode='random', "/mnt/musicMount/watch/BLUES/")
comedy = playlist(mode='random', "/mnt/musicMount/watch/COMEDY/")
liners =
playlist(mode='random',"/mnt/musicMount/music/imported/4/unknown/unknown/")
If I want one thing from "liners" and then one thing from "comedy" and then
28 minutes from "music," can I make that happen? i thought merge_tracks
would do that, but it's clearly not for that. Should I be reading up on PLS
files to do this operation in the PLS file instead of inside of the
Liquidsoap code?
Thanks!!


On Thu, Apr 4, 2013 at 4:54 PM, Kevin McQuiggin <[email protected]> wrote:

> Hi Chris:
>
> I just had (and solved) the same problem!
>
> Put your two show lineups into two playlists, call them "program1.pls" and
> "program2.pls".
>
> Use playlist.merge() to create a single track out of the playlists.  You
> need a short macro/function definition for this, see below.
>
> Then use a switch() construct to schedule the two merged playlists at the
> top and bottom of the hour.
>
> You can do it like this:
>
> ---
>
> def playlist.merge(uri) =
>   pl = playlist.reloadable(uri)
>   reload = fst(pl)
>   s = snd(pl)
>   s = merge_tracks(s)
>   on_end(delay=0.,fun(_,_)->reload(),s)
> end
>
> security=single("some file to play when all goes wrong")
> x = audio_to_stereo(playlist.merge("program1.pls"))
> y = audio_to_stereo(playlist.merge("program2.pls"))
> s=switch([        ({0m}, x),
>                   ({30m}, y)
>           ])
>
> radio = fallback(track_sensitive=false, [
>                         s,
>                         security
>                         ]
>                 )
>
> ---
>
>
> You may not need the audio_to_stereo() function if your files are already
> 2-channel.
>
> Hope this helps, it works for me,
>
> Kevin
>
>
>
>
> On 2013-04-04, at 12:42 PM, Christopher Muldrow <
> [email protected]> wrote:
>
> > I'm trying to use Liquidsoap to play a jingle, then a news report, then
> a weather report at the top of the hour (00m0s). Then I want it to play
> music pulled from a single folder until the bottom of the hour (30m0s),
> when I want to play another jingle, replay the news report and replay the
> weather report. The jingles are in a folder. The news and weather are
> single files on the file system. I've tried using a switch, but the news
> and weather files aren't necessarily the same length every day, so I can't
> figure out how to set the value in the switch to peg the time for this
> whole sequence to begin. Any hints?
> >
> > --
> > Chris Muldrow
> >
> >
> >
> ------------------------------------------------------------------------------
> > Minimize network downtime and maximize team effectiveness.
> > Reduce network management and security costs.Learn how to hire
> > the most talented Cisco Certified professionals. Visit the
> > Employer Resources Portal
> >
> http://www.cisco.com/web/learning/employer_resources/index.html_______________________________________________
> > Savonet-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
>
> ------------------------------------------------------------------------------
> Minimize network downtime and maximize team effectiveness.
> Reduce network management and security costs.Learn how to hire
> the most talented Cisco Certified professionals. Visit the
> Employer Resources Portal
> http://www.cisco.com/web/learning/employer_resources/index.html
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>



-- 
Chris Muldrow
Chief Digital Officer
The Free Lance-Star Companies
[email protected]
540-368-5006
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to