#default = amplify(id="silence_src", 0.00001, noise())
# auto DJ additions from Voisses script
myplaylist = playlist(mode="random",reload=300,"/home/shows")
promos = playlist("/home/shows/genericpromos")
security = single("/home/shows/genericpromos/Listening to RCL -sting.m4a")
mymusicbackup = mksafe(myplaylist)
mypromos = promos
playmymusicbackup=rotate(weights = [1,5],[mypromos,mymusicbackup])
default = fallback(track_sensitive = false,[playmymusicbackup,security])
ref_off_air_meta = ref off_air_meta
if !ref_off_air_meta == "" then
ref_off_air_meta := "Airtime - offline"
end
#default = rewrite_metadata([("title", !ref_off_air_meta)], default)
ignore(output.dummy(default, fallible=true))
Voisses Tech said:yes just set the airtime fade to a greater number
Early mornin' - 05:00-08:00
mornin' - 08:00 - 12:00
midday - 12:00 - 18:00
early evening - 18:00 - 21:00
late evening - 21:00 = 00:00
night - 00:00 - 05:00
I'm in a similar position like you.Andrea Sellaroli said:Hi, is there any way to play from sound card's line-in when nothing is schedule? I need to use a two line-in sound card, one to record live show and another to play a satellite radio when nothing is scheduled.
I'm using ubuntu server.
Thanks,
Andrea
default = amplify(id="silence_src", 0.00001, noise())
# Include your own liq script path
%include "/etc/liquidsoap/myscript.liq"
Then you can safely do any modification in myscript.liq and next time you upgrade or reinstall airtime just have to add the include line again.
#!/usr/bin/liquidsoap
#set("log.file.path","/var/log/liquidsoap/myscript.log") //disable the log
clock = single(id="clock","/var/airtime/stor/sounds/clock.mp3")
silence = amplify(id="silence_src", 0.00001, noise())
morning = playlist.safe(reload=43200,mode='random',"/var/airtime/stor/playlists/morning.m3u")
night = playlist.safe(reload=43200,mode='random',"/var/airtime/stor/playlists/night.m3u")
afternoon = playlist.safe(reload=43200,mode='random',"/var/airtime/stor/playlists/afternoon.m3u")
# Some jingles
jingles = playlist.safe(mode='random',"/var/airtime/stor/playlists/jingles.m3u")
# If something goes wrong, we'll play this
security = audio_to_stereo(single("/var/airtime/stor/sounds/default.ogg"))
radio=fallback([
switch(track_sensitive=false,[
({ 1w and 1h-6h }, night),
({ (2w or 3w or 4w or 5w) and 0h-6h}, night),
({ (1w or 2w or 3w or 4w or 5w) and 6h-10h}, morning),
({ (1w or 2w or 3w or 4w or 5w) and 18h-20h}, afternoon),
({ 6w and 3h-6h }, night),
({ 6w and 6h-9h }, morning),
({ 7w and 1h-6h }, night),
({ 7w and 6h-9h }, morning),
({ true }, silence)
])
])
# Now add some jingles
radio = rotate(weights = [1, 4],[jingles, radio])
# And the clock thing
radio = add([radio, switch([({0m0s},clock)])])
# finally the security
default = fallback([radio, security])
#output.icecast( //REMOVED THE OUTPUT AS IT WILL BE BROADCASTED BY AIRTIME-LIQUIDSOAP
# %vorbis,
# host = "localhost",
# port = your_port,
# password = "your_password_here",
# mount = "offline" ,
# genre="radio",
# description="Some description here!",
# name="(((( station_name ))))",
# radio)
Good Luck
VOISSES
"Open source is the best since slice bread"
Like I said this is the easy stuff for the NOOB or like I always say dummies like me
now how do you use it
Just put the function (its in the utils but I want my custom version) some where above where you want to use it
here is mine
# Define a transition that fades out the
# old source, adds a single, and then
# plays the new source
def outside_k(jingle,old,new) =
# Fade out old source
old = fade.final(old)
# Superpose the jingle
s = add([jingle,old])
# Compose this in sequence with
# the new source
sequence([s,new])
end
# A transition when switching back to files:
def outsidetrans_d(old,new) =
# We skip the file
# currently in new
# in order to being with
# a fresh file
source.skip(new)
sequence([old,new])
end
now for my default
I have say two jingles define jingles
The reason why you should use single is they a prepared and available once the script starts until the script end
do not use the same jingle immediately behind each other in a switch or transitions because if the script call the same source at the same time you will have some serious catch up to do when Source A request the Jingle that Source B is consuming. and you like will see "we must catch up 1.06 sec) and you will search down the world to get what's wrong
mystationID=single(blah)
myjingles1=single(another blah)
myjingles2=single(yet another blah)
#format default=fallback(track_sensitive=false,[transitions],[whatever to transition])
default=fallback(track_sensitive=false,[outsidetrans_k(mystationID),outsidetrans_k(myjingles1),outsidetrans_d(myjingles2)],[live,music,default*])
#so basically what it does in the case of
so if you use the above (5) you can time the amount of silence you want because once the logics is that once any one of the source become unavailable the previous will be tested for availability Then the proceeding will be tested for availability.
note previous source have priority and will go once they are available,so feel free to change the order to your liking
so if live becomes unavailable music will play ,if music becomes unavailable it will test live before proceeding to default.
notice some nice things in the cook book like fade final,source skip(like the current song in queues to a new on as the transition occurs)
so now with knowledge you should be able to change the djs line which contains [trans ,trans blah blah] in the airtime script
Voisses
It looks like you're new here. If you want to get involved, click one of these buttons!