Salut Fred,
Toots' answer was a bit complicated, here's one that starts simpler. Then I
explain why you might want to make it more complex. What I propose is to
simply change your transition function, including the long jingle there.
Let's see...
Fred wrote:
> * My actual transition look like that :
>
> #### Transitino for mix => normal
> def crossfade(a,b)
> add(normalize=false,
> [ sequence([ blank(duration=3.),
> fade.initial(duration=7.,b) ]),
> fade.final(duration=8.,a) ])
> end
>
> #### Fading + jingle when .lst normal => .lst mix
> def transition(j,a,b)
> add(normalize=false,
> [ fade.initial(b),
> sequence(merge=true,
> [ blank(duration=1.),j,fallback([]) ]),
> fade.final(a) ])
> end
>
> radio = fallback(track_sensitive=false,
> transitions=[ crossfade, transition(jinglemix) ],
> [ tracks, tracksmix ])
>
> It's running well , but, for me, having:
> a fade out, then long jingle to announce the program , then fade in.
> is more nice..
>
> Is it possible to arrange that ?
You can simply replace your definition of crossfade by the following:
transition_jingle = single(...) # or playlist(..) if you have several
def crossfade(a,b)
sequence([ fade.final(duration=8.,a),
transition_jingle,
fade.initial(duration=7.,b) ])
end
You can use a similar one for the other transition, with a different jingle
source ("hello mix" instead of "goodbye mix").
I'm not sure that you need the fade.initial on the next source, because it'll
be at the beginning of a track so it should sound smooth even without fading.
Now, if you want some crossfading and not only fading, you can use add()
instead of sequence() in order to obtain the overlap. You need to adjust when
each component starts playing in the mix by putting some blank at the
beginning. This looks more like the transitions that you were using:
# Use it as transition(transition_jingle)
def transition(j,a,b)
out = 8.
add(normalize=false,
[ # wait for a to finish then throw the jingle and start b
sequence([ blank(out-2.), j, fade.initial(duration=7.,b) ]),
# a just stops
fade.final(duration=out,a) ])
end
You can see that the jingle only "waits" out-2 seconds before starting, so
there are two seconds of overlapping with the end of a. But there is still no
overlapping of the jingle and b. In order to do that we would have to know
precisely the duration of the jingle, and put b and the jingle in two
different branches of the add(). It is inconvenient, so using cross() as
Romain suggested is a better option.
I hope that it was clear, and I hope that you're happy with the simple
solutions :)
Cheers,
D
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users