Can anyone help me out with how to actually calculate the LUFS/LKFS value of a signal? I can’t find any sources anywhere online and no textbooks seem to mention it.
If you want to go one step beyond, there is also R128 at the European Broadcast Union (EBU) for loudness normalisation, and the measurement algorithm is available from @samuel () at https://github.com/klangfreund/LUFSMeter.
(and also as plugin to buy: https://www.klangfreund.com/lufsmeter/) - highly recommended
This is great, thanks both!
Haven’t mentioned it here yet:
I’ve changed the license from GPL2 to MIT a few month ago. Feel free to use it for whatever you want.
The standard defines the filtering through coefficients at a fixed sample rate, which is rather silly IMO. If you need to support multiple sample rates, here are filter parameters that should meet the requirements (that’s how I’ve implemented it at least):
Pre-filter (high pass)
cutOffFrequency = 37.5 Hz
Q = 0.5
RLB (high shelf)
crossOverFrequency = 1500 Hz
gain = 4.0 dB
Both filters are 2nd order Butterworth filters. De-cramping should not be necessary for normal sample rates.
Thank you @stian.
Yeah, it is silly to specify a filter by only providing the coefficients for the fixed sample rate of 48kHz! This actually lead to implementations of ITU BS.1770 where resampling to 48kHz is used before the filter stage.
If someone ever needs a 2nd order IIR filter defined by the coefficients for a given sample rate (Currently 48kHz is hardcoded, but it’s easy to change), take a look at:
The documentation of the derivation is provided as well: