Hello David,
Sorry for the late feedback to your solution.
It's working great but i found a issue, if i set more that 47
timed_promotions the scripts hangs and only play the emergency.
My script is something like:
------------------------------------------------------------------------------------------------------------------------------------
...
timed_promotions = switch([({08h10m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h11m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h12m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h13m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h14m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h15m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h16m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h17m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h18m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h19m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h20m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h21m},delay(60.,single(/my/jingle.mp3)))])
...
timed_promotions = switch([({08h47m},delay(60.,single(/my/jingle.mp3)))])
timed_promotions = switch([({08h48m},delay(60.,single(/my/jingle.mp3)))])
radio =
fallback(track_sensitive=false,[timed_promotions,radio],transitions=[final_fade,out_fade])
------------------------------------------------------------------------------------------------------------------------------------
I know that i'm doing something wrong but i'm getting out of ideias...
Thanks
Best Regards,
HR
On 5/26/11 8:03 AM, David Baelde wrote:
Hi Hugo,
Thanks for the careful summary. Your first three tests are well
described, looks like a tutorial. The fourth example is less clear,
obviously.
On Wed, May 25, 2011 at 7:54 AM, Hugo Rodrigues
<[email protected]> wrote:
def final_fade(a, b) add(normalize = false, [ fade.initial(duration =
0., b), fade.final(duration = 1., a) ]) end
def out_fade(a, b) add(normalize = false, [ fade.initial(duration = 2.,
b),fade.out(duration = 0., a) ])end
timed_promotions = switch([({01h00m00s}, sequence(merge=true,[
blank(duration=1.), single("/jingles/1.mp3"),blank(duration=1.)) )])
radio =
fallback(track_sensitive=false,[timed_promotions,radio],transitions=[final_fade,out_fade])
The main problem here is that you only create only one sequence().
This is bad because sequences never rewind to their first element. It
means that the first jingle will have a blank padding as expected, but
after that the time_promotions only plays tracks from the last item,
ie. blank(), so you won't have more jingles.
Most uses of the sequence() operator dynamically create sequences,
typically within transitions.
This leads us to the simplest solution to your problem: do not mix
sources in the transition but to put them one after the other. It
sounds obvious written in English, here's how to do it in liq:
def final_fade(a,b)
sequence([fade.final(duration=2.,a),b])
end
def out_fade(a,b)
sequence([a,fade.initial(duration=2.,b)])
end
timed_promotions = switch([({08h59m},delay(60.,single(jingle)))])
radio =
fallback(track_sensitive=false,[timed_promotions,radio],transitions=[final_fade,out_fade])
We simply use sequence() instead of add(). You'll notice another
change: I've complexified the definition of timed_promotions. With the
previous definition the jingle source is only available for one
second. So I've changed ..h..m00s into just ..h..m to allow it to be
available for one minute. Then I need to prevent the jingle from
playing twice during that minute, by using the delay() operator that
forces at least 60s of inactivity between tracks. It's possible you
did not observe that problem before, because the transitions used when
leaving the jingle kept it mixed.
Hope this helps,
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users