Hi, Your crossfade definition seems fine at first glance. Do you have more logs related to the time those silences appear?
Thanks, Romain 2016-11-04 5:45 GMT-05:00 DreamStreamKicker <[email protected]>: > > > We also use some very short stings for jingles (1-2 secs each) they > create a silence in this crossfade, longer stings work perfectly, I > can't figure out why, anybody any idea? These are my settings: > > # Custom crossfade to deal with jingles.. > def smart_crossfade (~start_next=2.5,~fade_in=0.05,~fade_out=0.5, > ~default=(fun (a,b) -> sequence([a, b])), > ~high=-15., ~medium=-32., ~margin=8., > ~width=2.,~conservative=false,s) > fade.out = fade.out(type="sin",duration=fade_out) > fade.in = fade.in(type="sin",duration=fade_in) > add = fun (a,b) -> add(normalize=false,[b, a]) > log = log(label="smart_crossfade") > > def transition(a,b,ma,mb,sa,sb) > > list.iter(fun(x)-> log(level=4,"Before: #{x}"),ma) > list.iter(fun(x)-> log(level=4,"After : #{x}"),mb) > > if ma["type"] == "jingles" or mb["type"] == "jingles" then > log("Old or new file is a jingle: sequenced transition.") > sequence([sa, sb]) > elsif > # If A and B are not too loud and close, fully cross-fade them. > a <= medium and b <= medium and abs(a - b) <= margin > then > log("Old <= medium, new <= medium and |old-new| <= margin.") > log("Old and new source are not too loud and close.") > log("Transition: crossed, fade-in, fade-out.") > add(fade.out(sa),fade.in(sb)) > > elsif > # If B is significantly louder than A, only fade-out A. > # We don't want to fade almost silent things, ask for >medium. > b >= a + margin and a >= medium and b <= high > then > log("new >= old + margin, old >= medium and new <= high.") > log("New source is significantly louder than old one.") > log("Transition: crossed, fade-out.") > add(fade.out(sa),sb) > > elsif > # Opposite as the previous one. > a >= b + margin and b >= medium and a <= high > then > log("old >= new + margin, new >= medium and old <= high") > log("Old source is significantly louder than new one.") > log("Transition: crossed, fade-in.") > add(sa,fade.in(sb)) > > elsif > # Do not fade if it's already very low. > b >= a + margin and a <= medium and b <= high > then > log("new >= old + margin, old <= medium and new <= high.") > log("Do not fade if it's already very low.") > log("Transition: crossed, no fade.") > add(sa,sb) > > # What to do with a loud end and a quiet beginning ? > # A good idea is to use a jingle to separate the two tracks, > # but that's another story. > > else > # Otherwise, A and B are just too loud to overlap nicely, > # or the difference between them is too large and overlapping would > # completely mask one of them. > log("Using default.") > add(fade.out(sa),fade.in(sb)) > end > end > > smart_cross(width=width, duration=start_next, conservative=conservative, > transition,s) > end > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > Savonet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/savonet-users
------------------------------------------------------------------------------
_______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
