Update: I got it working, somehow # use telnet socket set("server.telnet", true) set("server.telnet.port", 1234) set("server.telnet.bind_addr", "127.0.0.1")
radio = audio_to_stereo(sine()) r1 = rms.stereo(radio) p1 = peak.stereo(radio) radio = amplify(0.5, radio) r2 = rms.stereo(radio) p2 = peak.stereo(radio) def measure(_) = "#{fst(r1.rms())} #{snd(r1.rms())} #{fst(p1.peak())} #{snd(p1.peak())} #{fst(r2.rms())} #{snd(r2.rms())} #{fst(p2.peak())} #{snd(p2.peak())}" end server.register("measure", measure) out(radio) output.dummy(r1) output.dummy(p1) output.dummy(r2) output.dummy(p2) ###### It seems the measure points r1,p2,r2,p3 must be connected to some output. I did not get it working if I assign the tuples to variables like "rs1 = r1.rms()" or "(l,r) = r1.rms()" first, and then try to output the variables like "#{fst(rs1)}" or "#{r}". So I can access the values only inline like "#{fst(r1.rms())} #{snd(r1.rms())}" BR, Peter Am 05.03.23 um 11:00 schrieb peter_re...@gmx.de:
Dear Liquidsoap team, Up to now we are using rms.stereo and rms.peak with liquidsoap version 1.4.x to visualize the sound processing of stereo sources. Now we want to upgrade our system to Ubuntu 22.04. If any possible we want to the official package repository containing version 2.0.2. If I use rms.stereo (and later peak.stereo) the way I did with version 1.4.x it fails: rs1 = rms.stereo(duration=duration, radio) with error message At test.liq, line 13, char 9-12: r1 = fst(rs1) Error 5: this value has type source(_) (inferred at test.liq, line 12, char 6-42) but it should be a subtype of _ * _ I tried for some hours and looked for any interfaces changes, but I do not understand the issue and cannot get it running again. Have you any idea how I can get it running with version 2.02 again? The full script looks like ####################################################################### # use telnet socket set("server.telnet", true) set("server.telnet.port", 1234) set("server.telnet.bind_addr", "127.0.0.1") radio = audio_to_stereo(sine()) # window for rms and peak duration = interactive.float("duration", 10.) # measure input rs1 = rms.stereo(duration=duration, radio) # <-- failure r1 = fst(rs1) radio = snd(rs1) ps1 = peak.stereo(duration=duration, radio) p1 = fst(ps1) radio = snd(ps1) # apply effect radio = amp(0.5, radio) # measure output rs2 = rms.stereo(duration=duration, radio) r2 = fst(rs2) radio = snd(rs2) ps2 = peak.stereo(duration=duration, radio) p2 = fst(ps2) radio = snd(ps2) def measure(_) = "#{fst(r1())} #{snd(r1())} #{fst(p1())} #{snd(p1())} #{fst(r2())} #{snd(r2())} #{fst(p2())} #{snd(p2())}" end server.register("measure", measure) out(radio) ####################################################################### Thanks in advance, Peter _______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users
_______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users