Hi Jonas, and welcome. You're assuming wrong: this functionality is already there! We've considered cross-fading based on three parameters (to be passed as metadata): fade_in, fade_out, start_next. The first two give the duration of the faded sections of a file, and the last one tells at which point of this file the next file should start (this is given as a duration before the end).
To realize a cross-fade in liquidsoap you need to use cross() (or smart_cross) together with a transition function which uses fade.initial and fade.final (or fade.in/out). Those operators can behave according to metadata. There are unfortunately more than one way to do it, with more or less flexibility, and I don't think I have a ready-made example anywhere. This should be fixed. Here's a description of a simple setup for a starter. Assume your initial source is s. First, let's apply the fading: faded_s = fade.in(fade.out(s)). Now we have a source whose tracks extremities are faded. The duration is the default one (cf. liquidsoap -h fade.in) unless it is passed in the metadata field liq_fade_in / liq_fade_out. It remains to cross the tracks: start_next seconds before the end of a track we want to start the next one. We'll define crossed_s = cross(f,faded_s). Again, start_next has a default value which is overridden by the metadata field liq_start_next. The function f is in charge of describing how we cross, here it's simply fun(a,b)->add(normalize=false,[b,a]). Finally, how do we attach all those metadata fields? You probably don't want to edit the file's metadata. A better way to go is to use <annotate:liq_start_next="foo",liq_fade_x="bar":filename> instead of just <filename> as a request. This can be done easily if you're using request.dynamic() or single(). With playlist() you have to either generate an annotated playlist, or use map_metadata to generate the extra metadata on the fly. I haven't been using this for a while (and I didn't test my example) but this should be working fine. If you need more, we can discuss extensions and other approaches. Have fun! -- David ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Savonet-devl mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-devl
