hi back! and sorry for the late reply. thank you very much for all replies and ideas on how to implement the cue/fade thing! i'm still new to the liquidsoap project, so i cannot totally follow your discussion and concerns :) i will now check out if i'm able to use the annotat protocol in a generated playlist. looks not too hard.. if i understand it right, it should be possible to just use eg: annotate:liq_start_next="160",liq_fade_in="20",liq_fade_out="10":/home/dev/workspace/liquidsoap/track1.mp3 annotate:liq_start_next="240",liq_fade_in="5",liq_fade_out="10":/home/dev/workspace/liquidsoap/track2.mp3 ... in a playlist?
and how exactly should i understand davids statement > If needed, it would be easy to add an operator that drops the N first > seconds of each track (with N being possibly read from metadata) as > well as the X last seconds. Note that it would violate the time flow > (creating a sudden acceleration of the stream) but this is not a show > stopper at all. ? thanks a lot + gx jonas On Mar 18, 2010, at 4:52 , David Baelde wrote: > 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 ------------------------------------------------------------------------------ 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
