Hi, I'm glad to hear that the memory leak is getting better.
We have started a migration page to help users migrating from 1.4.x to 2.x so this feedback is very useful. Le lun. 21 juin 2021 à 17:57, p····· g······· <pra...@gmail.com> a écrit : > now this crossfade doesn't work: > > def crossfade (~start_next=5.,~fade_in=3.,~fade_out=3., > ~default=(fun (a,b) -> sequence([a, b])), > ~high=-15., ~medium=-32., ~margin=4., > ~width=2.,~conservative=true,s) > # fade.out = fade.out(type="sin",duration=fade_out) > # fade.in = fade.in(type="sin",duration=fade_in) > add = fun (a,b) -> add(normalize=false,[b, a]) > # log = log(label="crossfade") > end > > commented lines show what i had to take out to avoid startup errors. > > this transition doesn't work either: > > def transition(a,b,ma,mb,sa,sb) > list.iter(fun(x)-> log(level=4,"Before: #{x}"),ma) > list.iter(fun(x)-> log(level=4,"After : #{x}"),mb) > log("Transition: crossed, fade-in, fade-out.") > # add(fade.out(sa),fade.in(sb)) > end This is explained in: https://www.liquidsoap.info/doc-dev/migrating.html You would now write: def transition(a,b) list.iter(fun(x)-> log(level=4,"Before: #{x}"),ma) list.iter(fun(x)-> log(level=4,"After : #{x}"),mb) log("Transition: crossed, fade-in, fade-out.") add(fade.out(a.source),fade.in(b.source)) end > this definition of cross: > > # cross(width=width, duration=start_next, conservative=conservative, > # transition,s) > > also this: > #radio = crossfade(radio) > > then this important contraption which allowed me to insert metadata on the > fly and also print out track names which have played: > > #x = insert_metadata(radio) > #insert = fst(x) > #radio = snd(x) > #def set_meta(~protocol,~data,~headers,uri) = > # x = url.split(uri) > # meta = metadata.export(snd(x)) > # ret = > # if meta != [] then > # insert(meta) > # "O jaa!" > #else > # "nier metadatos!" > # end > > #http_response(protocol=protocol,code=200,headers=[("Content-Type","text/html")],data="<html><body><b>#{ret}</b></body></html>") > #end > > #harbor.http.register(port=8020,method="GET","/setmeta",set_meta) > > # execute script on_metadata > > # radio = on_metadata(fun (meta) -> system("echo %date% %time% > #{(meta[\"artist\"])} #{(meta[\"title\"])} >> c:/grojo.txt"), radio) > > > then this jingle system and also primitive gain control: > # radio = add([radio, switch([({30m31s},dzinglas)])]) > # radio = skip_blank(radio) > # radio = fallback(track_sensitive=false, [ fail(), radio, fallback_file ]) > # limradio = amplify(0.9, radio) > > compression and normalization written like that also have no luck: > # target = interactive.float("target",-17.) > # k_up = interactive.float("k_up",10.) > # k_down = interactive.float("k_down",0.2) > # gain_min = -6. > # gain_max = 10. > # window = 10. > # threshold = interactive.float("threshold",-30.) > > #radio = > normalize(target=target,k_up=k_up,k_down=k_down,gain_min=gain_min,gain_max=gain_max,window=window,threshold=threshold,radio) > #radio = compress(attack=0.5,threshold=-9.,ratio=12.,gain=6., > release=2000.,radio) > > a simple limiter doesn't want to function: > #radio = limit(attack=0.01, release=5000., threshold=-1., radio) For the above, it's hard to tell without looking at the whole script. From what you describe, it feels like you might have been using an intermediate output. Something like this: radio = output.dummy(fallible=true, radio) With 2.x, outputs now return nothing and should not be re-used as source so you should do: output.dummy(fallible=true, radio) # keep using radio afterward... > and finally, radio = register_flow is also commented out but i don't > remember if i did it because of LS v2 or some time earlier..:) Flow is unmaintained and deprecated now, sadly. > also one transition for fallback including live harbour that Martin > Kirchgessner suggested earlier: > def crossfade_1s(a,b) > faded = add(normalize=false, [ > fade.in(duration=1., type="exp", b), > amplify(mkfade(duration=1., start=1., stop=0., type="exp", a) ,a) > ]) > add_timeout(3., { source.skip(a) ; -1.}) > faded > end > > that behaved absolutely unusably shitty (fading in and out multiple times > and never completing the fade, skipping tracks on fades happening in > background in pre-V2 liquidsoap), now works absolutely perfect ;) This might be a proper bug, if we can isolate and reproduce it. Romain _______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users