Hi,
I'd like to build a customizable transition within a fallback using
source.id. The problem is that the fallback seem to change my source
id :
Here id my code :
---------
clock=fallback(id="clock", track_sensitive=false, [t01, t02, t03, t04,
t05, t06, t07, t08, t09, t10, t11, t12, t13, t14, t15, t16, t17, t18,
t19, t20, t21, t22, t23, t24])
def backRadioTr(cur, next)
log("clock : "^source.id(clock))
log("cur : "^source.id(cur))
if source.id(cur) == "clock"
then
inFade(cur,next)
else
inJingle(delay=3., outPubJingle, cur, next)
end
end
ClockedRadio = fallback(transitions=
[outFade, outJingle(delay=1.,
inPubJingle), backRadioTr],
track_sensitive=false,
[clock, pub, radio])
-------
pub is a request queue and radio is an http input. To goal is to be
able to distinct a fallback from clock to radio and a fallback from
pub to radio. The problem is that when I read the log produced from
a fallback from clock to radio, I get thi :
2008/09/12 21:57:03 [lang:3] clock : clock
2008/09/12 21:57:03 [lang:3] cur : src_120
Well, it seems that it's fallback's fault...
How could I fix this without using 2 different fallback? (Because it
would behave properly with my custom transitions...)
Le 28 Aug 2008 à 13:25, Romain Beauxis a écrit :
Le Tuesday 26 August 2008 20:14:19 Fred, vous avez écrit :
Salut les aminches !
Yopiyop !
Currently i use a switch based transition* between 2 differents
playlist
(transition from a track based playlist to a mix based playlist)
fade out, then 3 sec of blank, then jingle on top of a fade in.
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 ?
My "jingle" is a 20 or 30 secondes long. it's like playing a track
as a transition between 2 sources, which is a bit "special".
I don't know which kind of "tools" i can use to do this ??
Humm.. I believe you need the core "cross" operator there:
def seq_with_jingle(a,b) =
sequence(a,jingle,b)
end
def custom_cross(a,b) =
add(normalize=false,[fade.initial(b),fade.final(a)])
end
def transition(a,b) =
cross(custom_cross,seq_with_jingle(a,b))
end
I've not tested it, but the last cross call should do what you
require: it
takes the source a,j,b and returns a source with its track crossed
using the
custom_cross function.
You can tweak the parameters for each operator of course. Even
better, you may
detect (using source.id for instance) in the custom_cross function
wether a
or b is the jingle and don't apply any fade to it. That way you
would really
have fade.out, jingle, fade.in, all crossed..
The code would be in this case:
def custom_cross(a,b) =
a = if source.id(a) != "jingle" then
fade.final(a)
else
a
end
b = if source.id(b) != "jingle" then
fade.initial(b)
else
b
end
add(normalize=false,[b,a])
end
Again, not tested :)
Romain
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------
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