From: T. B. <to...@tb...> - 2012-07-27 14:49:28
|
Hello all! I've started this thread in february, but since then i had not much time to experiment; even worse the old mails were already deleted.. :( I'm still trying to do a smooth_add while showing the metadata of the "special" source. The Problem is, i'm not getting a smooth transition, it just cuts hard like a fallback at the start and the end of the special source. But i'm ok with the metadata this time. What i have now is this: (Basically "smooth_add" with the "special" and the "normal" Parts switched in utils.liq as David suggested) def smooth_add_meta(~delay=0.5,~p=0.2,~normal,~special) d = delay fade.final = fade.final(duration=d*2.) fade.initial = fade.initial(duration=d*2.) q = 1. - p c = amplify fallback(track_sensitive=false, [special,normal], transitions=[ fun(special,normal)-> add(normalize=false, [c(p,normal), c(q,fade.initial(type="sin",normal))]), fun(normal,special)-> add(normalize=false, [c(p,normal), c(q,fade.final(type="sin",normal)), sequence([blank(duration=d),c(q,special)])]) ]) end As i understand this code, we have a fallback with a transition. The first function fun(normal,special) does this: The normal stream gets added with "negative" amplification of ~q (eq. "1. -p") and with a fade.final (and so fades out). The seqence adds blank for ~delay and starts the special stream then. The function fun(special,normal) does this: It adds normal again to the output (amplified "negatively" by p), but this time with fade.inital(so starts to fade in) The whole process starts as soon as ~special is available at the fallback. >From my point of view, the above code should work. Can anybody point me to the right direction or am i misunderstanding something here? Thanks for helping out! -- Tom Liquidsoap rocks! |