Hello List!
Am 25.05.2013 01:48, schrieb Thomas Bühlmann:
> ----- Original Message -----
> From: "Samuel Mimram" <[email protected]>
> To: "savonet-users" <[email protected]>
> Cc: "savonet-users" <[email protected]>
> Sent: Thursday, May 23, 2013 6:58 PM
> Subject: Re: [Savonet-users] using transitions with random()
>
>
>> For the record, I submitted this on the bug tracker :
>> https://github.com/savonet/liquidsoap/issues/81
>>
>> On Thu, May 23, 2013 at 6:50 PM, Samuel Mimram <[email protected]> wrote:
>>> Hi,
>>>
>>> Unfortunately, your solution seems to be right I think, but it does
>>> not work here too.... Fortunately, there are other ways to achieve
>>> this and the following one seems to do the trick:
>>>
>>> def crossfade(s)
>>> s = fade.in(duration=1.,s)
>>> s = fade.out(duration=1.,s)
>>> fader = fun (a,b) -> add(normalize=false,[b,a])
>>> cross(duration=2., fader, s)
>>> end
>>>
>>> music =
>>> crossfade(random(transitions=[xfade,xfade],weights=[1,1],[s1,s2]))
>>>
> That's nice too!, i'll try this, thanks a lot!
> --Tom
This works very nice. Only problem i found so far is that switches don't
seem work with this source.
I've the following code:
day=playlist(....)
day=crossfade(day) # "Crossfade" defined like in the example. I just
found this works "alone" with only one source.
user_request=request.equeue(..)
...
radio=switch(id="mainswitch",track_sensitive=true,[
{(06h30m-00h00m) and 58m00s-00m05s}, pause),
({(06h30m-00h00m) and 00m06s-57m59s},
user_request),
({(6w or 7w) and 00h00m-23h59m}, day ),
({(1w or 2w or 3w or 4w or 5w) and
00h00m-06h30m}, night),
({(1w or 2w or 3w or 4w or 5w) and
06h30m-00h00m},day )
])
#fallback separated from switch for clarity while testing
radio = fallback(id="mainfallback",track_sensitive=true,[radio,default])
it's now just playing "day"on the mainswitch without obying the
user_request as soon as any track is ready..
If i remove the crossfade, everything works.
Shouldn't the mainswitch be passed at every track end of day?
There must be a mayor misunderstanding on my side how tracks (and
assosicated metadata) work.
The log says:
2013/05/27 16:52:43 [mailfalback:3] Switch to mainswitch with forgetful
transition.
2013/05/27 16:52:43 [mainswitch:3] Switch to cross_4853.
2013/05/27 16:52:43 [day1:3] Overriding amplification: 0.991402.
2013/05/27 16:52:59 [decoder:3] Method "MAD" accepted
"/music/day/sound.mp3". (<- *user_request*)
2013/05/27 16:53:29 [server:3] Client localhost disconnected.
2013/05/27 16:56:24 [server:3] New client: localhost.
2013/05/27 16:56:35 [decoder:3] Method "MAD" accepted
"/music/day/kein_titel/10-audiotrack_10.mp3".
2013/05/27 16:56:45 [day1:3] Finished with
"/music/day/2010/various/title_5.mp3".
2013/05/27 16:56:45 [day1:3] End of the current overriding.
2013/05/27 16:56:45 [day1:3] Prepared
"/music/day/kein_titel/10-audiotrack_10.mp3" (RID 69).
2013/05/27 16:56:45 [day1:3] Overriding amplification: 1.019178.
Can anybody help me here?
Thanks!
>>> ++
>>>
>>> Sam.
>>>
>>> On Wed, May 15, 2013 at 1:16 PM, Thomas Bühlmann <[email protected]> wrote:
>>>> Hello list!
>>>>
>>>> I'm stuck (once more) here..
>>>>
>>>> I'm not sure, wether i use random() the right way, i can't get it to use
>>>> function xfade as transition.
>>>> (source1 and source2 are playlists)
>>>>
>>>> # A simple cross-fade
>>>> def xfade(a,b)
>>>> add(normalize=false,
>>>> [ sequence([ blank(duration=1.5),
>>>> fade.initial(duration=3.,b) ]),
>>>> fade.final(duration=3.,a) ])
>>>> end
>>>> ......
>>>> music=random(id="day_rotator",transitions=[xfade,xfade],weights=[1,1],[source1,source2])
>>>> ......
>>>> output.icecast(.......
>>>>
>>>> The log just shows:
>>>> [day_rotator:3] Switch to day2 with forgetful transition.
>>>> [day_rotator:3] Switch to day1 with forgetful transition.
>>>> and no transition is heard.
>>>>
>>>> The generic usage descriptions given on the api site are still somewhat
>>>> cryptic to me... :)
>>>>
>>>> Thanks for helping!
>>>>
>>>> --Tom
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> AlienVault Unified Security Management (USM) platform delivers complete
>>>> security visibility with the essential security capabilities. Easily and
>>>> efficiently configure, manage, and operate all of your security controls
>>>> from a single console and one unified framework. Download a free trial.
>>>> http://p.sf.net/sfu/alienvault_d2d
>>>> _______________________________________________
>>>> 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_may
>> _______________________________________________
>> 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_may
> _______________________________________________
> 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_may
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users