Hi Pad,

There is an operator named fallback.skip that can achieve that. If you need
something more specific, you can also looks at its implementation to create
your own:

def fallback.skip(~input,f)
  def transition(a,b) =
    source.skip(a)
    # This eats the last remaining frame from a
    sequence([a,b])
  end

fallback(track_sensitive=false,transitions=[transition,transition],[input,f])
end

2016-04-13 3:37 GMT-05:00 Pad Anius <[email protected]>:

> Hi There,
>
> I am looking for a way to start a new song (instead of fading in the
> existing
> music bed) after anything triggered by a switch statement ends.
>
> I believe one way to do that could be to estimate when the single or
> playlist
> in switch is about to end, then do a source.skip just before whatever is
> played
> in the switch statement ends.
>
> Any idea ho to accomplish this?
>
> Below a sample code I am using.
>
> Thanks!
>
> Pad
>
> ----------- cut here ---------
>
>
> # (...)
> ac = audio_to_stereo(playlist(mode="random", reload=7200,
> "/MUSIC/AC/LATEST"))
> hits = audio_to_stereo(playlist(mode="random", reload=7200, "/MUSIC/HITS"))
> old = audio_to_stereo(playlist(mode="random", reload=7200, "/MUSIC/OLD"))
> italian = audio_to_stereo(playlist(mode="random", reload=7200,
> "/MUSIC/ITA"))
> smoothj = audio_to_stereo(playlist(mode="random", reload=7200,
> "/MUSIC/SMOOTH"))
>
>
> day=random(weights = [3,2,1], [ac,hits,italian])
> night=random(weights = [4,3,2,1], [old,ac,hits,italian])
> evening=random(weights = [4,1,3,2], [old,smoothj,ac,hits])
>
> radio=switch([ ({0h-1h}, evening), ({1h-6h}, night), ({6h-19h}, day),
> ({19h-23h59m}, evening) ])
>
> X00min = playlist.merge("/NEWS/playlists/00min.pls")
> X00minweekend = playlist.merge("/NEWS/playlists/00minwkend.pls")
> X30min = playlist.merge("/NEWS/playlists/30min.pls")
>
> timed_promotions =
> switch([
>     ({(2w or 3w or 4w or 5w) and 59m49s} , X00min),
>     ({(1w and 1h-15h) and 59m49s} , X00minweekend),
>     ({(6w or 7w) and 59m49s} , X00minweekend),
>     ({(1w or 2w or 3w or 4w or 5w or 6w or 7w) and 29m49s} , X30min),
> ])
>
> radio = smooth_add(delay=0.8,p=0.0,normal=radio,special=timed_promotions)
> (....)
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications
> Manager
> Applications Manager provides deep performance insights into multiple
> tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to