Hi !

Le jeudi 17 décembre 2009 11:17:28, Andreas Volk a écrit :
> I have a problem when combining smart_crossfade and source.skip.
> 
> I have two rotations of playlists with smart_crossfade:
> 
> s1 = smart_crossfade(rotate([pl1,pl2,pl3]))
> s2 = smart_crossfade(rotate([pl4,pl5,pl6]))
> 
> In a switch I change between these two sources. The transitions for this 
> switch are to fade out, play a jingle, and start with a new track of the 
> other source:
> 
> def new_prog(jingle,a,b)
>    source.skip(a)
>    sequence([fade.final(a,duration=7.), jingle, b])
> end
> 
> s = switch(track_sensitive=false,
>        transitions=[new_prog(j1), new_prog(j2)],
>        [( { 0h-12h }, s1) ,( { 12h-24h }, s2)]
> 
> 
> The problem is that the source.skip is audible in the smart_crossfade. 
> You hear that a new track is started and immediately faded out. Then the 
> jingle is played and the track of the other source.
> I have no idea where to place source.skip so that the old track is faded 
> out and skipped afterwards.

Hmm... Thanks indeed not an easy issue I believe.

I think the skip should not happen during the fade.out transition, since the 
source is needed for the crossfade.

Hence, you should need to put it later, when the jingle or the next source are 
played.

If I understand well the way that the sequence will work, once the fade.final 
has ended, a new track will start with the jingle. So, you may be able to 
trigger the skip with this new track, since at this time the fade out has 
ended. This should give something like:

def new_prog(jingle,a,b)
  # A skip function
   skip = fun (_) -> source.skip(a)
  # We put the on_track between the jingle and the fade.final:
  s = on_track(skip, sequence([fade.final(a,duration=7.), jingle]))
  # We add the b source:
   sequence([s, b])
end

However, I am not sure about this, so let us know if it works as expected :-)


Romain

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to