Hello, Romain!

Thank You for reply!

Romain Beauxis <toots@...> writes:

> Hi Sergey,2013/10/1 óÅÒÇÅÊ é×ÁÎÏ× <genunix-dO2lXpCy6nM@public.gmane.org>>> Hello! >> I need help in following issue. I need to insert a small playlist at the beginning of each hour. Playlist is generated automatically by the cron.š
> >> This is important part of script.>> def playlist_watch(uri)> š pl = playlist.once(reload_mode="watch", uri)> š merge_tracks(usmart_crossfade(pl))> end>
> > radio = switch([({ 6h-11h }, šmrn_radio),
> > š š š š š š š š ({ 11h-18h }, day_radio),> š š š š š š š š ({ 18h-6h }, ševn_radio)])>> radio = fallback(> track_sensitive=false, > transitions=[to_news, to_music],> [switch([({00m00s-00m03s}, playlist_watch("#{playlists}/news.pls")),
> > š š š š š š š({30m00s-30m03s}, playlist_watch("#{playlists}/news30.pls")),> š š š š š š š({45m00s-45m03s}, playlist_watch("#{playlists}/weather.pls"))> š š š š š š]),> š š radio, default])
> >> radio = normalize(usmart_crossfade(start_next=4., width=3.5, radio))>> The first track in the playlist, which is reloaded with playlist.once, played twice! I need to khow why and how can I resolve this!I just tried this very simple script:
> š output.ao(fallible=true, playlist.once("/path/to/directory"))
> And the first track was only played once.. Perhaps there's another part in your script that causes the issue? What is for instance the definition of usmart_crossfade? What happens when you execute just a single playlist.once with nothing else?
> Romain

I checked the script and found the following: cron generates playlist immediately before the start of play (less than a minute) and Ýnly in this case there is a problem.

I need to play news at start of a hour and I changed the script as follows:


def to_news(a, b)
š log("Transition to news")
š #sequence([a,b])
š add(normalize=false,
š š š [ sequence([ blank(duration=0.5),
š š š š š š š š š šfade.initial(duration=0.5, b) ]),
š š š š fade.final(duration=2.5, a) ])

def to_music(a, b)
š log("Transition to music")
š source.skip(b)
š add(normalize=false, [b, fade.final(duration=0.5,a)])
š #sequence([a,b])

%include "opts.liq"

long_jingles = set_type(type="long_jingle", playlist("#{jingles}/longs"))
songs = set_type(type="music", playlist(conservative=true, "#{music}"))

default = set_type(type="jingle", single("#{jingles}/pafos_long.mp3"))

jingles = random( [long_jingles ] )
radio = smart_crossfade(rotate(weights=[4,1],[songs, delay(1., jingles)]))
pqueue = request.queue(id="program")

radio = fallback(
š š š š track_sensitive=false, replay_metadata=false,
š š š š transitions=[to_news, to_music],
š š š š [ pqueue, radio, default ])

%include "out.liq"

š š %vorbis.cbr(channels=2, bitrate=96),
š š mount = "oldroks",
š š radio

Once again, I have a problem. In liquidsoap 1.1.1 smart_crossfade works only first time, so I moved to developer version. In this version smart_crossfade works, but transition to_music not mix tracks. to_news works fine!

In the version for developers smart_crossfade works well, but does not work transition to_music. I can see the line "Transition to music" in the log, but the tracks are played in sequence. I can not understand what the problem is?

Transition to_news works fine.š
WBR, Sergey.