Hi Bill,

Your goal is not an easy one, but that should be doable. I'll try to
guide you a bit. First, you need to decide how to insert this
introduction file before your shows (either live or replays). I see
two ways. You could prepend the intro before launching the show, and
in that case you should look at prepend(). Or you could superpose/mix
the intro while the show starts, which you could do using a
(smart)cross() transition.

It's not only a matter of taste: I suspect that the second solution is
easier, because it will be more tolerant to the time it takes to
prepare the intro files. If you go for prepending, then you'll provide
prepend with a function that builds the source producing the intro,
and you have to make sure that the intro track is immediately ready in
that source, otherwise it will be skipped. Depending on how you
actually prepare the intro, it may force you to wait that one or
several requests are ready in the construction function, which will
block streaming -- scary. Also, prepending will delay the live show,
and if it delays it too much some data may be dropped from the live
source's buffers -- you can't delay live stuff that easily.

So I would go with cross() or smartcross(). Try playing with them to
unconditionnally insert one file as an intro, then try several files.
Finally you can try making this file selection dependent on metadata.

Regarding the cookbook, I know it's not ideal.. but that's pretty much
all we have for now. The scripting language is not OCaml, it's our own
for various reasons. And currently I don't know of any tuto outside of
our docs. The mailing list itself is kind of a huge messy cookbook
too, for example I believe we've already discussed metadata-dependent
transition functions, notably in *cross().

Cheers,

David

On Wed, Jun 19, 2013 at 6:16 AM, Bill Burton <[email protected]> wrote:
> Hello,
>
> I'm trying to figure out how to dynamically string together individual
> entries on several playlists for the purpose of making an introduction that
> includes a date and prepended to a recording made on the specific date.
>
> My primary use case is a liquidsoap script that records from the sound card
> and at the start of the file, outputs an introduction that includes the
> spoken date of the recording.  There is also a backlog of older recordings
> for which I want to prepend the same intro based on the date the recording
> was made.
>
> I realize that "say:..." could be used but for now this script runs on
> Windows where that feature is not available and in any case, I want more
> control over the way the introduction and date is spoken by using my own
> recordings.
>
> Have made recordings to three files:
>
> years.mp3 - current and future years
> months.mp3 - twelve months
> days.mp3 - 1st - 31st
>
> Have created a cue sheet for each file to separate out the numbers in each
> file so playlist() should be able to read each file and from that determine
> the elements based on the associated cue sheet.
>
> What I'm assuming is that if there's a way to convert each playlist to a
> hash with the key being the entry name in the playlist from the cue sheet,
> then the key could be used to access the correct recordings dynamically to
> speak the specified date by playing all the entries in the correct order.
>
> Maybe there's some better way to organize the recordings to support this?
>
> Right now, I'm having trouble understanding the API docs for liquidsoap
> without any examples.  Also, the Cookbook and examples don't cover a lot of
> Ocaml syntax.
>
> Are there any particularly helpful sites on learning Ocaml?  The few bits of
> code I've tried don't seem to work in liquidsoap.
>
> My background is mostly Java, Ruby and Perl if that matters at all.
>
> Thanks for any assistance,
> -Bill
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>



-- 
David

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to