Hi Fred,
On Wed, May 28, 2008 at 2:12 PM, <[EMAIL PROTECTED]> wrote:
> I guess you are a bit buzzy with the coming soon Liquidsoap's new release,
> and take your time to reply. no stress.
It's a good time to ask question, it gives us an opportunity to
clarify the doc before publishing 0.3.7. As I did not understand very
well your question -- seemed like you said "first" for "second" and
vice versa everytime -- I will try to explain how to use this
technique.
The idea is that you have a switch between some sources. The switch is
a fallback() in the example, but could be random() or switch(). And
you want to add a transition for when the operator switches from one
source to another. With fallback, you pass it like that:
fallback(transitions=[T1,...,TN],[S1,...,SN]) so the transition
function Ti is used for going from any source Sj to Si.
In the example we start by defining a transition function named
"transition". This is done by adding the following code at toplevel in
your script, anywhere -- but before any use of "transition" of course:
> PART 1
> def transition(j,a,b)
> add(normalize=false,
> [ fade.initial(b),
> sequence(merge=true,
> [blank(duration=1.),j,fallback([])]),
> fade.final(a) ])
> end
This code is self-contained, it is valid in itself.
Now we are going to use it, in the following code that builds a source
from a switch operation:
> PART 2
> fallback(track_sensitive=false,
> transitions=[ crossfade, transition(jingle) ],
> [ input.http("http://localhost:8000/live.ogg"),
> playlist("playlist.pls") ])
For this to be valid code, you need:
* to fix the playlist and stream URIs;
* to have a "jingle" defined, supposed to play short jingle tracks;
* to have the "crossfade" function defined.
An easy way to satisfy the last point is to take the definition of
crossfade() proposed in the cookbook, and put it next to the
definition of transition():
# A simple (long) cross-fade
def crossfade(a,b)
add(normalize=false,
[ sequence([ blank(duration=5.),
fade.initial(duration=10.,b) ]),
fade.final(duration=10.,a) ])
end
You can also use the transition() function for both transitions (put
transitions=[transition(jingle),transition(jingle)]) so you won't need
crossfade().
I hope that helps, good luck,
David
> PS:
> Cool le new website..
> Puis je utiliser le bidon de savon (celui de la bannière)comme
> logo pour promotioner Liquidsoap ?
> Je compte le vectoriser ce sera plus simple a manipuler pour en faire
> ce que vous voulez (icones, bannières, Tshirt, Flash object, pub TV ^^ ).
> Merci
Thanks. You can use the soap bottle for promotion, sure :) I think
balbinus already has the original image which was vectorial, maybe he
can send it to you -- we'll put that on our site when it's done. We
already get several hits on savonet from subflow, but not as much as
from virtualdj: I hope the bottle will help fixing that :)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users