2011/6/14 James Ford <[email protected]>:
> Thank you again...your instructions worked...though I'm not 100% sure why.
> My config looks like this:
>
> def transition(old,new) =
> sequence([single("/etc/liquidsoap/mp3/djliveintro.mp3"),fade.initial(new)])
> end
>
> dj=fallback(track_sensitive=false,transitions=[transition,transition],[djhost,dj])
>
> Based on that shouldn't it play the same transition going from one to the
> other source, either direction? With the config you provided it plays the
> transition mp3 and fades from dj to djhost, but when I drop the djhost
> input.harbor stream it just cuts back to dj w/o any transition mp3, though
> it kinda sounds like it fades in but it is hard to tell.
I think there are cases where if the source ends too abruptely, the
transition is not triggered. Maybe David can confirm that.
If this is the case, then I would recommend trying to raise buffer and
max, for instance:
djlive = input.harbor(buffer=7.,max=15.,..)
> Right now djhost
> is my live source and dj is a playlist that plays when the DJ isn't live
> streaming. I guess I really need to learn to understand how functions
> work. I don't know why I'm not seeing a clear picture. I think another
> part of my confusion is understanding how the transitions function works and
> should be formatted. Looking at:
>
> transitions ([(source('a), source('a))->source('a)] – defaults to []):
> Transition functions, padded with fun (x,y) -> y functions.
>
> I don't even know what it means when it says padded with fun (x,y) -> y and
> what the -> symbol even means.
The -> symbols indicates a function :)
It is used in two different cases: to denote a type and to write the
code of a function.
Types are used to describe what an object of the language is. For
instance, if a variable x has type int then it is an integer :-)
Further, if a variable x has type:
int -> int
then it is a function that takes an integer as input and returns an integer.
Transition functions are of type:
(source, source) -> source
which means that a transition function takes two sources (old and new)
and returns a source
We also use -> in order to write the actual code of a function. In the
previous example, I wrote:
def transition(old,new) =
sequence([single("/path/to/foo.mp3"),fade.initial(new)])
end
This is one possible notation. But it is also possible to write it this way:
transition = fun (old,new) ->
sequence([single("/path/to/foo.mp3"),fade.initial(new)])
In any case, both code define the same function...
When we say that they are padded with fun (x,y) -> y we mean that, by
default, the transitions take old and new source (x and y) and just
return the new source (y).
> I guess it is just luck that I've gotten as
> far as I have without any real programming skills. *
Well, we try hard to make liquidsoap accessible to non-programmers but
if you want to implement advanced uses, at some point you need to
learn more about programming :)
> I understanding the
> source methods and dependencies and such...it's just defining functions that
> is losing me.
>
> From what I was reading it looks like fallback transitions could just point
> to a source, but that wouldn't work for me either....as an example:
>
> djliveintro=single("/etc/liquidsoap/mp3/djliveintro.mp3")
>
> dj=fallback(track_sensitive=false,transitions=[djliveintro,djliveintro],[djhost,dj])
>
> This did not work but I swear I read some forum posts that people were using
> this. Any additional insight would be awesome.
in the above, djliveintro has type source: it is a source variable,
not a function (it does not take argument for instance).
> I understand if you don't
> want to waste any more of your time. If that is the case if you might be
> able to point me to a resource that will dumb it down for someone like me
> allowing me to understand it better that would rock.
I think the online documentation is the best we have for now, in
particular those pages:
http://savonet.sourceforge.net/doc-svn/quick_start.html
http://savonet.sourceforge.net/doc-svn/sources.html
http://savonet.sourceforge.net/doc-svn/language.html
However, I agree that we seem to miss an introduction to the
fondamental concepts of the language at the moment..
Romain
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users