Sam,

I just wanted to compliment and thank you for the tail end of your
response.  It brought a smile to my face and made my Monday.  I've been the
computer business for a long time, and it's always nice to meet somebody
who cares and tries.

I too have wrestled with LiquidSoap and oCaml syntax, so thanks for your
patience.

Nick


On Mon, Apr 29, 2013 at 3:42 AM, Samuel Mimram <[email protected]> wrote:

> Hi,
>
> The append function has this type, if we forget about optional parameters:
>
> append(
>   source('a),
>   (([(string*string)])->source('a))
> )
> ->
> source('a)
>
> This means that it is a function which takes as arguments :
> - a source (to which we want to append a track to every track)
> - a function which takes as argument the metadata of the current track and
> returns the track to append (this design was chosen so that the appended
> track can depend on the current track)
> and returns a source.
>
> So, it could be used with something like
>
> s = append(s, fun(m) -> blank(duration=0.1))
>
> The function "fun(m) -> blank(duration=0.1)" simply does not uses its
> argument m which contains the metadata of the current track, since we don't
> need it here.
>
> Some concepts behind Liquidsoap can be difficult to grasp at first, this
> is normal and we are here to help. But generally they have been introduced
> for a good reason (in this case, we want to be able to generate the added
> track differently for each track), so please keep calm, gentle and patient
> here, and usually the issue will be solved quite quickly.
>
> ++
>
> Sam.
>
>
> On Mon, Apr 29, 2013 at 1:59 AM, [email protected] <[email protected]>wrote:
>
>> In an effort to work around the data lost at
>> the end of a file encoded to mp3 (Lame)
>> I am trying to append a blank to the end
>> of my source and have it cut off instead
>> of actual sound information, but I cannot
>> make heads or tails of the append function
>> in the documentation:
>>
>> append(?id:string,?insert_missing:bool,?merge:bool,source('a),
>>  (([(string*string)])->source('a)))->source('a)
>>
>> What would an actual call to this function
>> look like? I can only find one example of its
>> use (in utils.liq) but I find it equally baffling:
>>   fun (s,~pattern=p) ->
>>     append(s,fun (m) -> request.queue(queue=[request.create(pattern % m)],
>>                                       interactive=false))
>>
>> Let's say I have a source:
>> source = once(single(argv(1)))
>>
>> and I want to append 100ms of blank data to it..:
>> once(blank(duration=0.1))
>>
>> What would the append call look like? Is it some kind of queer oCaml
>> thing?
>>
>> append(merge=true, once(blank(duration=0.1)), source)
>> does not work...
>>
>> source -> append(merge=true, once(blank(duration=0.1)) -> source)
>> does not work...
>>
>> I have no idea what the documentation is trying to say. It just makes no
>> sense.
>>
>> I just wan't to append/merge a bit of blank data to the end of my source.
>> Does anybody know how to do that?
>> Or does anyone understand the syntax of append?
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Try New Relic Now & We'll Send You this Cool Shirt
>> New Relic is the only SaaS-based application performance monitoring
>> service
>> that delivers powerful full stack analytics. Optimize and monitor your
>> browser, app, & servers with just a few lines of code. Try New Relic
>> and get this awesome Nerd Life shirt!
>> http://p.sf.net/sfu/newrelic_d2d_apr
>> _______________________________________________
>> Savonet-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>>
>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to