Re: [Faudiostream-users] lufs loudness analyser

2022-05-14 Thread Julius Smith
I had some Faust-time today, so attached is your code (tlufs2.dsp) with filters installed straight from the spec (only 48 kHz sampling supported). You probably want to replace my sine test with your own external sine-input test. - Julius On Fri, May 13, 2022 at 12:22 PM Julius Smith wrote: >

Re: [Faudiostream-users] lufs loudness analyser

2022-05-13 Thread Julius Smith
In that case, you could choose "MIT with GPL components". It's very easy to swap out a compressor, and the original simple compressor family I wrote is STK-4.3 licensed, so that's ready to go. I am happy to keep improving them if there is no better version available. One item on my list in that

Re: [Faudiostream-users] lufs loudness analyser

2022-05-13 Thread Klaus Scheuermann
I guess I can't apply MIT license, as some of the compressors I use are GPLv3, right? For instance co.RMS_FBcompressor_peak_limiter_N_chan On Thu, 2022-05-12 at 22:27 -0700, Julius Smith wrote: > >  l make it MIT - or what would be the best suiting license for > > master_me > > MIT would be

Re: [Faudiostream-users] lufs loudness analyser

2022-05-13 Thread Julius Smith
> We should at least determine where the mismatches are coming from It just dawned on me that the obvious test for ruling out filter approximation error is to type in the given literal coefficients and test only at 48 kHz. Those numbers could always be switched in for the 48kHz case. The filter

Re: [Faudiostream-users] lufs loudness analyser

2022-05-13 Thread letz
Something here to look at possibly ? https://x42-plugins.com/x42/x42-meters With the source code : https://github.com/x42/meters.lv2 Stéphane > Le 13 mai 2022 à 07:58, Julius Smith a écrit : > > > Ok, so what I find strange is that the official specs paper does not > > specify the exact

Re: [Faudiostream-users] lufs loudness analyser

2022-05-13 Thread Julius Smith
> Ok, so what I find strange is that the official specs paper does not specify the exact filter... I know! That really surprised me as well. The first stage in the spec (*Rec. ITU-R BS.1770-4 5) *is clearly a shelf filter, and that could be specified generically for any sampling rate. Instead

Re: [Faudiostream-users] lufs loudness analyser

2022-05-12 Thread Julius Smith
> l make it MIT - or what would be the best suiting license for master_me MIT would be awesome! I personally go with the STK-4.3 license, which I interpret as MIT plus a non-binding request to contribute useful modifications that are distributed. - Julius On Thu, May 12, 2022 at 2:00 PM Klaus

Re: [Faudiostream-users] lufs loudness analyser

2022-05-12 Thread Klaus Scheuermann
Ok, so what I find strange is that the official specs paper does not specify the exact filter... I set up faustlive today with atom as an editor - pretty happy with it for now and -double precision works :) Good night! Klaus On Thu, 2022-05-12 at 13:12 -0700, Julius Smith wrote: > I see that

Re: [Faudiostream-users] lufs loudness analyser

2022-05-12 Thread Klaus Scheuermann
Well hello licensing ;) Another topic I need to learn about. I'll make it MIT - or what would be the best suiting license for master_me? Itwas developed with great help from the community, so it should be open to anyone <3 Klaus On Thu, 2022-05-12 at 13:21 -0700, Julius Smith wrote: > Oops, I

Re: [Faudiostream-users] lufs loudness analyser

2022-05-12 Thread Julius Smith
Oops, I just noticed that master_me is GPL, so I can't use that either. That's ok, I can work from my original contribution to the project if I ever need LUFS for someone I am helping. (which seems likely - we should be using LUFS instead of dBFS all over the place!) - Julius On Thu, May 12,

Re: [Faudiostream-users] lufs loudness analyser

2022-05-12 Thread Julius Smith
I see that the reaper loudness meter is LGPL. Since I require MIT-level license freedom in the Faust world (for my consulting work), I won't look at that. It sounds like we want to tweak the filter designs to give -18 LUFS for the tones you shared from Reaper. The main unknown parameter, as I

Re: [Faudiostream-users] lufs loudness analyser

2022-05-12 Thread Stéphane Letz
> double precision is not available in faustide, right? Yes still not. > I will try and > install faustlive today. Yes. You can use « -double » in FL «Compilation / FAUST Compiler Options » > Or would you recommend some other ide > solution? (I am on arch linux.) > Stéphane

Re: [Faudiostream-users] lufs loudness analyser

2022-05-12 Thread Klaus Scheuermann
Thanks Julius! On Wed, 2022-05-11 at 20:05 -0700, Julius Smith wrote: > > 1. how does this help if we need reference sine tones from another > > source? I did a series of test tones in Reaper, all normalised to - > > 18lufs. Here ist the test- > > audio: https://cloud.4ohm.de/s/c7ynWemXS9eXibH >

Re: [Faudiostream-users] lufs loudness analyser

2022-05-11 Thread Julius Smith
> 1. how does this help if we need reference sine tones from another source? I did a series of test tones in Reaper, all normalised to -18lufs. Here ist the test-audio: https://cloud.4ohm.de/s/c7ynWemXS9eXibH Ok, so you're saying you want to take these Reaper-generated sine files as ground truth.

Re: [Faudiostream-users] lufs loudness analyser

2022-05-11 Thread Klaus Scheuermann
Hi Julius, Hm, I think the averaging time should not matter with continuous sine tones coming in, right? (According to specs, 0.4 is the value for ‘momentary’ and 3 for ’short term’.) Some questions about your test-program: 1. how does this help if we need reference sine tones from another

Re: [Faudiostream-users] lufs loudness analyser

2022-05-10 Thread Julius Smith
Hi Klaus, Could the averaging time be too small? I'm worried about the line Tg = 0.4; // 3 second window for 'short-term' measurement The comment seems to indicate it should be "Tg = 3;", i.e., 3 seconds of averaging instead of 0.4 s. Below is an expansion of your test program that allows for

Re: [Faudiostream-users] lufs loudness analyser

2022-05-10 Thread Klaus Scheuermann
Hi Julius, this is, of course, the way to go. I did some test with a series of sines, each  at -18lufs, and found these filter settings to be quite close (except for the 30Hz): kfilter = fi.highpass(1, 60) : fi.high_shelf(4, 1800); Hz  lufs 30 -16.693 60 -18.111 80 -18.204 100 -18.211 130

Re: [Faudiostream-users] lufs loudness analyser

2022-05-08 Thread Julius Smith
Hi Klaus, To go after this, it would be useful to measure the discrepancy for some number of sinusoidal frequencies across the audio band, with at least one example including both single-channel and multichannel input. Based on the filter approximations used, I would predict a measurable

Re: [Faudiostream-users] lufs loudness analyser

2022-05-08 Thread Klaus Scheuermann
Hi guys, would you have a moment to help me one more time with this lufs meter? It seems, my meter reads a bit higher than other lufs meters when it comes to music or speech. But with noise it's perfect. These files read exactly -18lufs in Reaper and Klangfreund meter: noise at -18lufs:

Re: [Faudiostream-users] lufs loudness analyser

2021-07-21 Thread Juan Carlos Blancas
Its working great. I like the target stuff, will look into it, congrats ;) Best, Juan Carlos > El 21 jul 2021, a las 15:39, Klaus Scheuermann escribió: > > You are right! ;) > > I forgot to apply the gain limit to both channels. It’s fixed now. > Would you be so kind to verify? > > Thanks

Re: [Faudiostream-users] lufs loudness analyser

2021-07-21 Thread Klaus Scheuermann
You are right! ;) I forgot to apply the gain limit to both channels. It’s fixed now. Would you be so kind to verify? Thanks Juan Carlos! Klaus Scheuermann kla...@posteo.de +491716565511 @schlunk:matrix.org 4ohm.de trummerschlunk.de > On 21. Jul 2021, at 13:28, Juan Carlos Blancas wrote: >

Re: [Faudiostream-users] lufs loudness analyser

2021-07-21 Thread Juan Carlos Blancas
Hi Klaus, No idea about moving calculations to control rate but also curious about it. I quick tested it in faustlive and in my daw (faustide is not working lately for me) and I noticed a couple of things; it seems to be a small difference in the LUFS S input meter, and on the other hand when

Re: [Faudiostream-users] lufs loudness analyser

2021-07-21 Thread Klaus Scheuermann
Good morning! Ok, I read it and removed two si.smoo from metering. Could the whole lufs calculation be moved to control rate? Or at least the calculation of loudness difference which uses a lp1p for smoothing and gating? difference(l,r)= (target- (Lk2(l,r):hbargraph("[1]Input LUFS

Re: [Faudiostream-users] lufs loudness analyser

2021-07-20 Thread Stéphane Letz
Another tool to help understanding the code, using the « fir » backend with : faust -lang fir master_me_gui.dsp (assuming « make developer » has been used to compile Faust) Then you can see that number of different operations in the methods, especially the "Compute DSP » ===

Re: [Faudiostream-users] lufs loudness analyser

2021-07-20 Thread Klaus Scheuermann
Thank you, I will read up on it... Just two more questions: 1. zi= an.ms_envelope_rect(Tg); is still buggy, right? At least it behaves very differently than 'zi_lp' lp1p(cf,x)= fi.pole(b,x* (1- b))with{ b= exp(-2* ma.PI* cf/ ma.SR); }; zi_lp(x)= lp1p(1/ Tg,x* x); 2. Regarding cpu-hunger, can

Re: [Faudiostream-users] lufs loudness analyser

2021-07-20 Thread Stéphane Letz
This is the occasion to remind all of you of some debugging tools that can help here: - read https://faustdoc.grame.fr/manual/optimizing/#debugging-the-dsp-code - especially the interp-trace tool: https://github.com/grame-cncm/faust/tree/master-dev/tools/benchmark#interp-tracer - which gives

Re: [Faudiostream-users] lufs loudness analyser

2021-07-20 Thread Julius Smith
I was looking at an.peak_envelope(time, in) On Tue, Jul 20, 2021 at 1:42 PM Dario Sanfilippo wrote: > Or you're feeding 0 to a log function. :-) > > Try this: > > Lk2 = Lk(0),Lk(2) :> 10 * log10(max(ma.EPSILON)) : -(0.691); > > Dr Dario Sanfilippo > http://dariosanfilippo.com > > > On Tue, 20

Re: [Faudiostream-users] lufs loudness analyser

2021-07-20 Thread Dario Sanfilippo
Or you're feeding 0 to a log function. :-) Try this: Lk2 = Lk(0),Lk(2) :> 10 * log10(max(ma.EPSILON)) : -(0.691); Dr Dario Sanfilippo http://dariosanfilippo.com On Tue, 20 Jul 2021 at 22:28, Dario Sanfilippo wrote: > Hello. > > On Tue, 20 Jul 2021 at 22:14, Klaus Scheuermann wrote: > >> Hi

Re: [Faudiostream-users] lufs loudness analyser

2021-07-20 Thread Dario Sanfilippo
Hello. On Tue, 20 Jul 2021 at 22:14, Klaus Scheuermann wrote: > Hi Julius, > > I don't see a -70db lower limit... where is that? > > Besides... because > zi = an.ms_envelope_rect(Tg); > > seems really buggy, I am using Dario's workaround > lp1p(cf, x) = fi.pole(b, x * (1 - b)) with { > b =

Re: [Faudiostream-users] lufs loudness analyser

2021-07-20 Thread Julius Smith
Hi Klaus, Thanks for sharing master_me! Your envelope looks safe because of the -70 dB lower limit. You might try running everything in double precision to see if that has any effect. - Julius On Tue, Jul 20, 2021 at 3:13 AM Klaus Scheuermann wrote: > When the input lufs meter goes to

Re: [Faudiostream-users] lufs loudness analyser

2021-07-20 Thread Klaus Scheuermann
When the input lufs meter goes to '-infinity', the audio mutes and some GUI parts disappear. On July 20, 2021 11:59:57 AM GMT+02:00, "Stéphane Letz" wrote: > « crash at silence » ? what does that mean exactly? > >Thanks. > >Stéphane > >> Le 20 juil. 2021 à 11:55, Klaus Scheuermann a >écrit :

Re: [Faudiostream-users] lufs loudness analyser

2021-07-20 Thread Stéphane Letz
« crash at silence » ? what does that mean exactly? Thanks. Stéphane > Le 20 juil. 2021 à 11:55, Klaus Scheuermann a écrit : > > Good day to all! > > All my TO-DOs are DONE - woohoo :) Here is the code: >

Re: [Faudiostream-users] lufs loudness analyser

2021-07-13 Thread Stéphane Letz
Should float2fix and fix2float functions go inside the libraries? With appropriate explanations on when to use them? Stéphane > Le 13 juil. 2021 à 06:08, Yann Orlarey a écrit : > > Hi Julius, > > I didn't mention it to simplify my point, but it's absolutely right: > > float2fix(n) = *(2^n)

Re: [Faudiostream-users] lufs loudness analyser

2021-07-12 Thread Yann Orlarey
Hi Julius, I didn't mention it to simplify my point, but it's absolutely right: float2fix(n) = *(2^n) : int; fix2float(n) = float : /(2^n); rms3(n) = _ <: _, (^(2) : float2fix(16) <: _,@(n) : - : +~_ : fix2float(16) : /(n) : sqrt : vbargraph("rms3", 0, 1.42)) : attach; Cheers Yann Le mar. 13

Re: [Faudiostream-users] lufs loudness analyser

2021-07-12 Thread Julius Smith
Hi Yann, That looks much better! However, I think the roundoff error will still grow in the integrator, unless the shifted delayed value (which is subtracted) is exactly the same bit pattern as its undelayed counterpart. This can be arranged by converting to fixed-point and leaving enough guard

Re: [Faudiostream-users] lufs loudness analyser

2021-07-12 Thread Yann Orlarey
Hi Julius and Dario, Sliding sums written as: sliding_sum(n) = (+ ~ _) <: _, @(n) : -; accumulate errors (because the integral value is ever-growing, its precision decrease with time). This is why it is better to first subtract then integrate as in : sliding_sum(n) = _ <: _,@(n) : - : +~_ ;

Re: [Faudiostream-users] lufs loudness analyser

2021-07-11 Thread Dario Sanfilippo
Dear Julius, On Sun, 11 Jul 2021 at 22:26, Julius Smith wrote: > > This appears to have two inputs, is it possible that something is > missing? > > Yes, I should have defined it with "_ <: " at the input. Also, it's not a > solution to our puzzle - sorry for the noise. Let me know if you

Re: [Faudiostream-users] lufs loudness analyser

2021-07-11 Thread Julius Smith
> This appears to have two inputs, is it possible that something is missing? Yes, I should have defined it with "_ <: " at the input. Also, it's not a solution to our puzzle - sorry for the noise. Let me know if you prefer that I wait until I can actually test things before emailing - I've been

Re: [Faudiostream-users] lufs loudness analyser

2021-07-11 Thread Klaus Scheuermann
Thank you Stéphane! On 11.07.21 13:19, l...@grame.fr wrote: >> >>> Le 10 juil. 2021 à 14:47, Juan Carlos Blancas a écrit : >>> >>> Klaus, I’m using Atom+FaustLive, Max and SC to do the tests, but I get the >>> same crash as you with faustide/editor. >>>

Re: [Faudiostream-users] lufs loudness analyser

2021-07-11 Thread letz
> >> Le 10 juil. 2021 à 14:47, Juan Carlos Blancas a écrit : >> >> Klaus, I’m using Atom+FaustLive, Max and SC to do the tests, but I get the >> same crash as you with faustide/editor. >> https://www.dropbox.com/s/blwtwao7j317db0/test.mov?dl=0 > > There is indeed a general issue across all

Re: [Faudiostream-users] lufs loudness analyser

2021-07-11 Thread Klaus Scheuermann
Hello Juan Carlos, > Klaus, I’m using Atom+FaustLive, Max and SC to do the tests, but I get the > same crash as you with faustide/editor. > https://www.dropbox.com/s/blwtwao7j317db0/test.mov?dl=0 > cool, thanks! > Btw the reading are

Re: [Faudiostream-users] lufs loudness analyser

2021-07-11 Thread Julius Smith
On third thought, I now see how subtraction is not exact (it depends on what shifts are needed at addition/subtraction time, which can differ). The idea is to effectively never round, only summation and the delayed subtraction, so that subtraction after the delay is exact, avoiding a TIIR

Re: [Faudiostream-users] lufs loudness analyser

2021-07-11 Thread Dario Sanfilippo
Hi, Julius. Sure, I now see what you mean about delay lines, but I'd guess that the required sums would make it pretty heavy even if it compiled quickly. On Sun, 11 Jul 2021 at 09:07, Julius Smith wrote: > On third thought, I now see how subtraction is not exact (it depends on > what shifts

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Julius Smith
On second thought, I don't see at the moment how anything can go wrong with this: sliding_mean(durSamples) = (+ ~ _) - @(int(durSamples)) : /(durSamples); Since there is no rounding involved, the cancellation has to be exact. We just have to ensure that the implementation does not subtract

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Julius Smith
The obvious conclusion, of course, is to work out the ping-ponged truncated integrators, for measurements this long. We just need two 0.4s mean calculators that alternate. I'm sure I'll work it out sometime soon if nobody beats me to it. I imagine a square wave, select2, the sliding-mean unit,

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Julius Smith
Actually, the pattern we want kicks in at durSamples = 32 (circular-buffer delay line). On Sat, Jul 10, 2021 at 10:53 AM Julius Smith wrote: > > I'm not sure I understand what you mean by allocating a delay line for > the sliding mean, but I'll look into it. > > Here's an example implementation

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Julius Smith
> I'm not sure I understand what you mean by allocating a delay line for the sliding mean, but I'll look into it. Here's an example implementation in Faust. The "small test" allocates a length 8 delay line. The full test takes too long to compile, but you can see the pattern, so it's easy to

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Juan Carlos Blancas
> El 10 jul 2021, a las 15:31, Klaus Scheuermann escribió: > > Hello Juan Carlos, > >> Klaus, I’m using Atom+FaustLive, Max and SC to do the tests, but I get the >> same crash as you with faustide/editor. >> https://www.dropbox.com/s/blwtwao7j317db0/test.mov?dl=0 >>

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Klaus Scheuermann
Hello Juan Carlos, > Klaus, I’m using Atom+FaustLive, Max and SC to do the tests, but I get the > same crash as you with faustide/editor. > https://www.dropbox.com/s/blwtwao7j317db0/test.mov?dl=0 > cool, thanks! > Btw the reading are

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Stéphane Letz
> Le 10 juil. 2021 à 14:47, Juan Carlos Blancas a écrit : > > Klaus, I’m using Atom+FaustLive, Max and SC to do the tests, but I get the > same crash as you with faustide/editor. > https://www.dropbox.com/s/blwtwao7j317db0/test.mov?dl=0 There is indeed a general issue across all FIR base

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Juan Carlos Blancas
Klaus, I’m using Atom+FaustLive, Max and SC to do the tests, but I get the same crash as you with faustide/editor. https://www.dropbox.com/s/blwtwao7j317db0/test.mov?dl=0 Btw the reading are aprox but not the same as Youlean nor Insight2 for instance… also thinking about how to do the -70 dB

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Klaus Scheuermann
Thanks, Juan :) Your code crashes my faustide on firefox and on chromium (both linux). Here is the error message: ASSERT : please report this message and the failing DSP file to Faust developers (file: wasm_instructions.hh, line: 918, version: 2.32.16, options: -lang wasm-ib -es 1 -single -ftz

Re: [Faudiostream-users] lufs loudness analyser

2021-07-10 Thread Dario Sanfilippo
Dear Julius, thanks for putting it nicely. :) I'm not sure I understand what you mean by allocating a delay line for the sliding mean, but I'll look into it. A quick improvement to the slidingMean function could be to put the integrator after the difference. With a sliding window of .4 sec at 48

Re: [Faudiostream-users] lufs loudness analyser

2021-07-09 Thread Julius Smith
Hi Dario, Ok, I see what you're after now. (I was considering only the VU meter display issue up to now.) There's only 23 bits of mantissa in 32-bit floating point, and your test counts up to ~100k, which soaks up about 17 bits, and then you hit it with ~1/1024, or 2^(-10), which is then a

Re: [Faudiostream-users] lufs loudness analyser

2021-07-09 Thread Dario Sanfilippo
Thanks, Julius. So it appears that the issue I was referring to is in that architecture too. To isolate the problem with ba.slidingMean, we can see that we also get 0 when transitioning from a constant input of 1 to .001 (see code below). Double-precision solves the issue. Perhaps we could

Re: [Faudiostream-users] lufs loudness analyser

2021-07-09 Thread Julius Smith
I get the zero but not the other: octave:2> format long octave:3> faustout(115200,:) ans = 0 -2.73874849000e-02 5.55585793000e-05 On Fri, Jul 9, 2021 at 1:03 PM Dario Sanfilippo wrote: > Thanks, Julius. > > I don't have Octave installed, and I can't see it

Re: [Faudiostream-users] lufs loudness analyser

2021-07-09 Thread Dario Sanfilippo
Thanks, Julius. I don't have Octave installed, and I can't see it myself, sorry; if you can inspect the generated values, can you also see if at sample #115200 (48 kHz SR) you get 0 for ms_rec, and, 0.000658808684 for the lowpass? Yes, I might have done something wrong, but the leaky integrator

Re: [Faudiostream-users] lufs loudness analyser

2021-07-09 Thread Julius Smith
Here is a longer run that shows Dario's latest test more completely. I don't think zi_leaky looks right at the end, but the other two look reasonable to me. Here is the Octave magic for the plot: plot(faustout,'linewidth',2); legend('zi','zi\_leaky','zi\_lp','location','southeast');

Re: [Faudiostream-users] lufs loudness analyser

2021-07-09 Thread Dario Sanfilippo
Dear Julius, I just pulled and installed Faust 2.33.0. I'm running the test below on caqt and csvplot and I see the same problem: when large inputs are fed in an.ms_envelope_rect, small inputs are truncated to zero afterwards. import("stdfaust.lib"); zi = an.ms_envelope_rect(Tg); slidingSum(n) =

Re: [Faudiostream-users] lufs loudness analyser

2021-07-09 Thread Juan Carlos Blancas
Hi Klaus, For me ms_envelope and rms_envelope functions are not working properly. I’ve done some test in my Mac Pro with High Sierra, porting without barograph to Max or Supercollider and I get the strange gate behaviour in low levels. My workaround at the moment is using ba.slidingMeanp

Re: [Faudiostream-users] lufs loudness analyser

2021-07-09 Thread Klaus Scheuermann
Ha, so I was really on to something ;) Is the bug in the meter or in the envelope? Would you have a workaround for me to get on with the lufs analyser? Thanks, Klaus On 08.07.21 19:19, Julius Smith wrote: > Hi Dario, > > The problem seems to be architecture-dependent.  I am on a Mac (latest >

Re: [Faudiostream-users] lufs loudness analyser

2021-07-08 Thread Julius Smith
Hi Dario, The problem seems to be architecture-dependent. I am on a Mac (latest non-beta software) using faust2caqt. What are you using? I do not see the "strange behavior" you describe. Your test looks good for me in faust2octave, with gain set to 0.01 (-40 dB, which triggers the display bug

Re: [Faudiostream-users] lufs loudness analyser

2021-07-08 Thread Dario Sanfilippo
Hi, Julius. I must be missing something, but I couldn't see the behaviour that you described, that is, the gating behaviour happening only for the display and not for the output. If a remove the hbargraph altogether, I can still see the strange behaviour. Just so we're all on the same page, the

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Julius Smith
> I think that the problem is in an.ms_envelope_rect, particularly the fact that it has a non-leaky integrator. I assume that when large values recirculate in the integrator, the smaller ones, after pushing the gain down, are truncated to 0 due to single-precision. As a matter of fact, compiling

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Julius Smith
faust2caqt on the Mac On Wed, Jul 7, 2021 at 2:38 PM Stéphane Letz wrote: > Using which architecture? > > Thanks. > > Stéphane > > > Le 7 juil. 2021 à 23:34, Julius Smith a écrit : > > > > Hmmm, this test points to a hbargraph gating behavior in its display > only, although I did not run it

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Stéphane Letz
Using which architecture? Thanks. Stéphane > Le 7 juil. 2021 à 23:34, Julius Smith a écrit : > > Hmmm, this test points to a hbargraph gating behavior in its display only, > although I did not run it for a long time: > > import("stdfaust.lib"); > Tg = 0.4; > zi = an.ms_envelope_rect(Tg); >

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Julius Smith
Hmmm, this test points to a hbargraph gating behavior in its display only, although I did not run it for a long time: import("stdfaust.lib"); Tg = 0.4; zi = an.ms_envelope_rect(Tg); //gain = hslider("Gain [unit:dB]",-10,-70,0,0.1) : ba.db2linear; gain = 0.01; // -40 dB - ok in Octave (I get

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Juan Carlos Blancas
Hi Klaus, Same here, it seems there is something with ms and rms_envelope. Best, Juan Carlos import("stdfaust.lib"); rms(n) = _ : square : mean(n) : sqrt; square(x) = x * x; mean(n) = float2fix : integrate(n) : fix2float : /(n); integrate(n,x) = x - x@n : +~_; float2fix(x) = int(x*(1<<20));

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Dario Sanfilippo
I think that the problem is in an.ms_envelope_rect, particularly the fact that it has a non-leaky integrator. I assume that when large values recirculate in the integrator, the smaller ones, after pushing the gain down, are truncated to 0 due to single-precision. As a matter of fact, compiling the

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Stéphane Letz
« hargraph seems to have some kind of a gate in it that kicks in around -35 dB. » humm…. hargraph/vbargrah only keep the last value of their written FAUSTFLOAT* zone, so once per block, without any processing of course… Have you looked at the produce C++ code? Stéphane > Le 7 juil. 2021 à

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Julius Smith
By the way, the "*(0.5)" is because the mean-square envelope has no square root, so it's in power units. We should add something like this to basics.lib: power2db(g) = 10.0*log10(g); On Wed, Jul 7, 2021 at 9:31 AM Julius Smith wrote: > That is strange - hbargraph seems to have some kind of a

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Julius Smith
That is strange - hbargraph seems to have some kind of a gate in it that kicks in around -35 dB. In this modified version, you can hear that the sound is ok: import("stdfaust.lib"); Tg = 0.4; zi = an.ms_envelope_rect(Tg); gain = hslider("Gain [unit:dB]",-10,-70,0,0.1) : ba.db2linear; sig =

Re: [Faudiostream-users] lufs loudness analyser

2021-07-07 Thread Klaus Scheuermann
Hi all, I did some testing and an.ms_envelope_rect() seems to show some strange behaviour (at least to me). Here is a video of the test: https://cloud.4ohm.de/s/64caEPBqxXeRMt5 The audio is white noise and the testing code is: import("stdfaust.lib"); Tg = 0.4; zi = an.ms_envelope_rect(Tg);

Re: [Faudiostream-users] lufs loudness analyser

2021-07-05 Thread Stéphane Letz
> > What does the '!' do? > Never too late to have a look at the Faust syntax documentation ((-;, see https://faustdoc.grame.fr/manual/syntax/#cut-primitive for the ‘!’ symbol. Stéphane ___ Faudiostream-users mailing list

Re: [Faudiostream-users] lufs loudness analyser

2021-07-05 Thread Julius Smith
Hmmm, '!' means "block the signal", but attach should save the bargraph from being optimized away as a result. Maybe I misremembered the argument order to attach? While it's very simple in concept, it can be confusing in practice. I chose not to have a gate at all, but you can grab one from

Re: [Faudiostream-users] lufs loudness analyser

2021-07-05 Thread Klaus Scheuermann
Cheers Julius, At least I understood the 'attach' primitive now ;) Thanks. This does not show any meter here... process(x,y) = x,y <: (_,_), attach(x, (Lk2 : vbargraph("LUFS",-90,0))) : _,_,!; But this does for some reason (although the output is 3-channel then): process(x,y) = x,y <:

Re: [Faudiostream-users] lufs loudness analyser

2021-07-05 Thread Julius Smith
Hi Klaus, Yes, I agree the filters are close enough. I bet that the shelf is exactly correct if we determined the exact transition frequency, and that the Butterworth highpass is close enough to the Bessel-or-whatever that is inexplicably not specified as a filter type, leaving it sample-rate

Re: [Faudiostream-users] lufs loudness analyser

2021-07-05 Thread Klaus Scheuermann
> I can never resist these things!   Faust makes it too enjoyable :-) Glad you can't ;) I understood you approximate the filters with standard faust filters. That is probably close enough for me :) I also get the part with the sliding window envelope. If I wanted to make the meter follow

Re: [Faudiostream-users] lufs loudness analyser

2021-07-04 Thread Klaus Scheuermann
Thank you very much, Julius! I will take some time to fully understand and then get back to you :) Awesome. Klaus On 04.07.21 04:49, Julius Smith wrote: > Hi Klaus, > > I can never resist these things!   Faust makes it too enjoyable :-) > > I made a pass, but there is a small scaling error.  I

Re: [Faudiostream-users] lufs loudness analyser

2021-07-03 Thread Julius Smith
Hi Klaus, I can never resist these things! Faust makes it too enjoyable :-) I made a pass, but there is a small scaling error. I think it can be fixed by reducing boostFreqHz until the sine_test is nailed. The highpass is close (and not a source of the scale error), but I'm using Butterworth