-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoff-air.liq
50 lines (38 loc) · 1.33 KB
/
off-air.liq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/local/bin/liquidsoap -v
# Based on jukebox.liq
# Off Air Loop script by Matthew Stratford <[email protected]>
# Launched on URY Tue 27-03-2018
set("init.daemon.pidfile.path", "/usr/local/var/run/liquidsoap/off-air.pid")
set("log.stdout",true)
set("log.level",3)
set("log.file", true)
set("log.file.path","/usr/local/var/log/liquidsoap/off-air.log")
set("frame.audio.channels",2)
set("frame.audio.samplerate",48000)
# That loop that is ever so catchy, right?!
offlineLoop = mksafe(single("/jukebox/offlineLoop.wav"))
# Jingles every 1min~ish
jingles = playlist(reload_mode="watch", "/jukebox/jingles")
jingles = delay(60. , jingles)
#jingles = smart_crossfade(start_next=1., fade_in=1., fade_out=1., jingles, conservative=true)
offlineLoop = amplify(0.70,offlineLoop)
# A simple cross-fade for transitions
def crossswitch(a,b)
add(
normalize=true,
[
sequence([
#blank(duration=.1),
fade.initial(duration=1.0,b)
]),
fade.final(duration=1.0,a)
]
)
end
# Put all the pieces together
offair = fallback([jingles, offlineLoop])
# Avoid too much blank/silence between jingles and offline loop.
offair = skip_blank(max_blank=1., offair)
offair = amplify(0.4, offair)
# Output to soundcards
output.jack(id="offair", start=true, offair)