hi
I'm trying to setting up the crossfade between
tracks from same source (myplaylist)i've try differents
examples from documentation or user with no results.
I need to understand some basics, because it's a powerfull soft.
I expect setting it up to fit my needs by myself.
Thank you.
Some questions :
1 - Is the "cross" function enough to make transition ?
Should I use fade.in/fade.out functions in combination
with "cross" function ?
(for beginner like me, more simple is it, better is it)
2 - How to use the example code, kindly writed in the wikki ? there is an
example in documentation:
-----------------------------------------------
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,source)
end
my_source=crossfade(start_next=1.,fade_out=1.,fade_in=1.,my_source)
------------------------------------------------
but where i've to change value ? i'don't understand.
i'm trying to be inspired by others example, but not sure. :-(
Which value have to be changed by mine ?
####--- MY TRY ----------------------------------
def crossfade(a,b) # we tell it's a crossfade from track "a" to track "b" ?
isn't it ?
s = fade.in(duration=7.) # we tell 7 secondes fade in ? isn't it ?
s = fade.out(duration=7.) # same for fade out ?
fader = fun (a,b) -> add(normalize=false,[b,a]) # For me it's completely
mysterious ? sorry.
cross(fader,duration=7,source) # "s" is the time of my crossfade in
seconde ?
What I've to put in place of "source" ?
# this kind of source it's possible : fallback(track_sensitive=false,
[timed_promo, radio, security])
end
resultat=crossfade(a=1.,fade.out=1.,fade.out=1.,fade.in=1.,my_source) # I don't
figure out how to insert it in my final "out" see below "final_flux".
------------------------------------------------
as you can read i'm far away from victory [x_o]
I publish below my radio.liq file with some comment.
(it's work, because very basic)
########################################
set("init.daemon.pidfile.path","/var/run/liquidsoap/liquidsoap.pid")
#log dir
set("log.file.path","/var/log/liquidsoap/radio-test.log")
# Music path
myplaylist = playlist("/home/granfred/minimal.lst")
# Jingles path . unused for now
# jingles = playlist("/home/granfred/jingles.lst")
# Promotions path
promotions = playlist("/home/granfred/promo.lst")
# Ce que l'on passe a la radio - What we feed to the radio
radio = myplaylist
# En cas de pépin sur quelle source sure se rabattre - in case of main source
failure
security = mksafe(playlist("/home/granfred/safe.lst"))
# Intervalle des tracks promo - Promo scheduling, not really accurate.. :-(
timed_promo = delay(3600.,promotions)
# De quoi sera fait mon flux final -
flux_final = fallback(track_sensitive=false, [timed_promo, radio, security])
# Et la sortie complete vers un streaming shoutcast - Then we setup our
shoutcast output function.
out = output.shoutcast.mp3(host="localhost", port=8000, password="xxxxxxxx",
name="+++ SUBFLOW.NET Test streaming, quality=9, bitrate=256, samplerate=44100,
flux_final)