Hi all,
I've been getting to grips with liquidsoap for the past couple of weeks for our unmanned radio station, and I'm very impressed. One thing that I'm trying to achieve though, and want some advice if possible.
I have:

#!/usr/local/bin/liquidsoap
set("log.file.path","/home/audio/failure_stream/liquidsoap.log")
set("log.stdout", false)

day     = playlist("/home/audio/failure_stream/music")
jingles = playlist("/home/audio/failure_stream/jingles")
security = single("/usr/share/icecast2/web/stream_failure.ogg")

radio = day
radio = random(weights = [1, 1], [jingles, radio])
radio = fallback(track_sensitive = false, [radio, security])


def crossfade(~start_next,~fade_in,~fade_out,s)
  s = fade.in(duration=fade_in,s)
  s = fade.out(duration=fade_out,s)
  fader = fun (a,b) -> add(normalize=false,[b,a])
  cross(fader,s)
end
## radio=crossfade(start_next=1.,fade_out=1.,fade_in=1.,radio)

radio=smart_crossfade(fade_out=0.5,fade_in=0.5,radio)

## if we get silence, then move on
radio = skip_blank(threshold=-28.,length=3.,radio)

## normalise and compress the audio
radio = nrj(radio)


Then I have the output to an icecast server in ogg and mp3 format.
What I'd like is:
day track
randomly decide if i should play a jingle or not
day track
randomly decide if i should play a jingle or not
etc

So I think I need a combination of random and switch to do that, can anyone advise me on what to try??

Thanks in advance :)


--
Andy
e: andy @ broadcast-tech.co.uk


Reply via email to