Hello, Romain!

Thank You for reply!

Romain Beauxis <toots@...> writes:

>
> Hi Sergey,2013/10/1 Сергей Иванов <[email protected]>>>
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:

#!/usr/bin/liquidsoap

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) ])
end


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])
end

%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"

out(
    %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.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to