2011/11/14 Henry Favretto <[email protected]>: > > > On 14/11/2011 14:40, Romain Beauxis wrote: >> 2011/11/14 Henry Favretto <[email protected]>: >>> >>> On 14/11/2011 13:03, Romain Beauxis wrote: >>>> 2011/11/14 Henry Favretto: >>>>> Hi there, >>>> >>>> Hi Henry! >>>> >>>>> I recently migrated my old script from 0.9.3 to 1.0.0 running on my >>>>> trusty old >>>>> Debian Lenny box without much trouble except for one rather subtle issue >>>>> regarding the smart_crossfade utility function... >>>>> >>>>> In my script I use it this way: >>>>> >>>>> ************************ >>>>> # Crossfade songs 15 seconds >>>>> fade.out = fade.out(type="sin",duration=15.0) >>>>> fade.in = fade.in(type="sin",duration=10.0) >>>>> add = fun (a,b) -> add(normalize=false,[b, a]) >>>>> radio = smart_crossfade( >>>>> fade_out = 15.0, >>>>> fade_in = 10.0, >>>>> start_next = 25.0, >>>>> margin = 3.0, >>>>> high = -15.0, >>>>> medium = -30.0, >>>>> conservative = true, >>>>> default = fun (a,b) -> add(fade.out(a),fade.in(b)), >>>>> radio >>>>> ) >>>>> ************************ >>>>> >>>>> I noticed (by listening to the stream and looking at the log) that for >>>>> some >>>>> reason my provided default transition is never applied e.g. when "No >>>>> transition. >>>>> Using default" is logged then the sequence transition is still used (the >>>>> function's default). >>>>> >>>>> IIRC the same script used to work as expected in 0.9.3 e.g. using a >>>>> crossfade >>>>> when the default transition is applied... >>>>> >>>>> Did I miss something? >>>> >>>> There is a subtle detail with add() that could explain your issue or >>>> at least needs a fix. >>>> By default, add([a,b,c,d]) relays metadata and track limits of the >>>> first source, a in this example. >>>> >>>> Thus, on your script, you should write: >>>> default = fun (a,b) -> add([fade.in(b),fade.out(a)]) (by the way, >>>> did you miss the [ ] in your example?) >>>> since you want metadata and track limit from the new source (b). >>>> >>>> Please, try this and let us know if your issue is still not fixed :-) >>>> >>>> Romain >>> >>> Hi Romain, >>> >>> Indeed, I guess I must have missed those brackets.... my bad. >>> >>> Okay, so I did your proposed changes but now it gives me the following >>> error: >>> >>> ************* >>> At line 46, char 33-56: >>> this value has type >>> [_] >>> but it should be a subtype of (the type of the value at line 37, char 13) >>> source(_) (infered at line 37, char 42) >>> ************* >>> >>> where line 46 in my script is >>> >>> default = fun (a,b) -> add([fade.in(b),fade.out(a)]) >>> >>> and line 37 is >>> >>> add = fun (a,b) -> add(normalize=false,[b, a]) >>> >>> Any idea what's wrong here? >> >> Well you have redefined add, thus your initial script was in fact >> correct, including the "new source should come first in add([])" bit.. >> >> Could you try to add some printing in your default transition so as to >> check whether your default function is executed or that the problem >> comes from elsewhere. Something like this: >> default = fun (a,b) -> print("\n\nDEFAULT\n\n") >> add(fade.out(a),fade.in(b)), >> ... > > When I use the mentioned print statement I get: > > Line 46, char 55 before "(": Parse error! > > Sorry if I'm being ignorant here but I'm still learning....
No pb! Could you show me a script extract around line 46? Right now I do not have enough informations to help you.. R. ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
