From: thomas B. <to...@tb...> - 2012-07-28 21:54:32
|
Hi Peter Thanks for your answer. I read the same part of the api reference :), but i'm not sure wether i interpret the liquidsoap code under smooth_add correctly. I'm still not 100% familiar with LS syntax/expressions :( But what i unterstand i need to "add" the normal source to the special source instead to be the special source the first source. I'll have another look at the code and try again! Thanks again for helping! -- Tom Liquidsoap rocks! Am 28.07.2012 14:54, schrieb Peter Walter: > hi tom, > > the api reference for "add" states that it "Only relays metadata from > the first source that is effectively summed". but you're adding with > "normal" still being the first source in both transitions. > > regards > peter > > On 07/27/12 16:30, "T. Bühlmann" wrote: >> 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! >> >> ------------------------------------------------------------------------------ >> >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. >> Discussions >> will include endpoint security, mobile security and the latest in >> malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Savonet-users mailing list >> Sav...@li... >> https://lists.sourceforge.net/lists/listinfo/savonet-users > |