"Auto DJ" feature (like the LiquidSoap hack on old version)


#1

Hi there, I have got the server installed and LibreTime running :slight_smile:
Is there a way to set an “Auto DJ” that plays files from directory(s) in a scripted manner? Like the LiquidSoap hack we use on the older version?

The following is an example of how I used to do it:

def mixsetfade(~id="",~conservative=true,~start_next=3.,~fade_in=3.,~fade_out=3.,thesource)
thesource = fade.in(duration=fade_in,thesource)
thesource = fade.out(duration=fade_out,thesource)
fader = fun (a,b) -> add(normalize=false,[b,a])
cross(id=id,conservative=conservative,duration=start_next,fader,thesource)
end

jingles = playlist(mode=‘randomize’,reload=60,reload_mode=“watch”,"/disk2/media/Converted-Jingles")
tracks = playlist(mode=‘randomize’,reload=60,reload_mode=“watch”,"/disk2/media/Converted-Tracks")
mixsets = playlist(mode=‘randomize’,reload=60,reload_mode=“watch”,"/disk2/media/Converted-Mixes")

adverts = playlist(mode=‘randomize’,reload=60,reload_mode=“watch”,"/disk2/media/Converted-Adverts")

tests = playlist(mode=‘randomize’,reload=60,reload_mode=“watch”,"/disk2/media/Test-Tones")

failover = single("/disk2/media/Converted-Failover/Mixset.co.uk ~ Failover - 192.mp3")

airplay = mixsetfade(rotate(weights=[1,1,1,3],[jingles,mixsets,jingles,tracks]))
default = fallback(track_sensitive = false,[airplay,failover])

ref_off_air_meta = ref off_air_meta
if !ref_off_air_meta == “” then
ref_off_air_meta := "Airtime - offline"
end

ignore(output.dummy(default, fallible=true))


#2

I’m sure there is a way, but nobody has coded it yet. Most of the work has been done on the AutoPlaylist functionality and some theoretical work on building a web interface to replicate something similar to what is above. I don’t plan on coding anything that doesn’t also provide a web UI to interact with. But you are more than welcome to give a shot at writing the code to do this. It might rely upon a liquidsoap hack to work.


#3

How do you deal with dead air?
Is there no auto dj in this fork?


#4

Could you make this work somehow?