Hi,
yep ok, it's more clear right now, thanks.
I' think I'm really near to solve this.
With the code below, transition_stop works perfectly when blank is detected
but not transition_start, after a noise detection.
FYI when I start the liq with noise higher than -50, the output.icecast
doesn't stop.
input=input.jack(id="input")
def startit()
log("Sound is back !")
ignore(server.execute("mounticecast.start"))
end
def stopit()
log("No sound !")
ignore(server.execute("mounticecast.stop"))
end
def transition_start(before,after)
startit()
sequence([before,after])
end
def transition_stop(before,after)
stopit()
sequence([before,after])
end
gotooutput =
fallback(transitions=[transition_start,transition_stop],[strip_blank(input,threshold=-50.,length=10.),blank()])
Thomas
> On Thu, Jun 25, 2009 at 6:32 PM, <[email protected]> wrote:
>
>> Thanks for this feature, do you think it's better (or easier) than the
>> solution below ?
>>
>
> The two solutions have the same cost. It's probably simpler to use
> on_blank() rather than the source transitions, but it's entirely up to
> you.
>
>
>>> def transition_start(before,after)
>>> startit()
>>> sequence([before,after])
>>> end
>>>
>> [...]
>> In my case, where's linking before & start ?
>> Not sure I've fully understand.. sorry.
>>
>
> My transition_start function (which can be passed to fallback() as a
> transition) is just a wrapper around your startit, which says: I'm the
> default transition (sequencing) except that I call startit by the way.
> The parameters before and after simply represent the current and next
> track, from which you build a transition.
>
> To complete the solution using transitions, you would have to define
> transition_stop in the same way, calling stopit. Then you can do
> fallback(transitions=[transition_start,transition_stop],[...]).
>
> Is that clearer?
>
------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users