From: Jean-Michel C. <ra...@ox...> - 2009-01-20 16:20:27
|
Hello, I'm looking to do a crossfade between two songs and put a jingle inside, but i don't really know how to do that. expl: 1st song ends in three seconds (for example) > the jingle starts without fading on the last second > the on the last second of the jingle, the next song start with a three seconds fade.initial -3 > -1 > JINGLE > +1 > +3 i hope to be understand ;;) thanks in advance, raps |
From: David B. <dav...@gm...> - 2009-01-20 16:34:13
|
Hi, On Tue, Jan 20, 2009 at 5:04 PM, Jean-Michel Cattiez <ra...@ox...> wrote: > I'm looking to do a crossfade between two songs and put a jingle inside, > but i don't really know how to do that. Let us start from a normal crossfade as shown in the cookbook (cross-based transitions): 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(duration=start_next,fader,s) end my_source = crossfade(start_next=1.,fade_out=1.,fade_in=1.,my_source) Here the transition function is "fader", a crossfade: it mixes the (faded-out) ending track with the (faded-in) starting track. We will simply add a jingle in that mix. jingle = playlist(...) fader = fun (a,b) -> add(normalize=false,[fade.in(b),once(jingle),fade.out(a)]) my_source = cross(fade,s) The only trick is to add once() around the jingles in the add(). It is there to tell that only one jingle track should be played per transition. (The function once() is defined in the library utils.liq which should be correctly installed on your system.) You can set the duration parameters in fade.*() and cross() if you want. Another possibility is to delay the jingle or the next track (that's "b") by playing silence before them. For example: fader = fun (a,b) -> add(normalize=false,[ fade.in(b), sequence([blank(duration=1.),once(jingle)]), sequence([blank(duration=2.),fade.out(a)) ]) Etc etc. Hope that helps, -- David |