> Ashworth Payne <email.ashwo...@gmail.com> wrote > > Yes, I had considered it. I just happen to be even less-capable with other > scripting languages :) > > How about another, simpler approach: > > How can I precede every triggering of playlist(random,/path/to/) with > single(/path/to/file.mp3). the local bands love being in rotation and i > like helping them out, but they're often out-of-genre, and listeners > freak-out when their expectations aren't met. I'd like to mitigate > genre-shock with a generic intro like "Local talent, on the hour..."
OK fairly new to Liquidsoap but I'm doing something similar with promos. When you setup a playlist e.g. myfeaturedshows = playlist(mode="random",reload=3600,"/dir/shows/featuredshows") myradioclash = playlist(mode="random",reload=3600,"/dir/shows/featuredshows/radioclash") myallmusic = playlist(mode="random",reload=300,"/dir/shows/music") mymashups = playlist(mode="random",reload=300,"/home/shows/music/mashup") You can then create a schedule of those shows, so: daytimerandom=random(weights = [2,3,2],[mypromos,myallmusic,myfeaturedshows]) randomfilleronly = random(weights = [1,4,2],[mypromos,myfiller,mymashups]) slotradioclash=rotate(weights = [1,1,1,1,2],[mypromos,myradioclash,myallmusic,myradioclash,mymashups]) You might want to use rotate in the schedule rather than random - random in the playlist or the schedule selects something randomly with the weights in mind, so ie. for 'randomfilleronly' it would play 4x as more myfiller than mypromos, but not in that order. Whereas for slotradioclash it will play 1 promo, then 1 myradioclash selection in that order then 1 thing from myallmusic. Those items themselves might be randomly chosen, bit this way you can have a fixed order to your shows. Probably the way would be to to put each band into their own directory, and make sure the interview is the top thing, named !!!-interview.mp3 or whatever then create a playlist per group. Or you could create a separate interview playlist (which could be a PLS file, or M3U, doesn't have to be a directory) for each and play a 'local band' selection on the hour, with the interview first in the playlist or directory. If you have many of these, or want both chosen randomly, then that I'm not sure how you can do that without defining each in order, although if you numbered it rather than say bandnames you could have 24 slots per day, 24 directories? Again if there are more then you'd have to do this programmatically. I myself am struggling with the idea of trying to 'bias' newer shows while keeping the rest random, which is similar - I think some sort of playlist and script that deletes a file from the PLS or M3U after playing might be the way to go…btw if it doesn't find anything it will skip to the next 'source' - playlist or file or whatever - so be aware of that - but you can use that cascading idea usefully too to play something only if it's there, otherwise play something else... You can easily create a local bands playlist - either manually as a playlist PLS or M3U, or have a local band directory which you can select on the hour to play just one track using rotate. You'd do that with a switch statement like this: radio = switch([ ({ 20h-22h30 }, randomfilleronly), ({ 1w }, daytimerandom), ({ (6w or 7w) and 0h-12h }, slotradioclash), ({ true }, daytimerandom) ]) (the last one being a fallback - you could have a file with default = single("myfile.mp3") defined, or have a live feed fallback or override - if you want a live feed override you just put it first, Check out the documentation or some of the examples. The only thing you might need to add track_sensitive=false to the statement ie. switch(track_sensitive=false[ if you want it to cut in immediately - otherwise it'll wait after the track has finished. I personally have long shows scheduled so do that, if you're just using small tracks you might want to wait. I even have sweepers coded via a script from Voisses Tech, but that's probably a bit complicated to add here ;-) I do wonder if you could do some sort of switch on filename for your interview + band issue - selected on the interview first - so Liquidsoap reads in the metadata or filename using on_metadata - then selects the next one. I know you can 'add' to a playlist dynamically, but closest I've done to that is last.fm submission which now works - all of my issues are having not had the libraries installed! ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users