Hi, On Tue, Jan 20, 2009 at 5:04 PM, Jean-Michel Cattiez <[email protected]> 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 ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
